diff --git a/DEVGUIDE.md b/DEVGUIDE.md index 82b79e2bafd..551c0b684bb 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -230,7 +230,7 @@ See the "Debugging The Compiler" section of this [article](https://medium.com/@w - 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 +#### Updating FSComp.fs, FSComp.resx and XLF If you change error messages you may need to update FSComp.fs in `src\buildfromsource\FSharp.Compiler.Private`. @@ -239,6 +239,14 @@ To do this, build the non-buildfromsource version of FSharp.Compiler.Private (sr .\build net40 copy /y src\fsharp\FSharp.Compiler.Private\obj\release\net40\FSComp.* src\buildfromsource\FSharp.Compiler.Private\ +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 + + pushd src\fsharp\FSharp.Compiler.Private + msbuild FSharp.Compiler.Private.fsproj /t:UpdateXlf + popd + +This only works on Windows/.NETStandard framework, so changing this from any other platform requires editing and syncing all of the XLF files manually. + You can also change build.cmd to default COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES to 1 under ":ARGUMENTS_OK" label. #### Configuring proxy server @@ -251,11 +259,6 @@ If you are behind a proxy server, NuGet client tool must be configured to use it 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 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 8128ab15731..32a0b6812d7 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 @@ -29,7 +29,7 @@ - + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll 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 86296dcea04..1bf41b7bf27 100644 --- a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj +++ b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj @@ -31,7 +31,7 @@ - + \ No newline at end of file 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 d7f29459dee..cd0768f8da7 100644 --- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj +++ b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj @@ -28,7 +28,7 @@ $(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 diff --git a/fcs/build.fsx b/fcs/build.fsx index 145d4c88e8f..d5e3df4ac4f 100644 --- a/fcs/build.fsx +++ b/fcs/build.fsx @@ -24,7 +24,7 @@ let isMono = false // Utilities // -------------------------------------------------------------------------------------- -let dotnetExePath = DotNetCli.InstallDotNetSDK "2.1.201" +let dotnetExePath = DotNetCli.InstallDotNetSDK "2.1.403" let runDotnet workingDir args = let result = diff --git a/fcs/samples/EditorService/EditorService.fsproj b/fcs/samples/EditorService/EditorService.fsproj index 05847e67f90..447906070f0 100644 --- a/fcs/samples/EditorService/EditorService.fsproj +++ b/fcs/samples/EditorService/EditorService.fsproj @@ -12,7 +12,7 @@ - + diff --git a/fcs/samples/FscExe/FscExe.fsproj b/fcs/samples/FscExe/FscExe.fsproj index c482656827f..b2b146913a1 100644 --- a/fcs/samples/FscExe/FscExe.fsproj +++ b/fcs/samples/FscExe/FscExe.fsproj @@ -14,7 +14,7 @@ - + diff --git a/fcs/samples/FsiExe/FsiExe.fsproj b/fcs/samples/FsiExe/FsiExe.fsproj index 7377f2c2912..aae2ba03182 100644 --- a/fcs/samples/FsiExe/FsiExe.fsproj +++ b/fcs/samples/FsiExe/FsiExe.fsproj @@ -16,7 +16,7 @@ - + diff --git a/fcs/samples/InteractiveService/InteractiveService.fsproj b/fcs/samples/InteractiveService/InteractiveService.fsproj index 7aa42497261..387439fcfdd 100644 --- a/fcs/samples/InteractiveService/InteractiveService.fsproj +++ b/fcs/samples/InteractiveService/InteractiveService.fsproj @@ -12,7 +12,7 @@ - + diff --git a/fcs/samples/Tokenizer/Tokenizer.fsproj b/fcs/samples/Tokenizer/Tokenizer.fsproj index 7aa42497261..387439fcfdd 100644 --- a/fcs/samples/Tokenizer/Tokenizer.fsproj +++ b/fcs/samples/Tokenizer/Tokenizer.fsproj @@ -12,7 +12,7 @@ - + diff --git a/fcs/samples/UntypedTree/UntypedTree.fsproj b/fcs/samples/UntypedTree/UntypedTree.fsproj index 7aa42497261..387439fcfdd 100644 --- a/fcs/samples/UntypedTree/UntypedTree.fsproj +++ b/fcs/samples/UntypedTree/UntypedTree.fsproj @@ -12,7 +12,7 @@ - + diff --git a/src/absil/il.fs b/src/absil/il.fs index 6d25d3a4bf6..4e7f2c66b78 100644 --- a/src/absil/il.fs +++ b/src/absil/il.fs @@ -309,8 +309,12 @@ module SHA1 = 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 sha1HashInt64 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 + (int64 h3 <<< 32) ||| int64 h4 let sha1HashBytes s = SHA1.sha1HashBytes s +let sha1HashInt64 s = SHA1.sha1HashInt64 s // -------------------------------------------------------------------- // diff --git a/src/absil/il.fsi b/src/absil/il.fsi index 7148b6e0ab1..e518db2d467 100644 --- a/src/absil/il.fsi +++ b/src/absil/il.fsi @@ -1955,6 +1955,7 @@ val isILTypedReferenceTy: ILType -> bool val isILDoubleTy: ILType -> bool val isILSingleTy: ILType -> bool +val sha1HashInt64 : byte[] -> int64 /// Get a public key token from a public key. val sha1HashBytes: byte[] -> byte[] (* SHA1 hash *) diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs index a41d55206bc..1be5487161c 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs @@ -1429,2943 +1429,2964 @@ type internal SR private() = /// Unmatched '{' /// (Originally from ..\FSComp.txt:442) static member parsUnmatchedBrace() = (604, GetStringFunc("parsUnmatchedBrace",",,,") ) - /// Field bindings must have the form 'id = expr;' + /// Unmatched '{|' /// (Originally from ..\FSComp.txt:443) + static member parsUnmatchedBraceBar() = (605, GetStringFunc("parsUnmatchedBraceBar",",,,") ) + /// Field bindings must have the form 'id = expr;' + /// (Originally from ..\FSComp.txt:444) static member parsFieldBinding() = (609, GetStringFunc("parsFieldBinding",",,,") ) /// This member is not permitted in an object implementation - /// (Originally from ..\FSComp.txt:444) + /// (Originally from ..\FSComp.txt:445) static member parsMemberIllegalInObjectImplementation() = (610, GetStringFunc("parsMemberIllegalInObjectImplementation",",,,") ) /// Missing function body - /// (Originally from ..\FSComp.txt:445) + /// (Originally from ..\FSComp.txt:446) static member parsMissingFunctionBody() = (611, GetStringFunc("parsMissingFunctionBody",",,,") ) /// Syntax error in labelled type argument - /// (Originally from ..\FSComp.txt:446) + /// (Originally from ..\FSComp.txt:447) static member parsSyntaxErrorInLabeledType() = (613, GetStringFunc("parsSyntaxErrorInLabeledType",",,,") ) /// Unexpected infix operator in type expression - /// (Originally from ..\FSComp.txt:447) + /// (Originally from ..\FSComp.txt:448) 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:448) + /// (Originally from ..\FSComp.txt:449) static member parsMultiArgumentGenericTypeFormDeprecated() = (GetStringFunc("parsMultiArgumentGenericTypeFormDeprecated",",,,") ) /// Invalid literal in type - /// (Originally from ..\FSComp.txt:449) + /// (Originally from ..\FSComp.txt:450) static member parsInvalidLiteralInType() = (618, GetStringFunc("parsInvalidLiteralInType",",,,") ) /// Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. - /// (Originally from ..\FSComp.txt:450) + /// (Originally from ..\FSComp.txt:451) static member parsUnexpectedOperatorForUnitOfMeasure() = (619, GetStringFunc("parsUnexpectedOperatorForUnitOfMeasure",",,,") ) /// Unexpected integer literal in unit-of-measure expression - /// (Originally from ..\FSComp.txt:451) + /// (Originally from ..\FSComp.txt:452) static member parsUnexpectedIntegerLiteralForUnitOfMeasure() = (620, GetStringFunc("parsUnexpectedIntegerLiteralForUnitOfMeasure",",,,") ) /// Syntax error: unexpected type parameter specification - /// (Originally from ..\FSComp.txt:452) + /// (Originally from ..\FSComp.txt:453) static member parsUnexpectedTypeParameter() = (621, GetStringFunc("parsUnexpectedTypeParameter",",,,") ) /// Mismatched quotation operator name, beginning with '%s' - /// (Originally from ..\FSComp.txt:453) + /// (Originally from ..\FSComp.txt:454) 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:454) + /// (Originally from ..\FSComp.txt:455) static member parsActivePatternCaseMustBeginWithUpperCase() = (623, GetStringFunc("parsActivePatternCaseMustBeginWithUpperCase",",,,") ) /// The '|' character is not permitted in active pattern case identifiers - /// (Originally from ..\FSComp.txt:455) + /// (Originally from ..\FSComp.txt:456) static member parsActivePatternCaseContainsPipe() = (624, GetStringFunc("parsActivePatternCaseContainsPipe",",,,") ) /// Denominator must not be 0 in unit-of-measure exponent - /// (Originally from ..\FSComp.txt:456) + /// (Originally from ..\FSComp.txt:457) static member parsIllegalDenominatorForMeasureExponent() = (625, GetStringFunc("parsIllegalDenominatorForMeasureExponent",",,,") ) /// No '=' symbol should follow a 'namespace' declaration - /// (Originally from ..\FSComp.txt:457) + /// (Originally from ..\FSComp.txt:458) 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:458) + /// (Originally from ..\FSComp.txt:459) 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:459) + /// (Originally from ..\FSComp.txt:460) static member parsSyntaxModuleSigEndDeprecated() = (GetStringFunc("parsSyntaxModuleSigEndDeprecated",",,,") ) /// A static field was used where an instance field is expected - /// (Originally from ..\FSComp.txt:460) + /// (Originally from ..\FSComp.txt:461) static member tcStaticFieldUsedWhenInstanceFieldExpected() = (627, GetStringFunc("tcStaticFieldUsedWhenInstanceFieldExpected",",,,") ) /// Method '%s' is not accessible from this code location - /// (Originally from ..\FSComp.txt:461) + /// (Originally from ..\FSComp.txt:462) static member tcMethodNotAccessible(a0 : System.String) = (629, GetStringFunc("tcMethodNotAccessible",",,,%s,,,") a0) /// Implicit product of measures following / - /// (Originally from ..\FSComp.txt:463) + /// (Originally from ..\FSComp.txt:464) static member tcImplicitMeasureFollowingSlash() = (632, GetStringFunc("tcImplicitMeasureFollowingSlash",",,,") ) /// Unexpected SynMeasure.Anon - /// (Originally from ..\FSComp.txt:464) + /// (Originally from ..\FSComp.txt:465) static member tcUnexpectedMeasureAnon() = (633, GetStringFunc("tcUnexpectedMeasureAnon",",,,") ) /// Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. - /// (Originally from ..\FSComp.txt:465) + /// (Originally from ..\FSComp.txt:466) static member tcNonZeroConstantCannotHaveGenericUnit() = (634, GetStringFunc("tcNonZeroConstantCannotHaveGenericUnit",",,,") ) /// In sequence expressions, results are generated using 'yield' - /// (Originally from ..\FSComp.txt:466) + /// (Originally from ..\FSComp.txt:467) static member tcSeqResultsUseYield() = (635, GetStringFunc("tcSeqResultsUseYield",",,,") ) /// Unexpected big rational constant - /// (Originally from ..\FSComp.txt:467) + /// (Originally from ..\FSComp.txt:468) static member tcUnexpectedBigRationalConstant() = (GetStringFunc("tcUnexpectedBigRationalConstant",",,,") ) /// Units-of-measure supported only on float, float32, decimal and signed integer types - /// (Originally from ..\FSComp.txt:468) + /// (Originally from ..\FSComp.txt:469) static member tcInvalidTypeForUnitsOfMeasure() = (636, GetStringFunc("tcInvalidTypeForUnitsOfMeasure",",,,") ) /// Unexpected Const_uint16array - /// (Originally from ..\FSComp.txt:469) + /// (Originally from ..\FSComp.txt:470) static member tcUnexpectedConstUint16Array() = (GetStringFunc("tcUnexpectedConstUint16Array",",,,") ) /// Unexpected Const_bytearray - /// (Originally from ..\FSComp.txt:470) + /// (Originally from ..\FSComp.txt:471) static member tcUnexpectedConstByteArray() = (GetStringFunc("tcUnexpectedConstByteArray",",,,") ) /// A parameter with attributes must also be given a name, e.g. '[] Name : Type' - /// (Originally from ..\FSComp.txt:471) + /// (Originally from ..\FSComp.txt:472) static member tcParameterRequiresName() = (640, GetStringFunc("tcParameterRequiresName",",,,") ) /// Return values cannot have names - /// (Originally from ..\FSComp.txt:472) + /// (Originally from ..\FSComp.txt:473) static member tcReturnValuesCannotHaveNames() = (641, GetStringFunc("tcReturnValuesCannotHaveNames",",,,") ) /// MemberKind.PropertyGetSet only expected in parse trees - /// (Originally from ..\FSComp.txt:473) + /// (Originally from ..\FSComp.txt:474) static member tcMemberKindPropertyGetSetNotExpected() = (GetStringFunc("tcMemberKindPropertyGetSetNotExpected",",,,") ) /// Namespaces cannot contain values. Consider using a module to hold your value declarations. - /// (Originally from ..\FSComp.txt:474) + /// (Originally from ..\FSComp.txt:475) 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:475) + /// (Originally from ..\FSComp.txt:476) static member tcNamespaceCannotContainExtensionMembers() = (644, GetStringFunc("tcNamespaceCannotContainExtensionMembers",",,,") ) /// Multiple visibility attributes have been specified for this identifier - /// (Originally from ..\FSComp.txt:476) + /// (Originally from ..\FSComp.txt:477) 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:477) + /// (Originally from ..\FSComp.txt:478) 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:478) + /// (Originally from ..\FSComp.txt:479) 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:479) + /// (Originally from ..\FSComp.txt:480) 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:480) + /// (Originally from ..\FSComp.txt:481) 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:481) + /// (Originally from ..\FSComp.txt:482) 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:482) + /// (Originally from ..\FSComp.txt:483) 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:483) + /// (Originally from ..\FSComp.txt:484) 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:484) + /// (Originally from ..\FSComp.txt:485) 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:485) + /// (Originally from ..\FSComp.txt:486) static member tcInvalidIndexOperatorDefinition(a0 : System.String) = (GetStringFunc("tcInvalidIndexOperatorDefinition",",,,%s,,,") a0) /// Expected module or namespace parent %s - /// (Originally from ..\FSComp.txt:486) + /// (Originally from ..\FSComp.txt:487) 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:487) + /// (Originally from ..\FSComp.txt:488) 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:488) + /// (Originally from ..\FSComp.txt:489) 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:489) + /// (Originally from ..\FSComp.txt:490) static member tcImplementsIStructuralComparableExplicitly(a0 : System.String) = (649, GetStringFunc("tcImplementsIStructuralComparableExplicitly",",,,%s,,,") a0) /// This record contains fields from inconsistent types - /// (Originally from ..\FSComp.txt:490) + /// (Originally from ..\FSComp.txt:491) static member tcRecordFieldInconsistentTypes() = (656, GetStringFunc("tcRecordFieldInconsistentTypes",",,,") ) /// DLLImport stubs cannot be inlined - /// (Originally from ..\FSComp.txt:491) + /// (Originally from ..\FSComp.txt:492) static member tcDllImportStubsCannotBeInlined() = (657, GetStringFunc("tcDllImportStubsCannotBeInlined",",,,") ) /// Structs may only bind a 'this' parameter at member declarations - /// (Originally from ..\FSComp.txt:492) + /// (Originally from ..\FSComp.txt:493) static member tcStructsCanOnlyBindThisAtMemberDeclaration() = (658, GetStringFunc("tcStructsCanOnlyBindThisAtMemberDeclaration",",,,") ) /// Unexpected expression at recursive inference point - /// (Originally from ..\FSComp.txt:493) + /// (Originally from ..\FSComp.txt:494) 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:494) + /// (Originally from ..\FSComp.txt:495) 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:495) + /// (Originally from ..\FSComp.txt:496) 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:496) + /// (Originally from ..\FSComp.txt:497) 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:497) + /// (Originally from ..\FSComp.txt:498) 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:498) + /// (Originally from ..\FSComp.txt:499) static member tcTypeParametersInferredAreNotStable() = (664, GetStringFunc("tcTypeParametersInferredAreNotStable",",,,") ) /// Explicit type parameters may only be used on module or member bindings - /// (Originally from ..\FSComp.txt:499) + /// (Originally from ..\FSComp.txt:500) 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:500) + /// (Originally from ..\FSComp.txt:501) 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:501) + /// (Originally from ..\FSComp.txt:502) static member tcFieldsDoNotDetermineUniqueRecordType() = (667, GetStringFunc("tcFieldsDoNotDetermineUniqueRecordType",",,,") ) /// The field '%s' appears twice in this record expression or pattern - /// (Originally from ..\FSComp.txt:502) + /// (Originally from ..\FSComp.txt:503) static member tcFieldAppearsTwiceInRecord(a0 : System.String) = (668, GetStringFunc("tcFieldAppearsTwiceInRecord",",,,%s,,,") a0) /// Unknown union case - /// (Originally from ..\FSComp.txt:503) + /// (Originally from ..\FSComp.txt:504) 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:504) + /// (Originally from ..\FSComp.txt:505) 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:505) + /// (Originally from ..\FSComp.txt:506) static member tcPropertyRequiresExplicitTypeParameters() = (671, GetStringFunc("tcPropertyRequiresExplicitTypeParameters",",,,") ) /// A constructor cannot have explicit type parameters. Consider using a static construction method instead. - /// (Originally from ..\FSComp.txt:506) + /// (Originally from ..\FSComp.txt:507) 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:507) + /// (Originally from ..\FSComp.txt:508) static member tcInstanceMemberRequiresTarget() = (673, GetStringFunc("tcInstanceMemberRequiresTarget",",,,") ) /// Unexpected source-level property specification in syntax tree - /// (Originally from ..\FSComp.txt:508) + /// (Originally from ..\FSComp.txt:509) static member tcUnexpectedPropertyInSyntaxTree() = (674, GetStringFunc("tcUnexpectedPropertyInSyntaxTree",",,,") ) /// A static initializer requires an argument - /// (Originally from ..\FSComp.txt:509) + /// (Originally from ..\FSComp.txt:510) static member tcStaticInitializerRequiresArgument() = (675, GetStringFunc("tcStaticInitializerRequiresArgument",",,,") ) /// An object constructor requires an argument - /// (Originally from ..\FSComp.txt:510) + /// (Originally from ..\FSComp.txt:511) 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:511) + /// (Originally from ..\FSComp.txt:512) static member tcStaticMemberShouldNotHaveThis() = (677, GetStringFunc("tcStaticMemberShouldNotHaveThis",",,,") ) /// An explicit static initializer should use the syntax 'static new(args) = expr' - /// (Originally from ..\FSComp.txt:512) + /// (Originally from ..\FSComp.txt:513) static member tcExplicitStaticInitializerSyntax() = (678, GetStringFunc("tcExplicitStaticInitializerSyntax",",,,") ) /// An explicit object constructor should use the syntax 'new(args) = expr' - /// (Originally from ..\FSComp.txt:513) + /// (Originally from ..\FSComp.txt:514) static member tcExplicitObjectConstructorSyntax() = (679, GetStringFunc("tcExplicitObjectConstructorSyntax",",,,") ) /// Unexpected source-level property specification - /// (Originally from ..\FSComp.txt:514) + /// (Originally from ..\FSComp.txt:515) 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:515) + /// (Originally from ..\FSComp.txt:516) static member tcObjectExpressionFormDeprecated() = (GetStringFunc("tcObjectExpressionFormDeprecated",",,,") ) /// Invalid declaration - /// (Originally from ..\FSComp.txt:516) + /// (Originally from ..\FSComp.txt:517) static member tcInvalidDeclaration() = (682, GetStringFunc("tcInvalidDeclaration",",,,") ) /// Attributes are not allowed within patterns - /// (Originally from ..\FSComp.txt:517) + /// (Originally from ..\FSComp.txt:518) static member tcAttributesInvalidInPatterns() = (683, GetStringFunc("tcAttributesInvalidInPatterns",",,,") ) /// The generic function '%s' must be given explicit type argument(s) - /// (Originally from ..\FSComp.txt:518) + /// (Originally from ..\FSComp.txt:519) 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:519) + /// (Originally from ..\FSComp.txt:520) 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:520) + /// (Originally from ..\FSComp.txt:521) 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:521) + /// (Originally from ..\FSComp.txt:522) static member tcDefaultStructConstructorCall() = (688, GetStringFunc("tcDefaultStructConstructorCall",",,,") ) /// Couldn't find Dispose on IDisposable, or it was overloaded - /// (Originally from ..\FSComp.txt:522) + /// (Originally from ..\FSComp.txt:523) static member tcCouldNotFindIDisposable() = (GetStringFunc("tcCouldNotFindIDisposable",",,,") ) /// This value is not a literal and cannot be used in a pattern - /// (Originally from ..\FSComp.txt:523) + /// (Originally from ..\FSComp.txt:524) static member tcNonLiteralCannotBeUsedInPattern() = (689, GetStringFunc("tcNonLiteralCannotBeUsedInPattern",",,,") ) /// This field is readonly - /// (Originally from ..\FSComp.txt:524) + /// (Originally from ..\FSComp.txt:525) static member tcFieldIsReadonly() = (690, GetStringFunc("tcFieldIsReadonly",",,,") ) /// Named arguments must appear after all other arguments - /// (Originally from ..\FSComp.txt:525) + /// (Originally from ..\FSComp.txt:526) 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:526) + /// (Originally from ..\FSComp.txt:527) 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:527) + /// (Originally from ..\FSComp.txt:528) 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:528) + /// (Originally from ..\FSComp.txt:529) 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:529) + /// (Originally from ..\FSComp.txt:530) static member tcInvalidObjectConstructionExpression() = (696, GetStringFunc("tcInvalidObjectConstructionExpression",",,,") ) /// Invalid constraint - /// (Originally from ..\FSComp.txt:530) + /// (Originally from ..\FSComp.txt:531) 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:531) + /// (Originally from ..\FSComp.txt:532) static member tcInvalidConstraintTypeSealed() = (698, GetStringFunc("tcInvalidConstraintTypeSealed",",,,") ) /// An 'enum' constraint must be of the form 'enum' - /// (Originally from ..\FSComp.txt:532) + /// (Originally from ..\FSComp.txt:533) static member tcInvalidEnumConstraint() = (699, GetStringFunc("tcInvalidEnumConstraint",",,,") ) /// 'new' constraints must take one argument of type 'unit' and return the constructed type - /// (Originally from ..\FSComp.txt:533) + /// (Originally from ..\FSComp.txt:534) 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:534) + /// (Originally from ..\FSComp.txt:535) 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:535) + /// (Originally from ..\FSComp.txt:536) static member tcExpectedUnitOfMeasureMarkWithAttribute() = (702, GetStringFunc("tcExpectedUnitOfMeasureMarkWithAttribute",",,,") ) /// Expected type parameter, not unit-of-measure parameter - /// (Originally from ..\FSComp.txt:536) + /// (Originally from ..\FSComp.txt:537) static member tcExpectedTypeParameter() = (703, GetStringFunc("tcExpectedTypeParameter",",,,") ) /// Expected type, not unit-of-measure - /// (Originally from ..\FSComp.txt:537) + /// (Originally from ..\FSComp.txt:538) static member tcExpectedTypeNotUnitOfMeasure() = (704, GetStringFunc("tcExpectedTypeNotUnitOfMeasure",",,,") ) /// Expected unit-of-measure, not type - /// (Originally from ..\FSComp.txt:538) + /// (Originally from ..\FSComp.txt:539) 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:539) + /// (Originally from ..\FSComp.txt:540) static member tcInvalidUnitsOfMeasurePrefix() = (706, GetStringFunc("tcInvalidUnitsOfMeasurePrefix",",,,") ) /// Unit-of-measure cannot be used in type constructor application - /// (Originally from ..\FSComp.txt:540) + /// (Originally from ..\FSComp.txt:541) 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:541) + /// (Originally from ..\FSComp.txt:542) static member tcRequireBuilderMethod(a0 : System.String) = (708, GetStringFunc("tcRequireBuilderMethod",",,,%s,,,") a0) /// This type has no nested types - /// (Originally from ..\FSComp.txt:542) + /// (Originally from ..\FSComp.txt:543) static member tcTypeHasNoNestedTypes() = (709, GetStringFunc("tcTypeHasNoNestedTypes",",,,") ) /// Unexpected %s in type expression - /// (Originally from ..\FSComp.txt:543) + /// (Originally from ..\FSComp.txt:544) static member tcUnexpectedSymbolInTypeExpression(a0 : System.String) = (711, GetStringFunc("tcUnexpectedSymbolInTypeExpression",",,,%s,,,") a0) /// Type parameter cannot be used as type constructor - /// (Originally from ..\FSComp.txt:544) + /// (Originally from ..\FSComp.txt:545) static member tcTypeParameterInvalidAsTypeConstructor() = (712, GetStringFunc("tcTypeParameterInvalidAsTypeConstructor",",,,") ) /// Illegal syntax in type expression - /// (Originally from ..\FSComp.txt:545) + /// (Originally from ..\FSComp.txt:546) static member tcIllegalSyntaxInTypeExpression() = (713, GetStringFunc("tcIllegalSyntaxInTypeExpression",",,,") ) /// Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression - /// (Originally from ..\FSComp.txt:546) + /// (Originally from ..\FSComp.txt:547) static member tcAnonymousUnitsOfMeasureCannotBeNested() = (714, GetStringFunc("tcAnonymousUnitsOfMeasureCannotBeNested",",,,") ) /// Anonymous type variables are not permitted in this declaration - /// (Originally from ..\FSComp.txt:547) + /// (Originally from ..\FSComp.txt:548) static member tcAnonymousTypeInvalidInDeclaration() = (715, GetStringFunc("tcAnonymousTypeInvalidInDeclaration",",,,") ) /// Unexpected / in type - /// (Originally from ..\FSComp.txt:548) + /// (Originally from ..\FSComp.txt:549) static member tcUnexpectedSlashInType() = (716, GetStringFunc("tcUnexpectedSlashInType",",,,") ) /// Unexpected type arguments - /// (Originally from ..\FSComp.txt:549) + /// (Originally from ..\FSComp.txt:550) static member tcUnexpectedTypeArguments() = (717, GetStringFunc("tcUnexpectedTypeArguments",",,,") ) /// Optional arguments are only permitted on type members - /// (Originally from ..\FSComp.txt:550) + /// (Originally from ..\FSComp.txt:551) static member tcOptionalArgsOnlyOnMembers() = (718, GetStringFunc("tcOptionalArgsOnlyOnMembers",",,,") ) /// Name '%s' not bound in pattern context - /// (Originally from ..\FSComp.txt:551) + /// (Originally from ..\FSComp.txt:552) 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:552) + /// (Originally from ..\FSComp.txt:553) static member tcInvalidNonPrimitiveLiteralInPatternMatch() = (720, GetStringFunc("tcInvalidNonPrimitiveLiteralInPatternMatch",",,,") ) /// Type arguments cannot be specified here - /// (Originally from ..\FSComp.txt:553) + /// (Originally from ..\FSComp.txt:554) static member tcInvalidTypeArgumentUsage() = (721, GetStringFunc("tcInvalidTypeArgumentUsage",",,,") ) /// Only active patterns returning exactly one result may accept arguments - /// (Originally from ..\FSComp.txt:554) + /// (Originally from ..\FSComp.txt:555) static member tcRequireActivePatternWithOneResult() = (722, GetStringFunc("tcRequireActivePatternWithOneResult",",,,") ) /// Invalid argument to parameterized pattern label - /// (Originally from ..\FSComp.txt:555) + /// (Originally from ..\FSComp.txt:556) static member tcInvalidArgForParameterizedPattern() = (723, GetStringFunc("tcInvalidArgForParameterizedPattern",",,,") ) /// Internal error. Invalid index into active pattern array - /// (Originally from ..\FSComp.txt:556) + /// (Originally from ..\FSComp.txt:557) static member tcInvalidIndexIntoActivePatternArray() = (724, GetStringFunc("tcInvalidIndexIntoActivePatternArray",",,,") ) /// This union case does not take arguments - /// (Originally from ..\FSComp.txt:557) + /// (Originally from ..\FSComp.txt:558) static member tcUnionCaseDoesNotTakeArguments() = (725, GetStringFunc("tcUnionCaseDoesNotTakeArguments",",,,") ) /// This union case takes one argument - /// (Originally from ..\FSComp.txt:558) + /// (Originally from ..\FSComp.txt:559) static member tcUnionCaseRequiresOneArgument() = (726, GetStringFunc("tcUnionCaseRequiresOneArgument",",,,") ) /// This union case expects %d arguments in tupled form - /// (Originally from ..\FSComp.txt:559) + /// (Originally from ..\FSComp.txt:560) static member tcUnionCaseExpectsTupledArguments(a0 : System.Int32) = (727, GetStringFunc("tcUnionCaseExpectsTupledArguments",",,,%d,,,") a0) /// Field '%s' is not static - /// (Originally from ..\FSComp.txt:560) + /// (Originally from ..\FSComp.txt:561) 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:561) + /// (Originally from ..\FSComp.txt:562) static member tcFieldNotLiteralCannotBeUsedInPattern() = (729, GetStringFunc("tcFieldNotLiteralCannotBeUsedInPattern",",,,") ) /// This is not a variable, constant, active recognizer or literal - /// (Originally from ..\FSComp.txt:562) + /// (Originally from ..\FSComp.txt:563) static member tcRequireVarConstRecogOrLiteral() = (730, GetStringFunc("tcRequireVarConstRecogOrLiteral",",,,") ) /// This is not a valid pattern - /// (Originally from ..\FSComp.txt:563) + /// (Originally from ..\FSComp.txt:564) 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:564) + /// (Originally from ..\FSComp.txt:565) static member tcUseWhenPatternGuard() = (GetStringFunc("tcUseWhenPatternGuard",",,,") ) /// Illegal pattern - /// (Originally from ..\FSComp.txt:565) + /// (Originally from ..\FSComp.txt:566) static member tcIllegalPattern() = (733, GetStringFunc("tcIllegalPattern",",,,") ) /// Syntax error - unexpected '?' symbol - /// (Originally from ..\FSComp.txt:566) + /// (Originally from ..\FSComp.txt:567) static member tcSyntaxErrorUnexpectedQMark() = (734, GetStringFunc("tcSyntaxErrorUnexpectedQMark",",,,") ) /// Expected %d expressions, got %d - /// (Originally from ..\FSComp.txt:567) + /// (Originally from ..\FSComp.txt:568) static member tcExpressionCountMisMatch(a0 : System.Int32, a1 : System.Int32) = (735, GetStringFunc("tcExpressionCountMisMatch",",,,%d,,,%d,,,") a0 a1) /// TcExprUndelayed: delayed - /// (Originally from ..\FSComp.txt:568) + /// (Originally from ..\FSComp.txt:569) static member tcExprUndelayed() = (736, GetStringFunc("tcExprUndelayed",",,,") ) /// This expression form may only be used in sequence and computation expressions - /// (Originally from ..\FSComp.txt:569) + /// (Originally from ..\FSComp.txt:570) 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:570) + /// (Originally from ..\FSComp.txt:571) static member tcInvalidObjectExpressionSyntaxForm() = (738, GetStringFunc("tcInvalidObjectExpressionSyntaxForm",",,,") ) /// Invalid object, sequence or record expression - /// (Originally from ..\FSComp.txt:571) + /// (Originally from ..\FSComp.txt:572) static member tcInvalidObjectSequenceOrRecordExpression() = (739, GetStringFunc("tcInvalidObjectSequenceOrRecordExpression",",,,") ) /// Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }' - /// (Originally from ..\FSComp.txt:572) + /// (Originally from ..\FSComp.txt:573) 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:573) + /// (Originally from ..\FSComp.txt:574) static member tcExpressionWithIfRequiresParenthesis() = (GetStringFunc("tcExpressionWithIfRequiresParenthesis",",,,") ) /// Unable to parse format string '%s' - /// (Originally from ..\FSComp.txt:574) + /// (Originally from ..\FSComp.txt:575) 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:575) + /// (Originally from ..\FSComp.txt:576) 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:576) + /// (Originally from ..\FSComp.txt:577) static member tcExpressionFormRequiresObjectConstructor() = (743, GetStringFunc("tcExpressionFormRequiresObjectConstructor",",,,") ) /// Named arguments cannot be given to member trait calls - /// (Originally from ..\FSComp.txt:577) + /// (Originally from ..\FSComp.txt:578) static member tcNamedArgumentsCannotBeUsedInMemberTraits() = (744, GetStringFunc("tcNamedArgumentsCannotBeUsedInMemberTraits",",,,") ) /// This is not a valid name for an enumeration case - /// (Originally from ..\FSComp.txt:578) + /// (Originally from ..\FSComp.txt:579) static member tcNotValidEnumCaseName() = (745, GetStringFunc("tcNotValidEnumCaseName",",,,") ) /// This field is not mutable - /// (Originally from ..\FSComp.txt:579) + /// (Originally from ..\FSComp.txt:580) 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:580) + /// (Originally from ..\FSComp.txt:581) 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:581) + /// (Originally from ..\FSComp.txt:582) static member tcConstructRequiresComputationExpressions() = (748, GetStringFunc("tcConstructRequiresComputationExpressions",",,,") ) /// This construct may only be used within sequence or computation expressions - /// (Originally from ..\FSComp.txt:582) + /// (Originally from ..\FSComp.txt:583) static member tcConstructRequiresSequenceOrComputations() = (749, GetStringFunc("tcConstructRequiresSequenceOrComputations",",,,") ) /// This construct may only be used within computation expressions - /// (Originally from ..\FSComp.txt:583) + /// (Originally from ..\FSComp.txt:584) static member tcConstructRequiresComputationExpression() = (750, GetStringFunc("tcConstructRequiresComputationExpression",",,,") ) /// Invalid indexer expression - /// (Originally from ..\FSComp.txt:584) + /// (Originally from ..\FSComp.txt:585) 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:585) + /// (Originally from ..\FSComp.txt:586) static member tcObjectOfIndeterminateTypeUsedRequireTypeConstraint() = (752, GetStringFunc("tcObjectOfIndeterminateTypeUsedRequireTypeConstraint",",,,") ) /// Cannot inherit from a variable type - /// (Originally from ..\FSComp.txt:586) + /// (Originally from ..\FSComp.txt:587) static member tcCannotInheritFromVariableType() = (753, GetStringFunc("tcCannotInheritFromVariableType",",,,") ) /// Calls to object constructors on type parameters cannot be given arguments - /// (Originally from ..\FSComp.txt:587) + /// (Originally from ..\FSComp.txt:588) static member tcObjectConstructorsOnTypeParametersCannotTakeArguments() = (754, GetStringFunc("tcObjectConstructorsOnTypeParametersCannotTakeArguments",",,,") ) /// The 'CompiledName' attribute cannot be used with this language element - /// (Originally from ..\FSComp.txt:588) + /// (Originally from ..\FSComp.txt:589) static member tcCompiledNameAttributeMisused() = (755, GetStringFunc("tcCompiledNameAttributeMisused",",,,") ) /// '%s' may only be used with named types - /// (Originally from ..\FSComp.txt:589) + /// (Originally from ..\FSComp.txt:590) 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:590) + /// (Originally from ..\FSComp.txt:591) 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:591) + /// (Originally from ..\FSComp.txt:592) 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:592) + /// (Originally from ..\FSComp.txt:593) 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:593) + /// (Originally from ..\FSComp.txt:594) static member tcIDisposableTypeShouldUseNew() = (760, GetStringFunc("tcIDisposableTypeShouldUseNew",",,,") ) /// '%s' may only be used to construct object types - /// (Originally from ..\FSComp.txt:594) + /// (Originally from ..\FSComp.txt:595) 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:595) + /// (Originally from ..\FSComp.txt:596) 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:596) + /// (Originally from ..\FSComp.txt:597) 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:597) + /// (Originally from ..\FSComp.txt:598) 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:598) + /// (Originally from ..\FSComp.txt:599) static member tcExtraneousFieldsGivenValues() = (765, GetStringFunc("tcExtraneousFieldsGivenValues",",,,") ) /// Only overrides of abstract and virtual members may be specified in object expressions - /// (Originally from ..\FSComp.txt:599) + /// (Originally from ..\FSComp.txt:600) 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:600) + /// (Originally from ..\FSComp.txt:601) 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:601) + /// (Originally from ..\FSComp.txt:602) 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:602) + /// (Originally from ..\FSComp.txt:603) 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:603) + /// (Originally from ..\FSComp.txt:604) 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:604) + /// (Originally from ..\FSComp.txt:605) 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:605) + /// (Originally from ..\FSComp.txt:606) static member tcPredefinedTypeCannotBeUsedAsSuperType() = (771, GetStringFunc("tcPredefinedTypeCannotBeUsedAsSuperType",",,,") ) /// 'new' must be used with a named type - /// (Originally from ..\FSComp.txt:606) + /// (Originally from ..\FSComp.txt:607) static member tcNewMustBeUsedWithNamedType() = (772, GetStringFunc("tcNewMustBeUsedWithNamedType",",,,") ) /// Cannot create an extension of a sealed type - /// (Originally from ..\FSComp.txt:607) + /// (Originally from ..\FSComp.txt:608) static member tcCannotCreateExtensionOfSealedType() = (773, GetStringFunc("tcCannotCreateExtensionOfSealedType",",,,") ) /// No arguments may be given when constructing a record value - /// (Originally from ..\FSComp.txt:608) + /// (Originally from ..\FSComp.txt:609) static member tcNoArgumentsForRecordValue() = (774, GetStringFunc("tcNoArgumentsForRecordValue",",,,") ) /// Interface implementations cannot be given on construction expressions - /// (Originally from ..\FSComp.txt:609) + /// (Originally from ..\FSComp.txt:610) static member tcNoInterfaceImplementationForConstructionExpression() = (775, GetStringFunc("tcNoInterfaceImplementationForConstructionExpression",",,,") ) /// Object construction expressions may only be used to implement constructors in class types - /// (Originally from ..\FSComp.txt:610) + /// (Originally from ..\FSComp.txt:611) static member tcObjectConstructionCanOnlyBeUsedInClassTypes() = (776, GetStringFunc("tcObjectConstructionCanOnlyBeUsedInClassTypes",",,,") ) /// Only simple bindings of the form 'id = expr' can be used in construction expressions - /// (Originally from ..\FSComp.txt:611) + /// (Originally from ..\FSComp.txt:612) 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:612) + /// (Originally from ..\FSComp.txt:613) static member tcObjectsMustBeInitializedWithObjectExpression() = (778, GetStringFunc("tcObjectsMustBeInitializedWithObjectExpression",",,,") ) /// Expected an interface type - /// (Originally from ..\FSComp.txt:613) + /// (Originally from ..\FSComp.txt:614) static member tcExpectedInterfaceType() = (779, GetStringFunc("tcExpectedInterfaceType",",,,") ) /// Constructor expressions for interfaces do not take arguments - /// (Originally from ..\FSComp.txt:614) + /// (Originally from ..\FSComp.txt:615) static member tcConstructorForInterfacesDoNotTakeArguments() = (780, GetStringFunc("tcConstructorForInterfacesDoNotTakeArguments",",,,") ) /// This object constructor requires arguments - /// (Originally from ..\FSComp.txt:615) + /// (Originally from ..\FSComp.txt:616) static member tcConstructorRequiresArguments() = (781, GetStringFunc("tcConstructorRequiresArguments",",,,") ) /// 'new' may only be used with object constructors - /// (Originally from ..\FSComp.txt:616) + /// (Originally from ..\FSComp.txt:617) static member tcNewRequiresObjectConstructor() = (782, GetStringFunc("tcNewRequiresObjectConstructor",",,,") ) /// At least one override did not correctly implement its corresponding abstract member - /// (Originally from ..\FSComp.txt:617) + /// (Originally from ..\FSComp.txt:618) 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:618) + /// (Originally from ..\FSComp.txt:619) static member tcNumericLiteralRequiresModule(a0 : System.String) = (784, GetStringFunc("tcNumericLiteralRequiresModule",",,,%s,,,") a0) /// Invalid record construction - /// (Originally from ..\FSComp.txt:619) + /// (Originally from ..\FSComp.txt:620) 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:620) + /// (Originally from ..\FSComp.txt:621) static member tcExpressionFormRequiresRecordTypes() = (786, GetStringFunc("tcExpressionFormRequiresRecordTypes",",,,") ) /// The inherited type is not an object model type - /// (Originally from ..\FSComp.txt:621) + /// (Originally from ..\FSComp.txt:622) 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:622) + /// (Originally from ..\FSComp.txt:623) 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:623) + /// (Originally from ..\FSComp.txt:624) 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:624) + /// (Originally from ..\FSComp.txt:625) static member tcTypeIsNotARecordTypeNeedConstructor() = (790, GetStringFunc("tcTypeIsNotARecordTypeNeedConstructor",",,,") ) /// This type is not a record type - /// (Originally from ..\FSComp.txt:625) + /// (Originally from ..\FSComp.txt:626) 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:626) + /// (Originally from ..\FSComp.txt:627) 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:627) + /// (Originally from ..\FSComp.txt:628) static member tcConstructIsAmbiguousInSequenceExpression() = (793, GetStringFunc("tcConstructIsAmbiguousInSequenceExpression",",,,") ) /// 'do!' cannot be used within sequence expressions - /// (Originally from ..\FSComp.txt:628) + /// (Originally from ..\FSComp.txt:629) 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:629) + /// (Originally from ..\FSComp.txt:630) static member tcUseForInSequenceExpression() = (795, GetStringFunc("tcUseForInSequenceExpression",",,,") ) /// 'try'/'with' cannot be used within sequence expressions - /// (Originally from ..\FSComp.txt:630) + /// (Originally from ..\FSComp.txt:631) static member tcTryIllegalInSequenceExpression() = (796, GetStringFunc("tcTryIllegalInSequenceExpression",",,,") ) /// In sequence expressions, multiple results are generated using 'yield!' - /// (Originally from ..\FSComp.txt:631) + /// (Originally from ..\FSComp.txt:632) static member tcUseYieldBangForMultipleResults() = (797, GetStringFunc("tcUseYieldBangForMultipleResults",",,,") ) /// Invalid assignment - /// (Originally from ..\FSComp.txt:632) + /// (Originally from ..\FSComp.txt:633) static member tcInvalidAssignment() = (799, GetStringFunc("tcInvalidAssignment",",,,") ) /// Invalid use of a type name - /// (Originally from ..\FSComp.txt:633) + /// (Originally from ..\FSComp.txt:634) static member tcInvalidUseOfTypeName() = (800, GetStringFunc("tcInvalidUseOfTypeName",",,,") ) /// This type has no accessible object constructors - /// (Originally from ..\FSComp.txt:634) + /// (Originally from ..\FSComp.txt:635) static member tcTypeHasNoAccessibleConstructor() = (801, GetStringFunc("tcTypeHasNoAccessibleConstructor",",,,") ) /// Invalid use of an interface type - /// (Originally from ..\FSComp.txt:637) + /// (Originally from ..\FSComp.txt:638) 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:638) + /// (Originally from ..\FSComp.txt:639) static member tcInvalidUseOfDelegate() = (805, GetStringFunc("tcInvalidUseOfDelegate",",,,") ) /// Property '%s' is not static - /// (Originally from ..\FSComp.txt:639) + /// (Originally from ..\FSComp.txt:640) static member tcPropertyIsNotStatic(a0 : System.String) = (806, GetStringFunc("tcPropertyIsNotStatic",",,,%s,,,") a0) /// Property '%s' is not readable - /// (Originally from ..\FSComp.txt:640) + /// (Originally from ..\FSComp.txt:641) static member tcPropertyIsNotReadable(a0 : System.String) = (807, GetStringFunc("tcPropertyIsNotReadable",",,,%s,,,") a0) /// This lookup cannot be used here - /// (Originally from ..\FSComp.txt:641) + /// (Originally from ..\FSComp.txt:642) static member tcLookupMayNotBeUsedHere() = (808, GetStringFunc("tcLookupMayNotBeUsedHere",",,,") ) /// Property '%s' is static - /// (Originally from ..\FSComp.txt:642) + /// (Originally from ..\FSComp.txt:643) static member tcPropertyIsStatic(a0 : System.String) = (809, GetStringFunc("tcPropertyIsStatic",",,,%s,,,") a0) /// Property '%s' cannot be set - /// (Originally from ..\FSComp.txt:643) + /// (Originally from ..\FSComp.txt:644) 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:644) + /// (Originally from ..\FSComp.txt:645) static member tcConstructorsCannotBeFirstClassValues() = (811, GetStringFunc("tcConstructorsCannotBeFirstClassValues",",,,") ) /// The syntax 'expr.id' may only be used with record labels, properties and fields - /// (Originally from ..\FSComp.txt:645) + /// (Originally from ..\FSComp.txt:646) static member tcSyntaxFormUsedOnlyWithRecordLabelsPropertiesAndFields() = (812, GetStringFunc("tcSyntaxFormUsedOnlyWithRecordLabelsPropertiesAndFields",",,,") ) /// Event '%s' is static - /// (Originally from ..\FSComp.txt:646) + /// (Originally from ..\FSComp.txt:647) static member tcEventIsStatic(a0 : System.String) = (813, GetStringFunc("tcEventIsStatic",",,,%s,,,") a0) /// Event '%s' is not static - /// (Originally from ..\FSComp.txt:647) + /// (Originally from ..\FSComp.txt:648) 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:648) + /// (Originally from ..\FSComp.txt:649) 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:649) + /// (Originally from ..\FSComp.txt:650) 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:650) + /// (Originally from ..\FSComp.txt:651) static member tcUnnamedArgumentsDoNotFormPrefix() = (GetStringFunc("tcUnnamedArgumentsDoNotFormPrefix",",,,") ) /// Static optimization conditionals are only for use within the F# library - /// (Originally from ..\FSComp.txt:651) + /// (Originally from ..\FSComp.txt:652) static member tcStaticOptimizationConditionalsOnlyForFSharpLibrary() = (817, GetStringFunc("tcStaticOptimizationConditionalsOnlyForFSharpLibrary",",,,") ) /// The corresponding formal argument is not optional - /// (Originally from ..\FSComp.txt:652) + /// (Originally from ..\FSComp.txt:653) static member tcFormalArgumentIsNotOptional() = (818, GetStringFunc("tcFormalArgumentIsNotOptional",",,,") ) /// Invalid optional assignment to a property or field - /// (Originally from ..\FSComp.txt:653) + /// (Originally from ..\FSComp.txt:654) static member tcInvalidOptionalAssignmentToPropertyOrField() = (819, GetStringFunc("tcInvalidOptionalAssignmentToPropertyOrField",",,,") ) /// A delegate constructor must be passed a single function value - /// (Originally from ..\FSComp.txt:654) + /// (Originally from ..\FSComp.txt:655) static member tcDelegateConstructorMustBePassed() = (820, GetStringFunc("tcDelegateConstructorMustBePassed",",,,") ) /// A binding cannot be marked both 'use' and 'rec' - /// (Originally from ..\FSComp.txt:655) + /// (Originally from ..\FSComp.txt:656) static member tcBindingCannotBeUseAndRec() = (821, GetStringFunc("tcBindingCannotBeUseAndRec",",,,") ) /// The 'VolatileField' attribute may only be used on 'let' bindings in classes - /// (Originally from ..\FSComp.txt:656) + /// (Originally from ..\FSComp.txt:657) static member tcVolatileOnlyOnClassLetBindings() = (823, GetStringFunc("tcVolatileOnlyOnClassLetBindings",",,,") ) /// Attributes are not permitted on 'let' bindings in expressions - /// (Originally from ..\FSComp.txt:657) + /// (Originally from ..\FSComp.txt:658) static member tcAttributesAreNotPermittedOnLetBindings() = (824, GetStringFunc("tcAttributesAreNotPermittedOnLetBindings",",,,") ) /// The 'DefaultValue' attribute may only be used on 'val' declarations - /// (Originally from ..\FSComp.txt:658) + /// (Originally from ..\FSComp.txt:659) static member tcDefaultValueAttributeRequiresVal() = (825, GetStringFunc("tcDefaultValueAttributeRequiresVal",",,,") ) /// The 'ConditionalAttribute' attribute may only be used on members - /// (Originally from ..\FSComp.txt:659) + /// (Originally from ..\FSComp.txt:660) static member tcConditionalAttributeRequiresMembers() = (826, GetStringFunc("tcConditionalAttributeRequiresMembers",",,,") ) /// This is not a valid name for an active pattern - /// (Originally from ..\FSComp.txt:660) + /// (Originally from ..\FSComp.txt:661) static member tcInvalidActivePatternName() = (827, GetStringFunc("tcInvalidActivePatternName",",,,") ) /// The 'EntryPointAttribute' attribute may only be used on function definitions in modules - /// (Originally from ..\FSComp.txt:661) + /// (Originally from ..\FSComp.txt:662) static member tcEntryPointAttributeRequiresFunctionInModule() = (828, GetStringFunc("tcEntryPointAttributeRequiresFunctionInModule",",,,") ) /// Mutable values cannot be marked 'inline' - /// (Originally from ..\FSComp.txt:662) + /// (Originally from ..\FSComp.txt:663) static member tcMutableValuesCannotBeInline() = (829, GetStringFunc("tcMutableValuesCannotBeInline",",,,") ) /// Mutable values cannot have generic parameters - /// (Originally from ..\FSComp.txt:663) + /// (Originally from ..\FSComp.txt:664) static member tcMutableValuesMayNotHaveGenericParameters() = (830, GetStringFunc("tcMutableValuesMayNotHaveGenericParameters",",,,") ) /// Mutable function values should be written 'let mutable f = (fun args -> ...)' - /// (Originally from ..\FSComp.txt:664) + /// (Originally from ..\FSComp.txt:665) static member tcMutableValuesSyntax() = (831, GetStringFunc("tcMutableValuesSyntax",",,,") ) /// Only functions may be marked 'inline' - /// (Originally from ..\FSComp.txt:665) + /// (Originally from ..\FSComp.txt:666) static member tcOnlyFunctionsCanBeInline() = (832, GetStringFunc("tcOnlyFunctionsCanBeInline",",,,") ) /// A literal value cannot be given the [] or [] attributes - /// (Originally from ..\FSComp.txt:666) + /// (Originally from ..\FSComp.txt:667) static member tcIllegalAttributesForLiteral() = (833, GetStringFunc("tcIllegalAttributesForLiteral",",,,") ) /// A literal value cannot be marked 'mutable' - /// (Originally from ..\FSComp.txt:667) + /// (Originally from ..\FSComp.txt:668) static member tcLiteralCannotBeMutable() = (834, GetStringFunc("tcLiteralCannotBeMutable",",,,") ) /// A literal value cannot be marked 'inline' - /// (Originally from ..\FSComp.txt:668) + /// (Originally from ..\FSComp.txt:669) static member tcLiteralCannotBeInline() = (835, GetStringFunc("tcLiteralCannotBeInline",",,,") ) /// Literal values cannot have generic parameters - /// (Originally from ..\FSComp.txt:669) + /// (Originally from ..\FSComp.txt:670) static member tcLiteralCannotHaveGenericParameters() = (836, GetStringFunc("tcLiteralCannotHaveGenericParameters",",,,") ) /// This is not a valid constant expression - /// (Originally from ..\FSComp.txt:670) + /// (Originally from ..\FSComp.txt:671) static member tcInvalidConstantExpression() = (837, GetStringFunc("tcInvalidConstantExpression",",,,") ) /// This type is not accessible from this code location - /// (Originally from ..\FSComp.txt:671) + /// (Originally from ..\FSComp.txt:672) static member tcTypeIsInaccessible() = (838, GetStringFunc("tcTypeIsInaccessible",",,,") ) /// Unexpected condition in imported assembly: failed to decode AttributeUsage attribute - /// (Originally from ..\FSComp.txt:672) + /// (Originally from ..\FSComp.txt:673) 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:673) + /// (Originally from ..\FSComp.txt:674) 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:674) + /// (Originally from ..\FSComp.txt:675) static member tcAttributeIsNotValidForLanguageElementUseDo() = (841, GetStringFunc("tcAttributeIsNotValidForLanguageElementUseDo",",,,") ) /// This attribute is not valid for use on this language element - /// (Originally from ..\FSComp.txt:675) + /// (Originally from ..\FSComp.txt:676) static member tcAttributeIsNotValidForLanguageElement() = (842, GetStringFunc("tcAttributeIsNotValidForLanguageElement",",,,") ) /// Optional arguments cannot be used in custom attributes - /// (Originally from ..\FSComp.txt:676) + /// (Originally from ..\FSComp.txt:677) static member tcOptionalArgumentsCannotBeUsedInCustomAttribute() = (843, GetStringFunc("tcOptionalArgumentsCannotBeUsedInCustomAttribute",",,,") ) /// This property cannot be set - /// (Originally from ..\FSComp.txt:677) + /// (Originally from ..\FSComp.txt:678) static member tcPropertyCannotBeSet0() = (844, GetStringFunc("tcPropertyCannotBeSet0",",,,") ) /// This property or field was not found on this custom attribute type - /// (Originally from ..\FSComp.txt:678) + /// (Originally from ..\FSComp.txt:679) static member tcPropertyOrFieldNotFoundInAttribute() = (845, GetStringFunc("tcPropertyOrFieldNotFoundInAttribute",",,,") ) /// A custom attribute must be a reference type - /// (Originally from ..\FSComp.txt:679) + /// (Originally from ..\FSComp.txt:680) 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:680) + /// (Originally from ..\FSComp.txt:681) static member tcCustomAttributeArgumentMismatch() = (847, GetStringFunc("tcCustomAttributeArgumentMismatch",",,,") ) /// A custom attribute must invoke an object constructor - /// (Originally from ..\FSComp.txt:681) + /// (Originally from ..\FSComp.txt:682) static member tcCustomAttributeMustInvokeConstructor() = (848, GetStringFunc("tcCustomAttributeMustInvokeConstructor",",,,") ) /// Attribute expressions must be calls to object constructors - /// (Originally from ..\FSComp.txt:682) + /// (Originally from ..\FSComp.txt:683) static member tcAttributeExpressionsMustBeConstructorCalls() = (849, GetStringFunc("tcAttributeExpressionsMustBeConstructorCalls",",,,") ) /// This attribute cannot be used in this version of F# - /// (Originally from ..\FSComp.txt:683) + /// (Originally from ..\FSComp.txt:684) static member tcUnsupportedAttribute() = (850, GetStringFunc("tcUnsupportedAttribute",",,,") ) /// Invalid inline specification - /// (Originally from ..\FSComp.txt:684) + /// (Originally from ..\FSComp.txt:685) static member tcInvalidInlineSpecification() = (851, GetStringFunc("tcInvalidInlineSpecification",",,,") ) /// 'use' bindings must be of the form 'use = ' - /// (Originally from ..\FSComp.txt:685) + /// (Originally from ..\FSComp.txt:686) 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:686) + /// (Originally from ..\FSComp.txt:687) static member tcAbstractMembersIllegalInAugmentation() = (853, GetStringFunc("tcAbstractMembersIllegalInAugmentation",",,,") ) /// Method overrides and interface implementations are not permitted here - /// (Originally from ..\FSComp.txt:687) + /// (Originally from ..\FSComp.txt:688) static member tcMethodOverridesIllegalHere() = (854, GetStringFunc("tcMethodOverridesIllegalHere",",,,") ) /// No abstract or interface member was found that corresponds to this override - /// (Originally from ..\FSComp.txt:688) + /// (Originally from ..\FSComp.txt:689) 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:689) + /// (Originally from ..\FSComp.txt:690) static member tcOverrideArityMismatch(a0 : System.String) = (856, GetStringFunc("tcOverrideArityMismatch",",,,%s,,,") a0) /// This method already has a default implementation - /// (Originally from ..\FSComp.txt:690) + /// (Originally from ..\FSComp.txt:691) static member tcDefaultImplementationAlreadyExists() = (857, GetStringFunc("tcDefaultImplementationAlreadyExists",",,,") ) /// The method implemented by this default is ambiguous - /// (Originally from ..\FSComp.txt:691) + /// (Originally from ..\FSComp.txt:692) static member tcDefaultAmbiguous() = (858, GetStringFunc("tcDefaultAmbiguous",",,,") ) /// No abstract property was found that corresponds to this override - /// (Originally from ..\FSComp.txt:692) + /// (Originally from ..\FSComp.txt:693) 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:693) + /// (Originally from ..\FSComp.txt:694) static member tcAbstractPropertyMissingGetOrSet(a0 : System.String) = (860, GetStringFunc("tcAbstractPropertyMissingGetOrSet",",,,%s,,,") a0) /// Invalid signature for set member - /// (Originally from ..\FSComp.txt:694) + /// (Originally from ..\FSComp.txt:695) 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:695) + /// (Originally from ..\FSComp.txt:696) 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:696) + /// (Originally from ..\FSComp.txt:697) static member tcNewMemberHidesAbstractMemberWithSuffix(a0 : System.String) = (864, GetStringFunc("tcNewMemberHidesAbstractMemberWithSuffix",",,,%s,,,") a0) /// Interfaces cannot contain definitions of static initializers - /// (Originally from ..\FSComp.txt:697) + /// (Originally from ..\FSComp.txt:698) static member tcStaticInitializersIllegalInInterface() = (865, GetStringFunc("tcStaticInitializersIllegalInInterface",",,,") ) /// Interfaces cannot contain definitions of object constructors - /// (Originally from ..\FSComp.txt:698) + /// (Originally from ..\FSComp.txt:699) static member tcObjectConstructorsIllegalInInterface() = (866, GetStringFunc("tcObjectConstructorsIllegalInInterface",",,,") ) /// Interfaces cannot contain definitions of member overrides - /// (Originally from ..\FSComp.txt:699) + /// (Originally from ..\FSComp.txt:700) 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:700) + /// (Originally from ..\FSComp.txt:701) static member tcConcreteMembersIllegalInInterface() = (868, GetStringFunc("tcConcreteMembersIllegalInInterface",",,,") ) /// Constructors cannot be specified in exception augmentations - /// (Originally from ..\FSComp.txt:701) + /// (Originally from ..\FSComp.txt:702) 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:702) + /// (Originally from ..\FSComp.txt:703) static member tcStructsCannotHaveConstructorWithNoArguments() = (870, GetStringFunc("tcStructsCannotHaveConstructorWithNoArguments",",,,") ) /// Constructors cannot be defined for this type - /// (Originally from ..\FSComp.txt:703) + /// (Originally from ..\FSComp.txt:704) 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:704) + /// (Originally from ..\FSComp.txt:705) static member tcRecursiveBindingsWithMembersMustBeDirectAugmentation() = (872, GetStringFunc("tcRecursiveBindingsWithMembersMustBeDirectAugmentation",",,,") ) /// Only simple variable patterns can be bound in 'let rec' constructs - /// (Originally from ..\FSComp.txt:705) + /// (Originally from ..\FSComp.txt:706) static member tcOnlySimplePatternsInLetRec() = (873, GetStringFunc("tcOnlySimplePatternsInLetRec",",,,") ) /// Only record fields and simple, non-recursive 'let' bindings may be marked mutable - /// (Originally from ..\FSComp.txt:706) + /// (Originally from ..\FSComp.txt:707) static member tcOnlyRecordFieldsAndSimpleLetCanBeMutable() = (874, GetStringFunc("tcOnlyRecordFieldsAndSimpleLetCanBeMutable",",,,") ) /// This member is not sufficiently generic - /// (Originally from ..\FSComp.txt:707) + /// (Originally from ..\FSComp.txt:708) 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:708) + /// (Originally from ..\FSComp.txt:709) 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:709) + /// (Originally from ..\FSComp.txt:710) 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:710) + /// (Originally from ..\FSComp.txt:711) static member tcThreadStaticAndContextStaticMustBeStatic() = (878, GetStringFunc("tcThreadStaticAndContextStaticMustBeStatic",",,,") ) /// Volatile fields must be marked 'mutable' and cannot be thread-static - /// (Originally from ..\FSComp.txt:711) + /// (Originally from ..\FSComp.txt:712) 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:712) + /// (Originally from ..\FSComp.txt:713) 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:713) + /// (Originally from ..\FSComp.txt:714) static member tcStaticValFieldsMustBeMutableAndPrivate() = (881, GetStringFunc("tcStaticValFieldsMustBeMutableAndPrivate",",,,") ) /// This field requires a name - /// (Originally from ..\FSComp.txt:714) + /// (Originally from ..\FSComp.txt:715) static member tcFieldRequiresName() = (882, GetStringFunc("tcFieldRequiresName",",,,") ) /// Invalid namespace, module, type or union case name - /// (Originally from ..\FSComp.txt:715) + /// (Originally from ..\FSComp.txt:716) 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:716) + /// (Originally from ..\FSComp.txt:717) 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:717) + /// (Originally from ..\FSComp.txt:718) static member tcReturnTypesForUnionMustBeSameAsType() = (885, GetStringFunc("tcReturnTypesForUnionMustBeSameAsType",",,,") ) /// This is not a valid value for an enumeration literal - /// (Originally from ..\FSComp.txt:718) + /// (Originally from ..\FSComp.txt:719) static member tcInvalidEnumerationLiteral() = (886, GetStringFunc("tcInvalidEnumerationLiteral",",,,") ) /// The type '%s' is not an interface type - /// (Originally from ..\FSComp.txt:719) + /// (Originally from ..\FSComp.txt:720) static member tcTypeIsNotInterfaceType1(a0 : System.String) = (887, GetStringFunc("tcTypeIsNotInterfaceType1",",,,%s,,,") a0) /// Duplicate specification of an interface - /// (Originally from ..\FSComp.txt:720) + /// (Originally from ..\FSComp.txt:721) static member tcDuplicateSpecOfInterface() = (888, GetStringFunc("tcDuplicateSpecOfInterface",",,,") ) /// A field/val declaration is not permitted here - /// (Originally from ..\FSComp.txt:721) + /// (Originally from ..\FSComp.txt:722) static member tcFieldValIllegalHere() = (889, GetStringFunc("tcFieldValIllegalHere",",,,") ) /// A inheritance declaration is not permitted here - /// (Originally from ..\FSComp.txt:722) + /// (Originally from ..\FSComp.txt:723) 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:723) + /// (Originally from ..\FSComp.txt:724) 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:724) + /// (Originally from ..\FSComp.txt:725) 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:725) + /// (Originally from ..\FSComp.txt:726) static member tcLocalClassBindingsCannotBeInline() = (894, GetStringFunc("tcLocalClassBindingsCannotBeInline",",,,") ) /// Type abbreviations cannot have members - /// (Originally from ..\FSComp.txt:726) + /// (Originally from ..\FSComp.txt:727) 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:727) + /// (Originally from ..\FSComp.txt:728) static member tcTypeAbbreviationsCheckedAtCompileTime() = (GetStringFunc("tcTypeAbbreviationsCheckedAtCompileTime",",,,") ) /// Enumerations cannot have members - /// (Originally from ..\FSComp.txt:728) + /// (Originally from ..\FSComp.txt:729) static member tcEnumerationsMayNotHaveMembers() = (896, GetStringFunc("tcEnumerationsMayNotHaveMembers",",,,") ) /// Measure declarations may have only static members - /// (Originally from ..\FSComp.txt:729) + /// (Originally from ..\FSComp.txt:730) 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:730) + /// (Originally from ..\FSComp.txt:731) 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:731) + /// (Originally from ..\FSComp.txt:732) 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:732) + /// (Originally from ..\FSComp.txt:733) static member tcStaticLetBindingsRequireClassesWithImplicitConstructors() = (902, GetStringFunc("tcStaticLetBindingsRequireClassesWithImplicitConstructors",",,,") ) /// Measure declarations may have only static members: constructors are not available - /// (Originally from ..\FSComp.txt:733) + /// (Originally from ..\FSComp.txt:734) static member tcMeasureDeclarationsRequireStaticMembersNotConstructors() = (904, GetStringFunc("tcMeasureDeclarationsRequireStaticMembersNotConstructors",",,,") ) /// A member and a local class binding both have the name '%s' - /// (Originally from ..\FSComp.txt:734) + /// (Originally from ..\FSComp.txt:735) static member tcMemberAndLocalClassBindingHaveSameName(a0 : System.String) = (905, GetStringFunc("tcMemberAndLocalClassBindingHaveSameName",",,,%s,,,") a0) /// Type abbreviations cannot have interface declarations - /// (Originally from ..\FSComp.txt:735) + /// (Originally from ..\FSComp.txt:736) static member tcTypeAbbreviationsCannotHaveInterfaceDeclaration() = (906, GetStringFunc("tcTypeAbbreviationsCannotHaveInterfaceDeclaration",",,,") ) /// Enumerations cannot have interface declarations - /// (Originally from ..\FSComp.txt:736) + /// (Originally from ..\FSComp.txt:737) static member tcEnumerationsCannotHaveInterfaceDeclaration() = (907, GetStringFunc("tcEnumerationsCannotHaveInterfaceDeclaration",",,,") ) /// This type is not an interface type - /// (Originally from ..\FSComp.txt:737) + /// (Originally from ..\FSComp.txt:738) static member tcTypeIsNotInterfaceType0() = (908, GetStringFunc("tcTypeIsNotInterfaceType0",",,,") ) /// All implemented interfaces should be declared on the initial declaration of the type - /// (Originally from ..\FSComp.txt:738) + /// (Originally from ..\FSComp.txt:739) 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:739) + /// (Originally from ..\FSComp.txt:740) static member tcDefaultImplementationForInterfaceHasAlreadyBeenAdded() = (910, GetStringFunc("tcDefaultImplementationForInterfaceHasAlreadyBeenAdded",",,,") ) /// This member is not permitted in an interface implementation - /// (Originally from ..\FSComp.txt:740) + /// (Originally from ..\FSComp.txt:741) static member tcMemberNotPermittedInInterfaceImplementation() = (911, GetStringFunc("tcMemberNotPermittedInInterfaceImplementation",",,,") ) /// This declaration element is not permitted in an augmentation - /// (Originally from ..\FSComp.txt:741) + /// (Originally from ..\FSComp.txt:742) static member tcDeclarationElementNotPermittedInAugmentation() = (912, GetStringFunc("tcDeclarationElementNotPermittedInAugmentation",",,,") ) /// Types cannot contain nested type definitions - /// (Originally from ..\FSComp.txt:742) + /// (Originally from ..\FSComp.txt:743) static member tcTypesCannotContainNestedTypes() = (913, GetStringFunc("tcTypesCannotContainNestedTypes",",,,") ) /// type, exception or module - /// (Originally from ..\FSComp.txt:743) + /// (Originally from ..\FSComp.txt:744) static member tcTypeExceptionOrModule() = (GetStringFunc("tcTypeExceptionOrModule",",,,") ) /// type or module - /// (Originally from ..\FSComp.txt:744) + /// (Originally from ..\FSComp.txt:745) 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:745) + /// (Originally from ..\FSComp.txt:746) 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:746) + /// (Originally from ..\FSComp.txt:747) static member tcImplementsIEquatableExplicitly(a0 : System.String) = (915, GetStringFunc("tcImplementsIEquatableExplicitly",",,,%s,,,") a0) /// Explicit type specifications cannot be used for exception constructors - /// (Originally from ..\FSComp.txt:747) + /// (Originally from ..\FSComp.txt:748) static member tcExplicitTypeSpecificationCannotBeUsedForExceptionConstructors() = (916, GetStringFunc("tcExplicitTypeSpecificationCannotBeUsedForExceptionConstructors",",,,") ) /// Exception abbreviations should not have argument lists - /// (Originally from ..\FSComp.txt:748) + /// (Originally from ..\FSComp.txt:749) static member tcExceptionAbbreviationsShouldNotHaveArgumentList() = (917, GetStringFunc("tcExceptionAbbreviationsShouldNotHaveArgumentList",",,,") ) /// Abbreviations for Common IL exceptions cannot take arguments - /// (Originally from ..\FSComp.txt:749) + /// (Originally from ..\FSComp.txt:750) static member tcAbbreviationsFordotNetExceptionsCannotTakeArguments() = (918, GetStringFunc("tcAbbreviationsFordotNetExceptionsCannotTakeArguments",",,,") ) /// Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception - /// (Originally from ..\FSComp.txt:750) + /// (Originally from ..\FSComp.txt:751) static member tcExceptionAbbreviationsMustReferToValidExceptions() = (919, GetStringFunc("tcExceptionAbbreviationsMustReferToValidExceptions",",,,") ) /// Abbreviations for Common IL exception types must have a matching object constructor - /// (Originally from ..\FSComp.txt:751) + /// (Originally from ..\FSComp.txt:752) static member tcAbbreviationsFordotNetExceptionsMustHaveMatchingObjectConstructor() = (920, GetStringFunc("tcAbbreviationsFordotNetExceptionsMustHaveMatchingObjectConstructor",",,,") ) /// Not an exception - /// (Originally from ..\FSComp.txt:752) + /// (Originally from ..\FSComp.txt:753) static member tcNotAnException() = (921, GetStringFunc("tcNotAnException",",,,") ) /// Invalid module name - /// (Originally from ..\FSComp.txt:754) + /// (Originally from ..\FSComp.txt:755) static member tcInvalidModuleName() = (924, GetStringFunc("tcInvalidModuleName",",,,") ) /// Invalid type extension - /// (Originally from ..\FSComp.txt:755) + /// (Originally from ..\FSComp.txt:756) static member tcInvalidTypeExtension() = (925, GetStringFunc("tcInvalidTypeExtension",",,,") ) /// The attributes of this type specify multiple kinds for the type - /// (Originally from ..\FSComp.txt:756) + /// (Originally from ..\FSComp.txt:757) 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:757) + /// (Originally from ..\FSComp.txt:758) static member tcKindOfTypeSpecifiedDoesNotMatchDefinition() = (927, GetStringFunc("tcKindOfTypeSpecifiedDoesNotMatchDefinition",",,,") ) /// Measure definitions cannot have type parameters - /// (Originally from ..\FSComp.txt:758) + /// (Originally from ..\FSComp.txt:759) static member tcMeasureDefinitionsCannotHaveTypeParameters() = (928, GetStringFunc("tcMeasureDefinitionsCannotHaveTypeParameters",",,,") ) /// This type requires a definition - /// (Originally from ..\FSComp.txt:759) + /// (Originally from ..\FSComp.txt:760) 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:760) + /// (Originally from ..\FSComp.txt:761) static member tcTypeAbbreviationHasTypeParametersMissingOnType() = (GetStringFunc("tcTypeAbbreviationHasTypeParametersMissingOnType",",,,") ) /// Structs, interfaces, enums and delegates cannot inherit from other types - /// (Originally from ..\FSComp.txt:761) + /// (Originally from ..\FSComp.txt:762) static member tcStructsInterfacesEnumsDelegatesMayNotInheritFromOtherTypes() = (931, GetStringFunc("tcStructsInterfacesEnumsDelegatesMayNotInheritFromOtherTypes",",,,") ) /// Types cannot inherit from multiple concrete types - /// (Originally from ..\FSComp.txt:762) + /// (Originally from ..\FSComp.txt:763) static member tcTypesCannotInheritFromMultipleConcreteTypes() = (932, GetStringFunc("tcTypesCannotInheritFromMultipleConcreteTypes",",,,") ) /// Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute - /// (Originally from ..\FSComp.txt:763) + /// (Originally from ..\FSComp.txt:764) 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:764) + /// (Originally from ..\FSComp.txt:765) static member tcAllowNullTypesMayOnlyInheritFromAllowNullTypes() = (935, GetStringFunc("tcAllowNullTypesMayOnlyInheritFromAllowNullTypes",",,,") ) /// Generic types cannot be given the 'StructLayout' attribute - /// (Originally from ..\FSComp.txt:765) + /// (Originally from ..\FSComp.txt:766) static member tcGenericTypesCannotHaveStructLayout() = (936, GetStringFunc("tcGenericTypesCannotHaveStructLayout",",,,") ) /// Only structs and classes without primary constructors may be given the 'StructLayout' attribute - /// (Originally from ..\FSComp.txt:766) + /// (Originally from ..\FSComp.txt:767) 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:767) + /// (Originally from ..\FSComp.txt:768) static member tcRepresentationOfTypeHiddenBySignature() = (938, GetStringFunc("tcRepresentationOfTypeHiddenBySignature",",,,") ) /// Only classes may be given the 'AbstractClass' attribute - /// (Originally from ..\FSComp.txt:768) + /// (Originally from ..\FSComp.txt:769) static member tcOnlyClassesCanHaveAbstract() = (939, GetStringFunc("tcOnlyClassesCanHaveAbstract",",,,") ) /// Only types representing units-of-measure may be given the 'Measure' attribute - /// (Originally from ..\FSComp.txt:769) + /// (Originally from ..\FSComp.txt:770) static member tcOnlyTypesRepresentingUnitsOfMeasureCanHaveMeasure() = (940, GetStringFunc("tcOnlyTypesRepresentingUnitsOfMeasureCanHaveMeasure",",,,") ) /// Accessibility modifiers are not permitted on overrides or interface implementations - /// (Originally from ..\FSComp.txt:770) + /// (Originally from ..\FSComp.txt:771) static member tcOverridesCannotHaveVisibilityDeclarations() = (941, GetStringFunc("tcOverridesCannotHaveVisibilityDeclarations",",,,") ) /// Discriminated union types are always sealed - /// (Originally from ..\FSComp.txt:771) + /// (Originally from ..\FSComp.txt:772) static member tcTypesAreAlwaysSealedDU() = (942, GetStringFunc("tcTypesAreAlwaysSealedDU",",,,") ) /// Record types are always sealed - /// (Originally from ..\FSComp.txt:772) + /// (Originally from ..\FSComp.txt:773) static member tcTypesAreAlwaysSealedRecord() = (942, GetStringFunc("tcTypesAreAlwaysSealedRecord",",,,") ) /// Assembly code types are always sealed - /// (Originally from ..\FSComp.txt:773) + /// (Originally from ..\FSComp.txt:774) static member tcTypesAreAlwaysSealedAssemblyCode() = (942, GetStringFunc("tcTypesAreAlwaysSealedAssemblyCode",",,,") ) /// Struct types are always sealed - /// (Originally from ..\FSComp.txt:774) + /// (Originally from ..\FSComp.txt:775) static member tcTypesAreAlwaysSealedStruct() = (942, GetStringFunc("tcTypesAreAlwaysSealedStruct",",,,") ) /// Delegate types are always sealed - /// (Originally from ..\FSComp.txt:775) + /// (Originally from ..\FSComp.txt:776) static member tcTypesAreAlwaysSealedDelegate() = (942, GetStringFunc("tcTypesAreAlwaysSealedDelegate",",,,") ) /// Enum types are always sealed - /// (Originally from ..\FSComp.txt:776) + /// (Originally from ..\FSComp.txt:777) static member tcTypesAreAlwaysSealedEnum() = (942, GetStringFunc("tcTypesAreAlwaysSealedEnum",",,,") ) /// Interface types and delegate types cannot contain fields - /// (Originally from ..\FSComp.txt:777) + /// (Originally from ..\FSComp.txt:778) static member tcInterfaceTypesAndDelegatesCannotContainFields() = (943, GetStringFunc("tcInterfaceTypesAndDelegatesCannotContainFields",",,,") ) /// Abbreviated types cannot be given the 'Sealed' attribute - /// (Originally from ..\FSComp.txt:778) + /// (Originally from ..\FSComp.txt:779) static member tcAbbreviatedTypesCannotBeSealed() = (944, GetStringFunc("tcAbbreviatedTypesCannotBeSealed",",,,") ) /// Cannot inherit a sealed type - /// (Originally from ..\FSComp.txt:779) + /// (Originally from ..\FSComp.txt:780) static member tcCannotInheritFromSealedType() = (945, GetStringFunc("tcCannotInheritFromSealedType",",,,") ) /// Cannot inherit from interface type. Use interface ... with instead. - /// (Originally from ..\FSComp.txt:780) + /// (Originally from ..\FSComp.txt:781) static member tcCannotInheritFromInterfaceType() = (946, GetStringFunc("tcCannotInheritFromInterfaceType",",,,") ) /// Struct types cannot contain abstract members - /// (Originally from ..\FSComp.txt:781) + /// (Originally from ..\FSComp.txt:782) static member tcStructTypesCannotContainAbstractMembers() = (947, GetStringFunc("tcStructTypesCannotContainAbstractMembers",",,,") ) /// Interface types cannot be sealed - /// (Originally from ..\FSComp.txt:782) + /// (Originally from ..\FSComp.txt:783) static member tcInterfaceTypesCannotBeSealed() = (948, GetStringFunc("tcInterfaceTypesCannotBeSealed",",,,") ) /// Delegate specifications must be of the form 'typ -> typ' - /// (Originally from ..\FSComp.txt:783) + /// (Originally from ..\FSComp.txt:784) 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:784) + /// (Originally from ..\FSComp.txt:785) 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:785) + /// (Originally from ..\FSComp.txt:786) static member tcInvalidTypeForLiteralEnumeration() = (951, GetStringFunc("tcInvalidTypeForLiteralEnumeration",",,,") ) /// This type definition involves an immediate cyclic reference through an abbreviation - /// (Originally from ..\FSComp.txt:787) + /// (Originally from ..\FSComp.txt:788) 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:788) + /// (Originally from ..\FSComp.txt:789) 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:789) + /// (Originally from ..\FSComp.txt:790) 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:790) + /// (Originally from ..\FSComp.txt:791) 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:791) + /// (Originally from ..\FSComp.txt:792) 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:792) + /// (Originally from ..\FSComp.txt:793) static member tcTypeDefinitionsWithImplicitConstructionMustHaveOneInherit() = (959, GetStringFunc("tcTypeDefinitionsWithImplicitConstructionMustHaveOneInherit",",,,") ) /// 'let' and 'do' bindings must come before member and interface definitions in type definitions - /// (Originally from ..\FSComp.txt:793) + /// (Originally from ..\FSComp.txt:794) 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:794) + /// (Originally from ..\FSComp.txt:795) 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:795) + /// (Originally from ..\FSComp.txt:796) 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:796) + /// (Originally from ..\FSComp.txt:797) static member tcLetAndDoRequiresImplicitConstructionSequence() = (963, GetStringFunc("tcLetAndDoRequiresImplicitConstructionSequence",",,,") ) /// Type abbreviations cannot have augmentations - /// (Originally from ..\FSComp.txt:797) + /// (Originally from ..\FSComp.txt:798) static member tcTypeAbbreviationsCannotHaveAugmentations() = (964, GetStringFunc("tcTypeAbbreviationsCannotHaveAugmentations",",,,") ) /// The path '%s' is a namespace. A module abbreviation may not abbreviate a namespace. - /// (Originally from ..\FSComp.txt:798) + /// (Originally from ..\FSComp.txt:799) 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:799) + /// (Originally from ..\FSComp.txt:800) 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:800) + /// (Originally from ..\FSComp.txt:801) 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:803) + /// (Originally from ..\FSComp.txt:804) static member tcAttributeAutoOpenWasIgnored(a0 : System.String, a1 : System.String) = (970, GetStringFunc("tcAttributeAutoOpenWasIgnored",",,,%s,,,%s,,,") a0 a1) /// Undefined value '%s' - /// (Originally from ..\FSComp.txt:804) + /// (Originally from ..\FSComp.txt:805) static member ilUndefinedValue(a0 : System.String) = (971, GetStringFunc("ilUndefinedValue",",,,%s,,,") a0) /// Label %s not found - /// (Originally from ..\FSComp.txt:805) + /// (Originally from ..\FSComp.txt:806) static member ilLabelNotFound(a0 : System.String) = (972, GetStringFunc("ilLabelNotFound",",,,%s,,,") a0) /// Incorrect number of type arguments to local call - /// (Originally from ..\FSComp.txt:806) + /// (Originally from ..\FSComp.txt:807) static member ilIncorrectNumberOfTypeArguments() = (973, GetStringFunc("ilIncorrectNumberOfTypeArguments",",,,") ) /// Dynamic invocation of %s is not supported - /// (Originally from ..\FSComp.txt:807) + /// (Originally from ..\FSComp.txt:808) static member ilDynamicInvocationNotSupported(a0 : System.String) = (GetStringFunc("ilDynamicInvocationNotSupported",",,,%s,,,") a0) /// Taking the address of a literal field is invalid - /// (Originally from ..\FSComp.txt:808) + /// (Originally from ..\FSComp.txt:809) 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:809) + /// (Originally from ..\FSComp.txt:810) 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:810) + /// (Originally from ..\FSComp.txt:811) static member ilCustomMarshallersCannotBeUsedInFSharp() = (980, GetStringFunc("ilCustomMarshallersCannotBeUsedInFSharp",",,,") ) /// The MarshalAs attribute could not be decoded - /// (Originally from ..\FSComp.txt:811) + /// (Originally from ..\FSComp.txt:812) 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:812) + /// (Originally from ..\FSComp.txt:813) static member ilSignatureForExternalFunctionContainsTypeParameters() = (982, GetStringFunc("ilSignatureForExternalFunctionContainsTypeParameters",",,,") ) /// The DllImport attribute could not be decoded - /// (Originally from ..\FSComp.txt:813) + /// (Originally from ..\FSComp.txt:814) static member ilDllImportAttributeCouldNotBeDecoded() = (983, GetStringFunc("ilDllImportAttributeCouldNotBeDecoded",",,,") ) /// Literal fields cannot be set - /// (Originally from ..\FSComp.txt:814) + /// (Originally from ..\FSComp.txt:815) 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:815) + /// (Originally from ..\FSComp.txt:816) static member ilStaticMethodIsNotLambda(a0 : System.String) = (985, GetStringFunc("ilStaticMethodIsNotLambda",",,,%s,,,") a0) /// Mutable variables cannot escape their method - /// (Originally from ..\FSComp.txt:816) + /// (Originally from ..\FSComp.txt:817) static member ilMutableVariablesCannotEscapeMethod() = (986, GetStringFunc("ilMutableVariablesCannotEscapeMethod",",,,") ) /// Compiler error: unexpected unrealized value - /// (Originally from ..\FSComp.txt:817) + /// (Originally from ..\FSComp.txt:818) static member ilUnexpectedUnrealizedValue() = (987, GetStringFunc("ilUnexpectedUnrealizedValue",",,,") ) /// Main module of program is empty: nothing will happen when it is run - /// (Originally from ..\FSComp.txt:818) + /// (Originally from ..\FSComp.txt:819) static member ilMainModuleEmpty() = (988, GetStringFunc("ilMainModuleEmpty",",,,") ) /// This type cannot be used for a literal field - /// (Originally from ..\FSComp.txt:819) + /// (Originally from ..\FSComp.txt:820) static member ilTypeCannotBeUsedForLiteralField() = (989, GetStringFunc("ilTypeCannotBeUsedForLiteralField",",,,") ) /// Unexpected GetSet annotation on a property - /// (Originally from ..\FSComp.txt:820) + /// (Originally from ..\FSComp.txt:821) static member ilUnexpectedGetSetAnnotation() = (990, GetStringFunc("ilUnexpectedGetSetAnnotation",",,,") ) /// The FieldOffset attribute could not be decoded - /// (Originally from ..\FSComp.txt:821) + /// (Originally from ..\FSComp.txt:822) static member ilFieldOffsetAttributeCouldNotBeDecoded() = (991, GetStringFunc("ilFieldOffsetAttributeCouldNotBeDecoded",",,,") ) /// The StructLayout attribute could not be decoded - /// (Originally from ..\FSComp.txt:822) + /// (Originally from ..\FSComp.txt:823) static member ilStructLayoutAttributeCouldNotBeDecoded() = (992, GetStringFunc("ilStructLayoutAttributeCouldNotBeDecoded",",,,") ) /// The DefaultAugmentation attribute could not be decoded - /// (Originally from ..\FSComp.txt:823) + /// (Originally from ..\FSComp.txt:824) static member ilDefaultAugmentationAttributeCouldNotBeDecoded() = (993, GetStringFunc("ilDefaultAugmentationAttributeCouldNotBeDecoded",",,,") ) /// Reflected definitions cannot contain uses of the prefix splice operator '%%' - /// (Originally from ..\FSComp.txt:824) + /// (Originally from ..\FSComp.txt:825) static member ilReflectedDefinitionsCannotUseSliceOperator() = (994, GetStringFunc("ilReflectedDefinitionsCannotUseSliceOperator",",,,") ) /// Problem with codepage '%d': %s - /// (Originally from ..\FSComp.txt:825) + /// (Originally from ..\FSComp.txt:826) 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:826) + /// (Originally from ..\FSComp.txt:827) 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:827) + /// (Originally from ..\FSComp.txt:828) static member optsCopyrightCommunity() = (GetStringFunc("optsCopyrightCommunity",",,,") ) /// Name of the output file (Short form: -o) - /// (Originally from ..\FSComp.txt:828) + /// (Originally from ..\FSComp.txt:829) static member optsNameOfOutputFile() = (GetStringFunc("optsNameOfOutputFile",",,,") ) /// Build a console executable - /// (Originally from ..\FSComp.txt:829) + /// (Originally from ..\FSComp.txt:830) static member optsBuildConsole() = (GetStringFunc("optsBuildConsole",",,,") ) /// Build a Windows executable - /// (Originally from ..\FSComp.txt:830) + /// (Originally from ..\FSComp.txt:831) static member optsBuildWindows() = (GetStringFunc("optsBuildWindows",",,,") ) /// Build a library (Short form: -a) - /// (Originally from ..\FSComp.txt:831) + /// (Originally from ..\FSComp.txt:832) static member optsBuildLibrary() = (GetStringFunc("optsBuildLibrary",",,,") ) /// Build a module that can be added to another assembly - /// (Originally from ..\FSComp.txt:832) + /// (Originally from ..\FSComp.txt:833) static member optsBuildModule() = (GetStringFunc("optsBuildModule",",,,") ) /// Delay-sign the assembly using only the public portion of the strong name key - /// (Originally from ..\FSComp.txt:833) + /// (Originally from ..\FSComp.txt:834) 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:834) + /// (Originally from ..\FSComp.txt:835) static member optsPublicSign() = (GetStringFunc("optsPublicSign",",,,") ) /// Write the xmldoc of the assembly to the given file - /// (Originally from ..\FSComp.txt:835) + /// (Originally from ..\FSComp.txt:836) static member optsWriteXml() = (GetStringFunc("optsWriteXml",",,,") ) /// Specify a strong name key file - /// (Originally from ..\FSComp.txt:836) + /// (Originally from ..\FSComp.txt:837) static member optsStrongKeyFile() = (GetStringFunc("optsStrongKeyFile",",,,") ) /// Specify a strong name key container - /// (Originally from ..\FSComp.txt:837) + /// (Originally from ..\FSComp.txt:838) 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:838) + /// (Originally from ..\FSComp.txt:839) 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:839) + /// (Originally from ..\FSComp.txt:840) static member optsNoOpt() = (GetStringFunc("optsNoOpt",",,,") ) /// Don't add a resource to the generated assembly containing F#-specific metadata - /// (Originally from ..\FSComp.txt:840) + /// (Originally from ..\FSComp.txt:841) static member optsNoInterface() = (GetStringFunc("optsNoInterface",",,,") ) /// Print the inferred interface of the assembly to a file - /// (Originally from ..\FSComp.txt:841) + /// (Originally from ..\FSComp.txt:842) static member optsSig() = (GetStringFunc("optsSig",",,,") ) /// Reference an assembly (Short form: -r) - /// (Originally from ..\FSComp.txt:842) + /// (Originally from ..\FSComp.txt:843) static member optsReference() = (GetStringFunc("optsReference",",,,") ) /// Specify a Win32 resource file (.res) - /// (Originally from ..\FSComp.txt:843) + /// (Originally from ..\FSComp.txt:844) static member optsWin32res() = (GetStringFunc("optsWin32res",",,,") ) /// Specify a Win32 manifest file - /// (Originally from ..\FSComp.txt:844) + /// (Originally from ..\FSComp.txt:845) static member optsWin32manifest() = (GetStringFunc("optsWin32manifest",",,,") ) /// Do not include the default Win32 manifest - /// (Originally from ..\FSComp.txt:845) + /// (Originally from ..\FSComp.txt:846) static member optsNowin32manifest() = (GetStringFunc("optsNowin32manifest",",,,") ) /// Embed all source files in the portable PDB file - /// (Originally from ..\FSComp.txt:846) + /// (Originally from ..\FSComp.txt:847) static member optsEmbedAllSource() = (GetStringFunc("optsEmbedAllSource",",,,") ) /// Embed specific source files in the portable PDB file - /// (Originally from ..\FSComp.txt:847) + /// (Originally from ..\FSComp.txt:848) static member optsEmbedSource() = (GetStringFunc("optsEmbedSource",",,,") ) /// Source link information file to embed in the portable PDB file - /// (Originally from ..\FSComp.txt:848) + /// (Originally from ..\FSComp.txt:849) static member optsSourceLink() = (GetStringFunc("optsSourceLink",",,,") ) /// --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - /// (Originally from ..\FSComp.txt:849) + /// (Originally from ..\FSComp.txt:850) static member optsEmbeddedSourceRequirePortablePDBs() = (1501, GetStringFunc("optsEmbeddedSourceRequirePortablePDBs",",,,") ) /// --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - /// (Originally from ..\FSComp.txt:850) + /// (Originally from ..\FSComp.txt:851) static member optsSourceLinkRequirePortablePDBs() = (1502, GetStringFunc("optsSourceLinkRequirePortablePDBs",",,,") ) /// Source file is too large to embed in a portable PDB - /// (Originally from ..\FSComp.txt:851) + /// (Originally from ..\FSComp.txt:852) static member srcFileTooLarge() = (GetStringFunc("srcFileTooLarge",",,,") ) /// Embed the specified managed resource - /// (Originally from ..\FSComp.txt:852) + /// (Originally from ..\FSComp.txt:853) static member optsResource() = (GetStringFunc("optsResource",",,,") ) /// Link the specified resource to this assembly where the resinfo format is [,[,public|private]] - /// (Originally from ..\FSComp.txt:853) + /// (Originally from ..\FSComp.txt:854) static member optsLinkresource() = (GetStringFunc("optsLinkresource",",,,") ) /// Emit debug information (Short form: -g) - /// (Originally from ..\FSComp.txt:854) + /// (Originally from ..\FSComp.txt:855) 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:855) + /// (Originally from ..\FSComp.txt:856) static member optsDebug(a0 : System.String) = (GetStringFunc("optsDebug",",,,%s,,,") a0) /// Enable optimizations (Short form: -O) - /// (Originally from ..\FSComp.txt:856) + /// (Originally from ..\FSComp.txt:857) static member optsOptimize() = (GetStringFunc("optsOptimize",",,,") ) /// Enable or disable tailcalls - /// (Originally from ..\FSComp.txt:857) + /// (Originally from ..\FSComp.txt:858) static member optsTailcalls() = (GetStringFunc("optsTailcalls",",,,") ) /// Produce a deterministic assembly (including module version GUID and timestamp) - /// (Originally from ..\FSComp.txt:858) + /// (Originally from ..\FSComp.txt:859) static member optsDeterministic() = (GetStringFunc("optsDeterministic",",,,") ) /// Enable or disable cross-module optimizations - /// (Originally from ..\FSComp.txt:859) + /// (Originally from ..\FSComp.txt:860) static member optsCrossoptimize() = (GetStringFunc("optsCrossoptimize",",,,") ) /// Report all warnings as errors - /// (Originally from ..\FSComp.txt:860) + /// (Originally from ..\FSComp.txt:861) static member optsWarnaserrorPM() = (GetStringFunc("optsWarnaserrorPM",",,,") ) /// Report specific warnings as errors - /// (Originally from ..\FSComp.txt:861) + /// (Originally from ..\FSComp.txt:862) static member optsWarnaserror() = (GetStringFunc("optsWarnaserror",",,,") ) /// Set a warning level (0-5) - /// (Originally from ..\FSComp.txt:862) + /// (Originally from ..\FSComp.txt:863) static member optsWarn() = (GetStringFunc("optsWarn",",,,") ) /// Disable specific warning messages - /// (Originally from ..\FSComp.txt:863) + /// (Originally from ..\FSComp.txt:864) static member optsNowarn() = (GetStringFunc("optsNowarn",",,,") ) /// Enable specific warnings that may be off by default - /// (Originally from ..\FSComp.txt:864) + /// (Originally from ..\FSComp.txt:865) static member optsWarnOn() = (GetStringFunc("optsWarnOn",",,,") ) /// Generate overflow checks - /// (Originally from ..\FSComp.txt:865) + /// (Originally from ..\FSComp.txt:866) static member optsChecked() = (GetStringFunc("optsChecked",",,,") ) /// Define conditional compilation symbols (Short form: -d) - /// (Originally from ..\FSComp.txt:866) + /// (Originally from ..\FSComp.txt:867) static member optsDefine() = (GetStringFunc("optsDefine",",,,") ) /// Ignore ML compatibility warnings - /// (Originally from ..\FSComp.txt:867) + /// (Originally from ..\FSComp.txt:868) static member optsMlcompatibility() = (GetStringFunc("optsMlcompatibility",",,,") ) /// Suppress compiler copyright message - /// (Originally from ..\FSComp.txt:868) + /// (Originally from ..\FSComp.txt:869) static member optsNologo() = (GetStringFunc("optsNologo",",,,") ) /// Display this usage message (Short form: -?) - /// (Originally from ..\FSComp.txt:869) + /// (Originally from ..\FSComp.txt:870) static member optsHelp() = (GetStringFunc("optsHelp",",,,") ) /// Read response file for more options - /// (Originally from ..\FSComp.txt:870) + /// (Originally from ..\FSComp.txt:871) static member optsResponseFile() = (GetStringFunc("optsResponseFile",",,,") ) /// Specify the codepage used to read source files - /// (Originally from ..\FSComp.txt:871) + /// (Originally from ..\FSComp.txt:872) static member optsCodepage() = (GetStringFunc("optsCodepage",",,,") ) /// Output messages in UTF-8 encoding - /// (Originally from ..\FSComp.txt:872) + /// (Originally from ..\FSComp.txt:873) static member optsUtf8output() = (GetStringFunc("optsUtf8output",",,,") ) /// Output messages with fully qualified paths - /// (Originally from ..\FSComp.txt:873) + /// (Originally from ..\FSComp.txt:874) 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:874) + /// (Originally from ..\FSComp.txt:875) static member optsLib() = (GetStringFunc("optsLib",",,,") ) /// Base address for the library to be built - /// (Originally from ..\FSComp.txt:875) + /// (Originally from ..\FSComp.txt:876) static member optsBaseaddress() = (GetStringFunc("optsBaseaddress",",,,") ) /// Do not reference the default CLI assemblies by default - /// (Originally from ..\FSComp.txt:876) + /// (Originally from ..\FSComp.txt:877) 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:877) + /// (Originally from ..\FSComp.txt:878) 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:878) + /// (Originally from ..\FSComp.txt:879) static member optsStaticlink() = (GetStringFunc("optsStaticlink",",,,") ) /// Use a resident background compilation service to improve compiler startup times. - /// (Originally from ..\FSComp.txt:879) + /// (Originally from ..\FSComp.txt:880) static member optsResident() = (GetStringFunc("optsResident",",,,") ) /// Name the output debug file - /// (Originally from ..\FSComp.txt:880) + /// (Originally from ..\FSComp.txt:881) static member optsPdb() = (GetStringFunc("optsPdb",",,,") ) /// Resolve assembly references using directory-based rules rather than MSBuild resolution - /// (Originally from ..\FSComp.txt:881) + /// (Originally from ..\FSComp.txt:882) static member optsSimpleresolution() = (GetStringFunc("optsSimpleresolution",",,,") ) /// Unrecognized target '%s', expected 'exe', 'winexe', 'library' or 'module' - /// (Originally from ..\FSComp.txt:882) + /// (Originally from ..\FSComp.txt:883) static member optsUnrecognizedTarget(a0 : System.String) = (1048, GetStringFunc("optsUnrecognizedTarget",",,,%s,,,") a0) /// Unrecognized debug type '%s', expected 'pdbonly' or 'full' - /// (Originally from ..\FSComp.txt:883) + /// (Originally from ..\FSComp.txt:884) static member optsUnrecognizedDebugType(a0 : System.String) = (1049, GetStringFunc("optsUnrecognizedDebugType",",,,%s,,,") a0) /// Invalid warning level '%d' - /// (Originally from ..\FSComp.txt:884) + /// (Originally from ..\FSComp.txt:885) static member optsInvalidWarningLevel(a0 : System.Int32) = (1050, GetStringFunc("optsInvalidWarningLevel",",,,%d,,,") a0) /// Short form of '%s' - /// (Originally from ..\FSComp.txt:885) + /// (Originally from ..\FSComp.txt:886) 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:886) + /// (Originally from ..\FSComp.txt:887) static member optsClirootDeprecatedMsg() = (GetStringFunc("optsClirootDeprecatedMsg",",,,") ) /// Use to override where the compiler looks for mscorlib.dll and framework components - /// (Originally from ..\FSComp.txt:887) + /// (Originally from ..\FSComp.txt:888) static member optsClirootDescription() = (GetStringFunc("optsClirootDescription",",,,") ) /// - OUTPUT FILES - - /// (Originally from ..\FSComp.txt:888) + /// (Originally from ..\FSComp.txt:889) static member optsHelpBannerOutputFiles() = (GetStringFunc("optsHelpBannerOutputFiles",",,,") ) /// - INPUT FILES - - /// (Originally from ..\FSComp.txt:889) + /// (Originally from ..\FSComp.txt:890) static member optsHelpBannerInputFiles() = (GetStringFunc("optsHelpBannerInputFiles",",,,") ) /// - RESOURCES - - /// (Originally from ..\FSComp.txt:890) + /// (Originally from ..\FSComp.txt:891) static member optsHelpBannerResources() = (GetStringFunc("optsHelpBannerResources",",,,") ) /// - CODE GENERATION - - /// (Originally from ..\FSComp.txt:891) + /// (Originally from ..\FSComp.txt:892) static member optsHelpBannerCodeGen() = (GetStringFunc("optsHelpBannerCodeGen",",,,") ) /// - ADVANCED - - /// (Originally from ..\FSComp.txt:892) + /// (Originally from ..\FSComp.txt:893) static member optsHelpBannerAdvanced() = (GetStringFunc("optsHelpBannerAdvanced",",,,") ) /// - MISCELLANEOUS - - /// (Originally from ..\FSComp.txt:893) + /// (Originally from ..\FSComp.txt:894) static member optsHelpBannerMisc() = (GetStringFunc("optsHelpBannerMisc",",,,") ) /// - LANGUAGE - - /// (Originally from ..\FSComp.txt:894) + /// (Originally from ..\FSComp.txt:895) static member optsHelpBannerLanguage() = (GetStringFunc("optsHelpBannerLanguage",",,,") ) /// - ERRORS AND WARNINGS - - /// (Originally from ..\FSComp.txt:895) + /// (Originally from ..\FSComp.txt:896) static member optsHelpBannerErrsAndWarns() = (GetStringFunc("optsHelpBannerErrsAndWarns",",,,") ) /// Unknown --test argument: '%s' - /// (Originally from ..\FSComp.txt:896) + /// (Originally from ..\FSComp.txt:897) 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:897) + /// (Originally from ..\FSComp.txt:898) 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:898) + /// (Originally from ..\FSComp.txt:899) static member optsInternalNoDescription(a0 : System.String) = (GetStringFunc("optsInternalNoDescription",",,,%s,,,") a0) /// The command-line option '%s' has been deprecated - /// (Originally from ..\FSComp.txt:899) + /// (Originally from ..\FSComp.txt:900) 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:900) + /// (Originally from ..\FSComp.txt:901) 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:901) + /// (Originally from ..\FSComp.txt:902) static member optsDCLOHtmlDoc(a0 : System.String) = (GetStringFunc("optsDCLOHtmlDoc",",,,%s,,,") a0) /// Output warning and error messages in color - /// (Originally from ..\FSComp.txt:902) + /// (Originally from ..\FSComp.txt:903) static member optsConsoleColors() = (GetStringFunc("optsConsoleColors",",,,") ) /// Enable high-entropy ASLR - /// (Originally from ..\FSComp.txt:903) + /// (Originally from ..\FSComp.txt:904) static member optsUseHighEntropyVA() = (GetStringFunc("optsUseHighEntropyVA",",,,") ) /// Specify subsystem version of this assembly - /// (Originally from ..\FSComp.txt:904) + /// (Originally from ..\FSComp.txt:905) 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:905) + /// (Originally from ..\FSComp.txt:906) static member optsTargetProfile() = (GetStringFunc("optsTargetProfile",",,,") ) /// Emit debug information in quotations - /// (Originally from ..\FSComp.txt:906) + /// (Originally from ..\FSComp.txt:907) static member optsEmitDebugInfoInQuotations() = (GetStringFunc("optsEmitDebugInfoInQuotations",",,,") ) /// Specify the preferred output language culture name (e.g. es-ES, ja-JP) - /// (Originally from ..\FSComp.txt:907) + /// (Originally from ..\FSComp.txt:908) static member optsPreferredUiLang() = (GetStringFunc("optsPreferredUiLang",",,,") ) /// Don't copy FSharp.Core.dll along the produced binaries - /// (Originally from ..\FSComp.txt:908) + /// (Originally from ..\FSComp.txt:909) static member optsNoCopyFsharpCore() = (GetStringFunc("optsNoCopyFsharpCore",",,,") ) /// Invalid version '%s' for '--subsystemversion'. The version must be 4.00 or greater. - /// (Originally from ..\FSComp.txt:909) + /// (Originally from ..\FSComp.txt:910) 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:910) + /// (Originally from ..\FSComp.txt:911) static member optsInvalidTargetProfile(a0 : System.String) = (1052, GetStringFunc("optsInvalidTargetProfile",",,,%s,,,") a0) /// Full name - /// (Originally from ..\FSComp.txt:911) + /// (Originally from ..\FSComp.txt:912) static member typeInfoFullName() = (GetStringFunc("typeInfoFullName",",,,") ) /// and %d other overloads - /// (Originally from ..\FSComp.txt:915) + /// (Originally from ..\FSComp.txt:916) static member typeInfoOtherOverloads(a0 : System.Int32) = (GetStringFunc("typeInfoOtherOverloads",",,,%d,,,") a0) /// union case - /// (Originally from ..\FSComp.txt:916) + /// (Originally from ..\FSComp.txt:917) static member typeInfoUnionCase() = (GetStringFunc("typeInfoUnionCase",",,,") ) /// active pattern result - /// (Originally from ..\FSComp.txt:917) + /// (Originally from ..\FSComp.txt:918) static member typeInfoActivePatternResult() = (GetStringFunc("typeInfoActivePatternResult",",,,") ) /// active recognizer - /// (Originally from ..\FSComp.txt:918) + /// (Originally from ..\FSComp.txt:919) static member typeInfoActiveRecognizer() = (GetStringFunc("typeInfoActiveRecognizer",",,,") ) /// field - /// (Originally from ..\FSComp.txt:919) + /// (Originally from ..\FSComp.txt:920) static member typeInfoField() = (GetStringFunc("typeInfoField",",,,") ) /// event - /// (Originally from ..\FSComp.txt:920) + /// (Originally from ..\FSComp.txt:921) static member typeInfoEvent() = (GetStringFunc("typeInfoEvent",",,,") ) /// property - /// (Originally from ..\FSComp.txt:921) + /// (Originally from ..\FSComp.txt:922) static member typeInfoProperty() = (GetStringFunc("typeInfoProperty",",,,") ) /// extension - /// (Originally from ..\FSComp.txt:922) + /// (Originally from ..\FSComp.txt:923) static member typeInfoExtension() = (GetStringFunc("typeInfoExtension",",,,") ) /// custom operation - /// (Originally from ..\FSComp.txt:923) + /// (Originally from ..\FSComp.txt:924) static member typeInfoCustomOperation() = (GetStringFunc("typeInfoCustomOperation",",,,") ) /// argument - /// (Originally from ..\FSComp.txt:924) + /// (Originally from ..\FSComp.txt:925) static member typeInfoArgument() = (GetStringFunc("typeInfoArgument",",,,") ) + /// anonymous record field + /// (Originally from ..\FSComp.txt:926) + static member typeInfoAnonRecdField() = (GetStringFunc("typeInfoAnonRecdField",",,,") ) /// patvar - /// (Originally from ..\FSComp.txt:925) + /// (Originally from ..\FSComp.txt:927) static member typeInfoPatternVariable() = (GetStringFunc("typeInfoPatternVariable",",,,") ) /// namespace - /// (Originally from ..\FSComp.txt:926) + /// (Originally from ..\FSComp.txt:928) static member typeInfoNamespace() = (GetStringFunc("typeInfoNamespace",",,,") ) /// module - /// (Originally from ..\FSComp.txt:927) + /// (Originally from ..\FSComp.txt:929) static member typeInfoModule() = (GetStringFunc("typeInfoModule",",,,") ) /// namespace/module - /// (Originally from ..\FSComp.txt:928) + /// (Originally from ..\FSComp.txt:930) static member typeInfoNamespaceOrModule() = (GetStringFunc("typeInfoNamespaceOrModule",",,,") ) /// from %s - /// (Originally from ..\FSComp.txt:929) + /// (Originally from ..\FSComp.txt:931) static member typeInfoFromFirst(a0 : System.String) = (GetStringFunc("typeInfoFromFirst",",,,%s,,,") a0) /// also from %s - /// (Originally from ..\FSComp.txt:930) + /// (Originally from ..\FSComp.txt:932) static member typeInfoFromNext(a0 : System.String) = (GetStringFunc("typeInfoFromNext",",,,%s,,,") a0) /// generated property - /// (Originally from ..\FSComp.txt:931) + /// (Originally from ..\FSComp.txt:933) static member typeInfoGeneratedProperty() = (GetStringFunc("typeInfoGeneratedProperty",",,,") ) /// generated type - /// (Originally from ..\FSComp.txt:932) + /// (Originally from ..\FSComp.txt:934) static member typeInfoGeneratedType() = (GetStringFunc("typeInfoGeneratedType",",,,") ) /// Found by AssemblyFolders registry key - /// (Originally from ..\FSComp.txt:933) + /// (Originally from ..\FSComp.txt:935) static member assemblyResolutionFoundByAssemblyFoldersKey() = (GetStringFunc("assemblyResolutionFoundByAssemblyFoldersKey",",,,") ) /// Found by AssemblyFoldersEx registry key - /// (Originally from ..\FSComp.txt:934) + /// (Originally from ..\FSComp.txt:936) static member assemblyResolutionFoundByAssemblyFoldersExKey() = (GetStringFunc("assemblyResolutionFoundByAssemblyFoldersExKey",",,,") ) /// .NET Framework - /// (Originally from ..\FSComp.txt:935) + /// (Originally from ..\FSComp.txt:937) static member assemblyResolutionNetFramework() = (GetStringFunc("assemblyResolutionNetFramework",",,,") ) /// Global Assembly Cache - /// (Originally from ..\FSComp.txt:936) + /// (Originally from ..\FSComp.txt:938) static member assemblyResolutionGAC() = (GetStringFunc("assemblyResolutionGAC",",,,") ) /// Recursive class hierarchy in type '%s' - /// (Originally from ..\FSComp.txt:937) + /// (Originally from ..\FSComp.txt:939) static member recursiveClassHierarchy(a0 : System.String) = (1089, GetStringFunc("recursiveClassHierarchy",",,,%s,,,") a0) /// Invalid recursive reference to an abstract slot - /// (Originally from ..\FSComp.txt:938) + /// (Originally from ..\FSComp.txt:940) 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:939) + /// (Originally from ..\FSComp.txt:941) 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:940) + /// (Originally from ..\FSComp.txt:942) 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:941) + /// (Originally from ..\FSComp.txt:943) 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:942) + /// (Originally from ..\FSComp.txt:944) 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:943) + /// (Originally from ..\FSComp.txt:945) 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:944) + /// (Originally from ..\FSComp.txt:946) 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:945) + /// (Originally from ..\FSComp.txt:947) static member structOrClassFieldIsNotAccessible(a0 : System.String) = (1097, GetStringFunc("structOrClassFieldIsNotAccessible",",,,%s,,,") a0) /// This construct is experimental - /// (Originally from ..\FSComp.txt:946) + /// (Originally from ..\FSComp.txt:948) static member experimentalConstruct() = (GetStringFunc("experimentalConstruct",",,,") ) /// No Invoke methods found for delegate type - /// (Originally from ..\FSComp.txt:947) + /// (Originally from ..\FSComp.txt:949) static member noInvokeMethodsFound() = (1099, GetStringFunc("noInvokeMethodsFound",",,,") ) /// More than one Invoke method found for delegate type - /// (Originally from ..\FSComp.txt:948) + /// (Originally from ..\FSComp.txt:950) static member moreThanOneInvokeMethodFound() = (GetStringFunc("moreThanOneInvokeMethodFound",",,,") ) /// Delegates are not allowed to have curried signatures - /// (Originally from ..\FSComp.txt:949) + /// (Originally from ..\FSComp.txt:951) static member delegatesNotAllowedToHaveCurriedSignatures() = (1101, GetStringFunc("delegatesNotAllowedToHaveCurriedSignatures",",,,") ) /// Unexpected Expr.TyChoose - /// (Originally from ..\FSComp.txt:950) + /// (Originally from ..\FSComp.txt:952) 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:951) + /// (Originally from ..\FSComp.txt:953) static member tlrLambdaLiftingOptimizationsNotApplied() = (1103, GetStringFunc("tlrLambdaLiftingOptimizationsNotApplied",",,,") ) /// Identifiers containing '@' are reserved for use in F# code generation - /// (Originally from ..\FSComp.txt:952) + /// (Originally from ..\FSComp.txt:954) static member lexhlpIdentifiersContainingAtSymbolReserved() = (1104, GetStringFunc("lexhlpIdentifiersContainingAtSymbolReserved",",,,") ) /// The identifier '%s' is reserved for future use by F# - /// (Originally from ..\FSComp.txt:953) + /// (Originally from ..\FSComp.txt:955) static member lexhlpIdentifierReserved(a0 : System.String) = (GetStringFunc("lexhlpIdentifierReserved",",,,%s,,,") a0) /// Missing variable '%s' - /// (Originally from ..\FSComp.txt:954) + /// (Originally from ..\FSComp.txt:956) static member patcMissingVariable(a0 : System.String) = (1106, GetStringFunc("patcMissingVariable",",,,%s,,,") a0) /// Partial active patterns may only generate one result - /// (Originally from ..\FSComp.txt:955) + /// (Originally from ..\FSComp.txt:957) 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:956) + /// (Originally from ..\FSComp.txt:958) 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:957) + /// (Originally from ..\FSComp.txt:959) 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:958) + /// (Originally from ..\FSComp.txt:960) 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:959) + /// (Originally from ..\FSComp.txt:961) 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:960) + /// (Originally from ..\FSComp.txt:962) 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:961) + /// (Originally from ..\FSComp.txt:963) 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:962) + /// (Originally from ..\FSComp.txt:964) static member optValueMarkedInlineButWasNotBoundInTheOptEnv(a0 : System.String) = (1114, GetStringFunc("optValueMarkedInlineButWasNotBoundInTheOptEnv",",,,%s,,,") a0) /// Local value %s not found during optimization - /// (Originally from ..\FSComp.txt:963) + /// (Originally from ..\FSComp.txt:965) static member optLocalValueNotFoundDuringOptimization(a0 : System.String) = (1115, GetStringFunc("optLocalValueNotFoundDuringOptimization",",,,%s,,,") a0) /// A value marked as 'inline' has an unexpected value - /// (Originally from ..\FSComp.txt:964) + /// (Originally from ..\FSComp.txt:966) static member optValueMarkedInlineHasUnexpectedValue() = (1116, GetStringFunc("optValueMarkedInlineHasUnexpectedValue",",,,") ) /// A value marked as 'inline' could not be inlined - /// (Originally from ..\FSComp.txt:965) + /// (Originally from ..\FSComp.txt:967) 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:966) + /// (Originally from ..\FSComp.txt:968) static member optFailedToInlineValue(a0 : System.String) = (1118, GetStringFunc("optFailedToInlineValue",",,,%s,,,") a0) /// Recursive ValValue %s - /// (Originally from ..\FSComp.txt:967) + /// (Originally from ..\FSComp.txt:969) 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:968) + /// (Originally from ..\FSComp.txt:970) 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:969) + /// (Originally from ..\FSComp.txt:971) 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:970) + /// (Originally from ..\FSComp.txt:972) static member lexfltSeparatorTokensOfPatternMatchMisaligned() = (GetStringFunc("lexfltSeparatorTokensOfPatternMatchMisaligned",",,,") ) /// Invalid module/expression/type - /// (Originally from ..\FSComp.txt:971) + /// (Originally from ..\FSComp.txt:973) 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:972) + /// (Originally from ..\FSComp.txt:974) 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:973) + /// (Originally from ..\FSComp.txt:975) 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:974) + /// (Originally from ..\FSComp.txt:976) static member nrGlobalUsedOnlyAsFirstName() = (1126, GetStringFunc("nrGlobalUsedOnlyAsFirstName",",,,") ) /// This is not a constructor or literal, or a constructor is being used incorrectly - /// (Originally from ..\FSComp.txt:975) + /// (Originally from ..\FSComp.txt:977) static member nrIsNotConstructorOrLiteral() = (1127, GetStringFunc("nrIsNotConstructorOrLiteral",",,,") ) /// Unexpected empty long identifier - /// (Originally from ..\FSComp.txt:976) + /// (Originally from ..\FSComp.txt:978) static member nrUnexpectedEmptyLongId() = (1128, GetStringFunc("nrUnexpectedEmptyLongId",",,,") ) /// The record type '%s' does not contain a label '%s'. - /// (Originally from ..\FSComp.txt:977) + /// (Originally from ..\FSComp.txt:979) static member nrRecordDoesNotContainSuchLabel(a0 : System.String, a1 : System.String) = (1129, GetStringFunc("nrRecordDoesNotContainSuchLabel",",,,%s,,,%s,,,") a0 a1) /// Invalid field label - /// (Originally from ..\FSComp.txt:978) + /// (Originally from ..\FSComp.txt:980) static member nrInvalidFieldLabel() = (1130, GetStringFunc("nrInvalidFieldLabel",",,,") ) /// Invalid expression '%s' - /// (Originally from ..\FSComp.txt:979) + /// (Originally from ..\FSComp.txt:981) static member nrInvalidExpression(a0 : System.String) = (1132, GetStringFunc("nrInvalidExpression",",,,%s,,,") a0) /// No constructors are available for the type '%s' - /// (Originally from ..\FSComp.txt:980) + /// (Originally from ..\FSComp.txt:982) 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:981) + /// (Originally from ..\FSComp.txt:983) 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:982) + /// (Originally from ..\FSComp.txt:984) 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:983) + /// (Originally from ..\FSComp.txt:985) 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:984) + /// (Originally from ..\FSComp.txt:986) 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:988) + /// (Originally from ..\FSComp.txt:990) static member lexCharNotAllowedInOperatorNames(a0 : System.String) = (GetStringFunc("lexCharNotAllowedInOperatorNames",",,,%s,,,") a0) /// Unexpected character '%s' - /// (Originally from ..\FSComp.txt:989) + /// (Originally from ..\FSComp.txt:991) 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:990) + /// (Originally from ..\FSComp.txt:992) static member lexByteArrayCannotEncode() = (1140, GetStringFunc("lexByteArrayCannotEncode",",,,") ) /// Identifiers followed by '%s' are reserved for future use - /// (Originally from ..\FSComp.txt:991) + /// (Originally from ..\FSComp.txt:993) 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:992) + /// (Originally from ..\FSComp.txt:994) static member lexOutsideEightBitSigned() = (1142, GetStringFunc("lexOutsideEightBitSigned",",,,") ) /// This number is outside the allowable range for hexadecimal 8-bit signed integers - /// (Originally from ..\FSComp.txt:993) + /// (Originally from ..\FSComp.txt:995) static member lexOutsideEightBitSignedHex() = (1143, GetStringFunc("lexOutsideEightBitSignedHex",",,,") ) /// This number is outside the allowable range for 8-bit unsigned integers - /// (Originally from ..\FSComp.txt:994) + /// (Originally from ..\FSComp.txt:996) static member lexOutsideEightBitUnsigned() = (1144, GetStringFunc("lexOutsideEightBitUnsigned",",,,") ) /// This number is outside the allowable range for 16-bit signed integers - /// (Originally from ..\FSComp.txt:995) + /// (Originally from ..\FSComp.txt:997) static member lexOutsideSixteenBitSigned() = (1145, GetStringFunc("lexOutsideSixteenBitSigned",",,,") ) /// This number is outside the allowable range for 16-bit unsigned integers - /// (Originally from ..\FSComp.txt:996) + /// (Originally from ..\FSComp.txt:998) static member lexOutsideSixteenBitUnsigned() = (1146, GetStringFunc("lexOutsideSixteenBitUnsigned",",,,") ) /// This number is outside the allowable range for 32-bit signed integers - /// (Originally from ..\FSComp.txt:997) + /// (Originally from ..\FSComp.txt:999) static member lexOutsideThirtyTwoBitSigned() = (1147, GetStringFunc("lexOutsideThirtyTwoBitSigned",",,,") ) /// This number is outside the allowable range for 32-bit unsigned integers - /// (Originally from ..\FSComp.txt:998) + /// (Originally from ..\FSComp.txt:1000) static member lexOutsideThirtyTwoBitUnsigned() = (1148, GetStringFunc("lexOutsideThirtyTwoBitUnsigned",",,,") ) /// This number is outside the allowable range for 64-bit signed integers - /// (Originally from ..\FSComp.txt:999) + /// (Originally from ..\FSComp.txt:1001) static member lexOutsideSixtyFourBitSigned() = (1149, GetStringFunc("lexOutsideSixtyFourBitSigned",",,,") ) /// This number is outside the allowable range for 64-bit unsigned integers - /// (Originally from ..\FSComp.txt:1000) + /// (Originally from ..\FSComp.txt:1002) static member lexOutsideSixtyFourBitUnsigned() = (1150, GetStringFunc("lexOutsideSixtyFourBitUnsigned",",,,") ) /// This number is outside the allowable range for signed native integers - /// (Originally from ..\FSComp.txt:1001) + /// (Originally from ..\FSComp.txt:1003) static member lexOutsideNativeSigned() = (1151, GetStringFunc("lexOutsideNativeSigned",",,,") ) /// This number is outside the allowable range for unsigned native integers - /// (Originally from ..\FSComp.txt:1002) + /// (Originally from ..\FSComp.txt:1004) static member lexOutsideNativeUnsigned() = (1152, GetStringFunc("lexOutsideNativeUnsigned",",,,") ) /// Invalid floating point number - /// (Originally from ..\FSComp.txt:1003) + /// (Originally from ..\FSComp.txt:1005) static member lexInvalidFloat() = (1153, GetStringFunc("lexInvalidFloat",",,,") ) /// This number is outside the allowable range for decimal literals - /// (Originally from ..\FSComp.txt:1004) + /// (Originally from ..\FSComp.txt:1006) static member lexOusideDecimal() = (1154, GetStringFunc("lexOusideDecimal",",,,") ) /// This number is outside the allowable range for 32-bit floats - /// (Originally from ..\FSComp.txt:1005) + /// (Originally from ..\FSComp.txt:1007) 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:1006) + /// (Originally from ..\FSComp.txt:1008) static member lexInvalidNumericLiteral() = (1156, GetStringFunc("lexInvalidNumericLiteral",",,,") ) /// This is not a valid byte literal - /// (Originally from ..\FSComp.txt:1007) + /// (Originally from ..\FSComp.txt:1009) static member lexInvalidByteLiteral() = (1157, GetStringFunc("lexInvalidByteLiteral",",,,") ) /// This is not a valid character literal - /// (Originally from ..\FSComp.txt:1008) + /// (Originally from ..\FSComp.txt:1010) static member lexInvalidCharLiteral() = (1158, GetStringFunc("lexInvalidCharLiteral",",,,") ) /// This Unicode encoding is only valid in string literals - /// (Originally from ..\FSComp.txt:1009) + /// (Originally from ..\FSComp.txt:1011) static member lexThisUnicodeOnlyInStringLiterals() = (1159, GetStringFunc("lexThisUnicodeOnlyInStringLiterals",",,,") ) /// This token is reserved for future use - /// (Originally from ..\FSComp.txt:1010) + /// (Originally from ..\FSComp.txt:1012) static member lexTokenReserved() = (1160, GetStringFunc("lexTokenReserved",",,,") ) /// TABs are not allowed in F# code unless the #indent \"off\" option is used - /// (Originally from ..\FSComp.txt:1011) + /// (Originally from ..\FSComp.txt:1013) static member lexTabsNotAllowed() = (1161, GetStringFunc("lexTabsNotAllowed",",,,") ) /// Invalid line number: '%s' - /// (Originally from ..\FSComp.txt:1012) + /// (Originally from ..\FSComp.txt:1014) 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:1013) + /// (Originally from ..\FSComp.txt:1015) static member lexHashIfMustBeFirst() = (1163, GetStringFunc("lexHashIfMustBeFirst",",,,") ) /// #else has no matching #if - /// (Originally from ..\FSComp.txt:1014) + /// (Originally from ..\FSComp.txt:1016) static member lexHashElseNoMatchingIf() = (GetStringFunc("lexHashElseNoMatchingIf",",,,") ) /// #endif required for #else - /// (Originally from ..\FSComp.txt:1015) + /// (Originally from ..\FSComp.txt:1017) static member lexHashEndifRequiredForElse() = (GetStringFunc("lexHashEndifRequiredForElse",",,,") ) /// #else directive must appear as the first non-whitespace character on a line - /// (Originally from ..\FSComp.txt:1016) + /// (Originally from ..\FSComp.txt:1018) static member lexHashElseMustBeFirst() = (1166, GetStringFunc("lexHashElseMustBeFirst",",,,") ) /// #endif has no matching #if - /// (Originally from ..\FSComp.txt:1017) + /// (Originally from ..\FSComp.txt:1019) static member lexHashEndingNoMatchingIf() = (GetStringFunc("lexHashEndingNoMatchingIf",",,,") ) /// #endif directive must appear as the first non-whitespace character on a line - /// (Originally from ..\FSComp.txt:1018) + /// (Originally from ..\FSComp.txt:1020) static member lexHashEndifMustBeFirst() = (1168, GetStringFunc("lexHashEndifMustBeFirst",",,,") ) /// #if directive should be immediately followed by an identifier - /// (Originally from ..\FSComp.txt:1019) + /// (Originally from ..\FSComp.txt:1021) static member lexHashIfMustHaveIdent() = (1169, GetStringFunc("lexHashIfMustHaveIdent",",,,") ) /// Syntax error. Wrong nested #endif, unexpected tokens before it. - /// (Originally from ..\FSComp.txt:1020) + /// (Originally from ..\FSComp.txt:1022) static member lexWrongNestedHashEndif() = (1170, GetStringFunc("lexWrongNestedHashEndif",",,,") ) /// #! may only appear as the first line at the start of a file. - /// (Originally from ..\FSComp.txt:1021) + /// (Originally from ..\FSComp.txt:1023) static member lexHashBangMustBeFirstInFile() = (GetStringFunc("lexHashBangMustBeFirstInFile",",,,") ) /// Expected single line comment or end of line - /// (Originally from ..\FSComp.txt:1022) + /// (Originally from ..\FSComp.txt:1024) 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:1023) + /// (Originally from ..\FSComp.txt:1025) 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:1024) + /// (Originally from ..\FSComp.txt:1026) 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:1025) + /// (Originally from ..\FSComp.txt:1027) 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:1026) + /// (Originally from ..\FSComp.txt:1028) 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:1027) + /// (Originally from ..\FSComp.txt:1029) 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:1028) + /// (Originally from ..\FSComp.txt:1030) 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:1029) + /// (Originally from ..\FSComp.txt:1031) 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:1030) + /// (Originally from ..\FSComp.txt:1032) 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:1031) + /// (Originally from ..\FSComp.txt:1033) 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:1032) + /// (Originally from ..\FSComp.txt:1034) 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:1033) + /// (Originally from ..\FSComp.txt:1035) 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:1034) + /// (Originally from ..\FSComp.txt:1036) 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:1035) + /// (Originally from ..\FSComp.txt:1037) static member tcStructsMustDeclareTypesOfImplicitCtorArgsExplicitly() = (1181, GetStringFunc("tcStructsMustDeclareTypesOfImplicitCtorArgsExplicitly",",,,") ) /// The value '%s' is unused - /// (Originally from ..\FSComp.txt:1036) + /// (Originally from ..\FSComp.txt:1038) 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:1037) + /// (Originally from ..\FSComp.txt:1039) 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:1038) + /// (Originally from ..\FSComp.txt:1040) static member parsGetterAtMostOneArgument() = (1184, GetStringFunc("parsGetterAtMostOneArgument",",,,") ) /// A setter property may have at most two argument groups - /// (Originally from ..\FSComp.txt:1039) + /// (Originally from ..\FSComp.txt:1041) static member parsSetterAtMostTwoArguments() = (1185, GetStringFunc("parsSetterAtMostTwoArguments",",,,") ) /// Invalid property getter or setter - /// (Originally from ..\FSComp.txt:1040) + /// (Originally from ..\FSComp.txt:1042) static member parsInvalidProperty() = (1186, GetStringFunc("parsInvalidProperty",",,,") ) /// An indexer property must be given at least one argument - /// (Originally from ..\FSComp.txt:1041) + /// (Originally from ..\FSComp.txt:1043) 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:1042) + /// (Originally from ..\FSComp.txt:1044) static member tastInvalidAddressOfMutableAcrossAssemblyBoundary() = (1188, GetStringFunc("tastInvalidAddressOfMutableAcrossAssemblyBoundary",",,,") ) /// 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. - /// (Originally from ..\FSComp.txt:1043) + /// (Originally from ..\FSComp.txt:1045) static member parsNonAdjacentTypars() = (1189, GetStringFunc("parsNonAdjacentTypars",",,,") ) /// 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. - /// (Originally from ..\FSComp.txt:1044) + /// (Originally from ..\FSComp.txt:1046) 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:1045) + /// (Originally from ..\FSComp.txt:1047) static member parsNonAtomicType() = (GetStringFunc("parsNonAtomicType",",,,") ) /// The module/namespace '%s' from compilation unit '%s' did not contain the module/namespace '%s' - /// (Originally from ..\FSComp.txt:1048) + /// (Originally from ..\FSComp.txt:1050) 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:1049) + /// (Originally from ..\FSComp.txt:1051) 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:1050) + /// (Originally from ..\FSComp.txt:1052) 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:1051) + /// (Originally from ..\FSComp.txt:1053) 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:1052) + /// (Originally from ..\FSComp.txt:1054) 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:1053) + /// (Originally from ..\FSComp.txt:1055) 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:1054) + /// (Originally from ..\FSComp.txt:1056) static member tcAttribArgsDiffer(a0 : System.String) = (1200, GetStringFunc("tcAttribArgsDiffer",",,,%s,,,") a0) /// Cannot call an abstract base member: '%s' - /// (Originally from ..\FSComp.txt:1055) + /// (Originally from ..\FSComp.txt:1057) 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:1056) + /// (Originally from ..\FSComp.txt:1058) 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:1059) + /// (Originally from ..\FSComp.txt:1061) 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:1061) + /// (Originally from ..\FSComp.txt:1063) 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:1062) + /// (Originally from ..\FSComp.txt:1064) static member tcInterfacesShouldUseInheritNotInterface() = (1207, GetStringFunc("tcInterfacesShouldUseInheritNotInterface",",,,") ) /// Invalid prefix operator - /// (Originally from ..\FSComp.txt:1063) + /// (Originally from ..\FSComp.txt:1065) static member parsInvalidPrefixOperator() = (1208, GetStringFunc("parsInvalidPrefixOperator",",,,") ) /// Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. - /// (Originally from ..\FSComp.txt:1064) + /// (Originally from ..\FSComp.txt:1066) static member parsInvalidPrefixOperatorDefinition() = (1208, GetStringFunc("parsInvalidPrefixOperatorDefinition",",,,") ) /// The file extensions '.ml' and '.mli' are for ML compatibility - /// (Originally from ..\FSComp.txt:1065) + /// (Originally from ..\FSComp.txt:1067) static member buildCompilingExtensionIsForML() = (GetStringFunc("buildCompilingExtensionIsForML",",,,") ) /// Consider using a file with extension '.ml' or '.mli' instead - /// (Originally from ..\FSComp.txt:1066) + /// (Originally from ..\FSComp.txt:1068) static member lexIndentOffForML() = (GetStringFunc("lexIndentOffForML",",,,") ) /// Active pattern '%s' is not a function - /// (Originally from ..\FSComp.txt:1067) + /// (Originally from ..\FSComp.txt:1069) 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:1068) + /// (Originally from ..\FSComp.txt:1070) 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:1069) + /// (Originally from ..\FSComp.txt:1071) 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:1070) + /// (Originally from ..\FSComp.txt:1072) static member tcOptionalArgsMustComeAfterNonOptionalArgs() = (1212, GetStringFunc("tcOptionalArgsMustComeAfterNonOptionalArgs",",,,") ) /// Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes - /// (Originally from ..\FSComp.txt:1071) + /// (Originally from ..\FSComp.txt:1073) 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:1073) + /// (Originally from ..\FSComp.txt:1075) 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:1074) + /// (Originally from ..\FSComp.txt:1076) static member ilwriteMDBFileNameCannotBeChangedWarning() = (1216, GetStringFunc("ilwriteMDBFileNameCannotBeChangedWarning",",,,") ) /// MDB generation failed. Could not find compatible member %s - /// (Originally from ..\FSComp.txt:1075) + /// (Originally from ..\FSComp.txt:1077) 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:1076) + /// (Originally from ..\FSComp.txt:1078) static member ilwriteErrorCreatingMdb() = (1218, GetStringFunc("ilwriteErrorCreatingMdb",",,,") ) /// The union case named '%s' conflicts with the generated type '%s' - /// (Originally from ..\FSComp.txt:1077) + /// (Originally from ..\FSComp.txt:1079) 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:1078) + /// (Originally from ..\FSComp.txt:1080) 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:1079) + /// (Originally from ..\FSComp.txt:1081) 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:1080) + /// (Originally from ..\FSComp.txt:1082) 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:1081) + /// (Originally from ..\FSComp.txt:1083) 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:1082) + /// (Originally from ..\FSComp.txt:1084) 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:1083) + /// (Originally from ..\FSComp.txt:1085) 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:1084) + /// (Originally from ..\FSComp.txt:1086) 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:1085) + /// (Originally from ..\FSComp.txt:1087) 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:1086) + /// (Originally from ..\FSComp.txt:1088) 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:1087) + /// (Originally from ..\FSComp.txt:1089) 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:1088) + /// (Originally from ..\FSComp.txt:1090) static member parsEofInTripleQuoteStringInComment() = (1233, GetStringFunc("parsEofInTripleQuoteStringInComment",",,,") ) /// This type test or downcast will ignore the unit-of-measure '%s' - /// (Originally from ..\FSComp.txt:1089) + /// (Originally from ..\FSComp.txt:1091) static member tcTypeTestLosesMeasures(a0 : System.String) = (1240, GetStringFunc("tcTypeTestLosesMeasures",",,,%s,,,") a0) /// Expected type argument or static argument - /// (Originally from ..\FSComp.txt:1090) + /// (Originally from ..\FSComp.txt:1092) static member parsMissingTypeArgs() = (1241, GetStringFunc("parsMissingTypeArgs",",,,") ) /// Unmatched '<'. Expected closing '>' - /// (Originally from ..\FSComp.txt:1091) + /// (Originally from ..\FSComp.txt:1093) 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:1092) + /// (Originally from ..\FSComp.txt:1094) static member parsUnexpectedQuotationOperatorInTypeAliasDidYouMeanVerbatimString() = (1243, GetStringFunc("parsUnexpectedQuotationOperatorInTypeAliasDidYouMeanVerbatimString",",,,") ) /// Attempted to parse this as an operator name, but failed - /// (Originally from ..\FSComp.txt:1093) + /// (Originally from ..\FSComp.txt:1095) static member parsErrorParsingAsOperatorName() = (1244, GetStringFunc("parsErrorParsingAsOperatorName",",,,") ) /// \U%s is not a valid Unicode character escape sequence - /// (Originally from ..\FSComp.txt:1094) + /// (Originally from ..\FSComp.txt:1096) 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:1095) + /// (Originally from ..\FSComp.txt:1097) 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:1096) + /// (Originally from ..\FSComp.txt:1098) 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:1098) + /// (Originally from ..\FSComp.txt:1100) static member toolLocationHelperUnsupportedFrameworkVersion(a0 : System.String) = (1300, GetStringFunc("toolLocationHelperUnsupportedFrameworkVersion",",,,%s,,,") a0) /// Invalid Magic value in CLR Header - /// (Originally from ..\FSComp.txt:1102) + /// (Originally from ..\FSComp.txt:1104) static member ilSignInvalidMagicValue() = (1301, GetStringFunc("ilSignInvalidMagicValue",",,,") ) /// Bad image format - /// (Originally from ..\FSComp.txt:1103) + /// (Originally from ..\FSComp.txt:1105) static member ilSignBadImageFormat() = (1302, GetStringFunc("ilSignBadImageFormat",",,,") ) /// Private key expected - /// (Originally from ..\FSComp.txt:1104) + /// (Originally from ..\FSComp.txt:1106) static member ilSignPrivateKeyExpected() = (1303, GetStringFunc("ilSignPrivateKeyExpected",",,,") ) /// RSA key expected - /// (Originally from ..\FSComp.txt:1105) + /// (Originally from ..\FSComp.txt:1107) static member ilSignRsaKeyExpected() = (1304, GetStringFunc("ilSignRsaKeyExpected",",,,") ) /// Invalid bit Length - /// (Originally from ..\FSComp.txt:1106) + /// (Originally from ..\FSComp.txt:1108) static member ilSignInvalidBitLen() = (1305, GetStringFunc("ilSignInvalidBitLen",",,,") ) /// Invalid RSAParameters structure - '{0}' expected - /// (Originally from ..\FSComp.txt:1107) + /// (Originally from ..\FSComp.txt:1109) static member ilSignInvalidRSAParams() = (1306, GetStringFunc("ilSignInvalidRSAParams",",,,") ) /// Invalid algId - 'Exponent' expected - /// (Originally from ..\FSComp.txt:1108) + /// (Originally from ..\FSComp.txt:1110) static member ilSignInvalidAlgId() = (1307, GetStringFunc("ilSignInvalidAlgId",",,,") ) /// Invalid signature size - /// (Originally from ..\FSComp.txt:1109) + /// (Originally from ..\FSComp.txt:1111) static member ilSignInvalidSignatureSize() = (1308, GetStringFunc("ilSignInvalidSignatureSize",",,,") ) /// No signature directory - /// (Originally from ..\FSComp.txt:1110) + /// (Originally from ..\FSComp.txt:1112) static member ilSignNoSignatureDirectory() = (1309, GetStringFunc("ilSignNoSignatureDirectory",",,,") ) /// Invalid Public Key blob - /// (Originally from ..\FSComp.txt:1111) + /// (Originally from ..\FSComp.txt:1113) static member ilSignInvalidPKBlob() = (1310, GetStringFunc("ilSignInvalidPKBlob",",,,") ) /// Exiting - too many errors - /// (Originally from ..\FSComp.txt:1113) + /// (Originally from ..\FSComp.txt:1115) static member fscTooManyErrors() = (GetStringFunc("fscTooManyErrors",",,,") ) /// The documentation file has no .xml suffix - /// (Originally from ..\FSComp.txt:1114) + /// (Originally from ..\FSComp.txt:1116) static member docfileNoXmlSuffix() = (2001, GetStringFunc("docfileNoXmlSuffix",",,,") ) /// No implementation files specified - /// (Originally from ..\FSComp.txt:1115) + /// (Originally from ..\FSComp.txt:1117) static member fscNoImplementationFiles() = (2002, GetStringFunc("fscNoImplementationFiles",",,,") ) /// The attribute %s specified version '%s', but this value is invalid and has been ignored - /// (Originally from ..\FSComp.txt:1116) + /// (Originally from ..\FSComp.txt:1118) 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:1117) + /// (Originally from ..\FSComp.txt:1119) 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:1118) + /// (Originally from ..\FSComp.txt:1120) 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:1119) + /// (Originally from ..\FSComp.txt:1121) static member fscQuotationLiteralsStaticLinking0() = (2006, GetStringFunc("fscQuotationLiteralsStaticLinking0",",,,") ) /// Static linking may not include a .EXE - /// (Originally from ..\FSComp.txt:1120) + /// (Originally from ..\FSComp.txt:1122) static member fscStaticLinkingNoEXE() = (2007, GetStringFunc("fscStaticLinkingNoEXE",",,,") ) /// Static linking may not include a mixed managed/unmanaged DLL - /// (Originally from ..\FSComp.txt:1121) + /// (Originally from ..\FSComp.txt:1123) static member fscStaticLinkingNoMixedDLL() = (2008, GetStringFunc("fscStaticLinkingNoMixedDLL",",,,") ) /// Ignoring mixed managed/unmanaged assembly '%s' during static linking - /// (Originally from ..\FSComp.txt:1122) + /// (Originally from ..\FSComp.txt:1124) 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:1123) + /// (Originally from ..\FSComp.txt:1125) 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:1124) + /// (Originally from ..\FSComp.txt:1126) static member fscAssemblyNotFoundInDependencySet(a0 : System.String) = (2012, GetStringFunc("fscAssemblyNotFoundInDependencySet",",,,%s,,,") a0) /// The key file '%s' could not be opened - /// (Originally from ..\FSComp.txt:1125) + /// (Originally from ..\FSComp.txt:1127) static member fscKeyFileCouldNotBeOpened(a0 : System.String) = (2013, GetStringFunc("fscKeyFileCouldNotBeOpened",",,,%s,,,") a0) /// A problem occurred writing the binary '%s': %s - /// (Originally from ..\FSComp.txt:1126) + /// (Originally from ..\FSComp.txt:1128) 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:1127) + /// (Originally from ..\FSComp.txt:1129) 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:1128) + /// (Originally from ..\FSComp.txt:1130) 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:1129) + /// (Originally from ..\FSComp.txt:1131) 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:1130) + /// (Originally from ..\FSComp.txt:1132) 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:1131) + /// (Originally from ..\FSComp.txt:1133) 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:1132) + /// (Originally from ..\FSComp.txt:1134) 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:1133) + /// (Originally from ..\FSComp.txt:1135) static member fscRemotingError() = (2021, GetStringFunc("fscRemotingError",",,,") ) /// Problem with filename '%s': Illegal characters in path. - /// (Originally from ..\FSComp.txt:1134) + /// (Originally from ..\FSComp.txt:1136) 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:1135) + /// (Originally from ..\FSComp.txt:1137) 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:1136) + /// (Originally from ..\FSComp.txt:1138) 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:1137) + /// (Originally from ..\FSComp.txt:1139) 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:1138) + /// (Originally from ..\FSComp.txt:1140) static member fscDeterministicDebugRequiresPortablePdb() = (2026, GetStringFunc("fscDeterministicDebugRequiresPortablePdb",",,,") ) /// Character '%s' is not allowed in provided namespace name '%s' - /// (Originally from ..\FSComp.txt:1139) + /// (Originally from ..\FSComp.txt:1141) 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:1140) + /// (Originally from ..\FSComp.txt:1142) static member etNullOrEmptyMemberName(a0 : System.String) = (3001, GetStringFunc("etNullOrEmptyMemberName",",,,%s,,,") a0) /// The provided type '%s' returned a null member - /// (Originally from ..\FSComp.txt:1141) + /// (Originally from ..\FSComp.txt:1143) 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:1142) + /// (Originally from ..\FSComp.txt:1144) 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:1143) + /// (Originally from ..\FSComp.txt:1145) 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:1144) + /// (Originally from ..\FSComp.txt:1146) 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:1145) + /// (Originally from ..\FSComp.txt:1147) 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:1146) + /// (Originally from ..\FSComp.txt:1148) 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:1147) + /// (Originally from ..\FSComp.txt:1149) 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:1148) + /// (Originally from ..\FSComp.txt:1150) 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:1149) + /// (Originally from ..\FSComp.txt:1151) 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:1150) + /// (Originally from ..\FSComp.txt:1152) 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:1151) + /// (Originally from ..\FSComp.txt:1153) 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:1152) + /// (Originally from ..\FSComp.txt:1154) 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:1153) + /// (Originally from ..\FSComp.txt:1155) 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:1154) + /// (Originally from ..\FSComp.txt:1156) 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:1155) + /// (Originally from ..\FSComp.txt:1157) static member etOneOrMoreErrorsSeenDuringExtensionTypeSetting() = (3020, GetStringFunc("etOneOrMoreErrorsSeenDuringExtensionTypeSetting",",,,") ) /// Unexpected exception from provided type '%s' member '%s': %s - /// (Originally from ..\FSComp.txt:1156) + /// (Originally from ..\FSComp.txt:1158) 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:1157) + /// (Originally from ..\FSComp.txt:1159) 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:1158) + /// (Originally from ..\FSComp.txt:1160) 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:1159) + /// (Originally from ..\FSComp.txt:1161) 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:1160) + /// (Originally from ..\FSComp.txt:1162) 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:1161) + /// (Originally from ..\FSComp.txt:1163) 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:1162) + /// (Originally from ..\FSComp.txt:1164) 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:1163) + /// (Originally from ..\FSComp.txt:1165) static member etProviderDoesNotHaveValidConstructor() = (3032, GetStringFunc("etProviderDoesNotHaveValidConstructor",",,,") ) /// The type provider '%s' reported an error: %s - /// (Originally from ..\FSComp.txt:1164) + /// (Originally from ..\FSComp.txt:1166) 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:1165) + /// (Originally from ..\FSComp.txt:1167) 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:1166) + /// (Originally from ..\FSComp.txt:1168) 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:1167) + /// (Originally from ..\FSComp.txt:1169) 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:1168) + /// (Originally from ..\FSComp.txt:1170) 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:1169) + /// (Originally from ..\FSComp.txt:1171) 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:1170) + /// (Originally from ..\FSComp.txt:1172) 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:1171) + /// (Originally from ..\FSComp.txt:1173) 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:1172) + /// (Originally from ..\FSComp.txt:1174) static member etNestedProvidedTypesDoNotTakeStaticArgumentsOrGenericParameters() = (3044, GetStringFunc("etNestedProvidedTypesDoNotTakeStaticArgumentsOrGenericParameters",",,,") ) /// Invalid static argument to provided type. Expected an argument of kind '%s'. - /// (Originally from ..\FSComp.txt:1173) + /// (Originally from ..\FSComp.txt:1175) 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:1174) + /// (Originally from ..\FSComp.txt:1176) 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:1175) + /// (Originally from ..\FSComp.txt:1177) 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:1176) + /// (Originally from ..\FSComp.txt:1178) static member invalidNamespaceForProvidedType() = (GetStringFunc("invalidNamespaceForProvidedType",",,,") ) /// invalid full name for provided type - /// (Originally from ..\FSComp.txt:1177) + /// (Originally from ..\FSComp.txt:1179) static member invalidFullNameForProvidedType() = (GetStringFunc("invalidFullNameForProvidedType",",,,") ) /// The type provider returned 'null', which is not a valid return value from '%s' - /// (Originally from ..\FSComp.txt:1179) + /// (Originally from ..\FSComp.txt:1181) static member etProviderReturnedNull(a0 : System.String) = (3051, GetStringFunc("etProviderReturnedNull",",,,%s,,,") a0) /// The type provider constructor has thrown an exception: %s - /// (Originally from ..\FSComp.txt:1180) + /// (Originally from ..\FSComp.txt:1182) static member etTypeProviderConstructorException(a0 : System.String) = (3053, GetStringFunc("etTypeProviderConstructorException",",,,%s,,,") a0) /// Type provider '%s' returned null from GetInvokerExpression. - /// (Originally from ..\FSComp.txt:1181) + /// (Originally from ..\FSComp.txt:1183) 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:1182) + /// (Originally from ..\FSComp.txt:1184) 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:1183) + /// (Originally from ..\FSComp.txt:1185) 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:1184) + /// (Originally from ..\FSComp.txt:1186) 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:1185) + /// (Originally from ..\FSComp.txt:1187) 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:1186) + /// (Originally from ..\FSComp.txt:1188) 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:1187) + /// (Originally from ..\FSComp.txt:1189) 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:1188) + /// (Originally from ..\FSComp.txt:1190) 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:1189) + /// (Originally from ..\FSComp.txt:1191) 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:1190) + /// (Originally from ..\FSComp.txt:1192) 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:1191) + /// (Originally from ..\FSComp.txt:1193) 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:1192) + /// (Originally from ..\FSComp.txt:1194) 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:1193) + /// (Originally from ..\FSComp.txt:1195) 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:1194) + /// (Originally from ..\FSComp.txt:1196) 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:1195) + /// (Originally from ..\FSComp.txt:1197) 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:1196) + /// (Originally from ..\FSComp.txt:1198) 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:1197) + /// (Originally from ..\FSComp.txt:1199) 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:1198) + /// (Originally from ..\FSComp.txt:1200) 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:1199) + /// (Originally from ..\FSComp.txt:1201) 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:1200) + /// (Originally from ..\FSComp.txt:1202) 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:1201) + /// (Originally from ..\FSComp.txt:1203) 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:1202) + /// (Originally from ..\FSComp.txt:1204) static member etStaticParameterAlreadyHasValue(a0 : System.String) = (3083, GetStringFunc("etStaticParameterAlreadyHasValue",",,,%s,,,") a0) /// Multiple static parameters exist with name '%s' - /// (Originally from ..\FSComp.txt:1203) + /// (Originally from ..\FSComp.txt:1205) 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:1204) + /// (Originally from ..\FSComp.txt:1206) 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:1205) + /// (Originally from ..\FSComp.txt:1207) 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:1206) + /// (Originally from ..\FSComp.txt:1208) 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:1207) + /// (Originally from ..\FSComp.txt:1209) static member tcIfThenElseMayNotBeUsedWithinQueries() = (3090, GetStringFunc("tcIfThenElseMayNotBeUsedWithinQueries",",,,") ) /// Invalid argument to 'methodhandleof' during codegen - /// (Originally from ..\FSComp.txt:1208) + /// (Originally from ..\FSComp.txt:1210) 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:1209) + /// (Originally from ..\FSComp.txt:1211) 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:1210) + /// (Originally from ..\FSComp.txt:1212) 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:1211) + /// (Originally from ..\FSComp.txt:1213) 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:1212) + /// (Originally from ..\FSComp.txt:1214) 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:1213) + /// (Originally from ..\FSComp.txt:1215) 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:1214) + /// (Originally from ..\FSComp.txt:1216) 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:1215) + /// (Originally from ..\FSComp.txt:1217) static member customOperationTextLikeZip(a0 : System.String) = (GetStringFunc("customOperationTextLikeZip",",,,%s,,,") a0) /// '%s' must be followed by a variable name. Usage: %s. - /// (Originally from ..\FSComp.txt:1216) + /// (Originally from ..\FSComp.txt:1218) 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:1217) + /// (Originally from ..\FSComp.txt:1219) 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:1218) + /// (Originally from ..\FSComp.txt:1220) 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:1219) + /// (Originally from ..\FSComp.txt:1221) 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:1220) + /// (Originally from ..\FSComp.txt:1222) static member parsExpectedExpressionAfterToken() = (3100, GetStringFunc("parsExpectedExpressionAfterToken",",,,") ) /// Expected a type after this point - /// (Originally from ..\FSComp.txt:1221) + /// (Originally from ..\FSComp.txt:1223) static member parsExpectedTypeAfterToken() = (3101, GetStringFunc("parsExpectedTypeAfterToken",",,,") ) /// Unmatched '[<'. Expected closing '>]' - /// (Originally from ..\FSComp.txt:1222) + /// (Originally from ..\FSComp.txt:1224) static member parsUnmatchedLBrackLess() = (3102, GetStringFunc("parsUnmatchedLBrackLess",",,,") ) /// Unexpected end of input in 'match' expression. Expected 'match with | -> | -> ...'. - /// (Originally from ..\FSComp.txt:1223) + /// (Originally from ..\FSComp.txt:1225) static member parsUnexpectedEndOfFileMatch() = (3103, GetStringFunc("parsUnexpectedEndOfFileMatch",",,,") ) /// Unexpected end of input in 'try' expression. Expected 'try with ' or 'try finally '. - /// (Originally from ..\FSComp.txt:1224) + /// (Originally from ..\FSComp.txt:1226) static member parsUnexpectedEndOfFileTry() = (3104, GetStringFunc("parsUnexpectedEndOfFileTry",",,,") ) /// Unexpected end of input in 'while' expression. Expected 'while do '. - /// (Originally from ..\FSComp.txt:1225) + /// (Originally from ..\FSComp.txt:1227) static member parsUnexpectedEndOfFileWhile() = (3105, GetStringFunc("parsUnexpectedEndOfFileWhile",",,,") ) /// Unexpected end of input in 'for' expression. Expected 'for in do '. - /// (Originally from ..\FSComp.txt:1226) + /// (Originally from ..\FSComp.txt:1228) static member parsUnexpectedEndOfFileFor() = (3106, GetStringFunc("parsUnexpectedEndOfFileFor",",,,") ) /// Unexpected end of input in 'match' or 'try' expression - /// (Originally from ..\FSComp.txt:1227) + /// (Originally from ..\FSComp.txt:1229) 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:1228) + /// (Originally from ..\FSComp.txt:1230) 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:1229) + /// (Originally from ..\FSComp.txt:1231) static member parsUnexpectedEndOfFileElse() = (3109, GetStringFunc("parsUnexpectedEndOfFileElse",",,,") ) /// Unexpected end of input in body of lambda expression. Expected 'fun ... -> '. - /// (Originally from ..\FSComp.txt:1230) + /// (Originally from ..\FSComp.txt:1232) static member parsUnexpectedEndOfFileFunBody() = (3110, GetStringFunc("parsUnexpectedEndOfFileFunBody",",,,") ) /// Unexpected end of input in type arguments - /// (Originally from ..\FSComp.txt:1231) + /// (Originally from ..\FSComp.txt:1233) static member parsUnexpectedEndOfFileTypeArgs() = (3111, GetStringFunc("parsUnexpectedEndOfFileTypeArgs",",,,") ) /// Unexpected end of input in type signature - /// (Originally from ..\FSComp.txt:1232) + /// (Originally from ..\FSComp.txt:1234) static member parsUnexpectedEndOfFileTypeSignature() = (3112, GetStringFunc("parsUnexpectedEndOfFileTypeSignature",",,,") ) /// Unexpected end of input in type definition - /// (Originally from ..\FSComp.txt:1233) + /// (Originally from ..\FSComp.txt:1235) static member parsUnexpectedEndOfFileTypeDefinition() = (3113, GetStringFunc("parsUnexpectedEndOfFileTypeDefinition",",,,") ) /// Unexpected end of input in object members - /// (Originally from ..\FSComp.txt:1234) + /// (Originally from ..\FSComp.txt:1236) static member parsUnexpectedEndOfFileObjectMembers() = (3114, GetStringFunc("parsUnexpectedEndOfFileObjectMembers",",,,") ) /// Unexpected end of input in value, function or member definition - /// (Originally from ..\FSComp.txt:1235) + /// (Originally from ..\FSComp.txt:1237) static member parsUnexpectedEndOfFileDefinition() = (3115, GetStringFunc("parsUnexpectedEndOfFileDefinition",",,,") ) /// Unexpected end of input in expression - /// (Originally from ..\FSComp.txt:1236) + /// (Originally from ..\FSComp.txt:1238) static member parsUnexpectedEndOfFileExpression() = (3116, GetStringFunc("parsUnexpectedEndOfFileExpression",",,,") ) /// Unexpected end of type. Expected a name after this point. - /// (Originally from ..\FSComp.txt:1237) + /// (Originally from ..\FSComp.txt:1239) 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:1238) + /// (Originally from ..\FSComp.txt:1240) 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:1239) + /// (Originally from ..\FSComp.txt:1241) 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:1240) + /// (Originally from ..\FSComp.txt:1242) 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:1241) + /// (Originally from ..\FSComp.txt:1243) static member parsUnmatchedUse() = (3121, GetStringFunc("parsUnmatchedUse",",,,") ) /// Missing 'do' in 'while' expression. Expected 'while do '. - /// (Originally from ..\FSComp.txt:1242) + /// (Originally from ..\FSComp.txt:1244) static member parsWhileDoExpected() = (3122, GetStringFunc("parsWhileDoExpected",",,,") ) /// Missing 'do' in 'for' expression. Expected 'for in do '. - /// (Originally from ..\FSComp.txt:1243) + /// (Originally from ..\FSComp.txt:1245) static member parsForDoExpected() = (3123, GetStringFunc("parsForDoExpected",",,,") ) /// Invalid join relation in '%s'. Expected 'expr expr', where is =, =?, ?= or ?=?. - /// (Originally from ..\FSComp.txt:1244) + /// (Originally from ..\FSComp.txt:1246) static member tcInvalidRelationInJoin(a0 : System.String) = (3125, GetStringFunc("tcInvalidRelationInJoin",",,,%s,,,") a0) /// Calls - /// (Originally from ..\FSComp.txt:1245) + /// (Originally from ..\FSComp.txt:1247) 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:1246) + /// (Originally from ..\FSComp.txt:1248) 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:1247) + /// (Originally from ..\FSComp.txt:1249) 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:1248) + /// (Originally from ..\FSComp.txt:1250) 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:1249) + /// (Originally from ..\FSComp.txt:1251) 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:1250) + /// (Originally from ..\FSComp.txt:1252) static member tcIntoNeedsRestOfQuery() = (3129, GetStringFunc("tcIntoNeedsRestOfQuery",",,,") ) /// The operator '%s' does not accept the use of 'into' - /// (Originally from ..\FSComp.txt:1251) + /// (Originally from ..\FSComp.txt:1253) 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:1252) + /// (Originally from ..\FSComp.txt:1254) 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:1253) + /// (Originally from ..\FSComp.txt:1255) 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:1254) + /// (Originally from ..\FSComp.txt:1256) 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:1255) + /// (Originally from ..\FSComp.txt:1257) 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:1256) + /// (Originally from ..\FSComp.txt:1258) static member parsMutableOnAutoPropertyShouldBeGetSetNotJustSet() = (3135, GetStringFunc("parsMutableOnAutoPropertyShouldBeGetSetNotJustSet",",,,") ) /// Type '%s' is illegal because in byref, T cannot contain byref types. - /// (Originally from ..\FSComp.txt:1257) + /// (Originally from ..\FSComp.txt:1259) 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:1258) + /// (Originally from ..\FSComp.txt:1260) 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:1259) + /// (Originally from ..\FSComp.txt:1261) static member tcNoIntegerForLoopInQuery() = (3139, GetStringFunc("tcNoIntegerForLoopInQuery",",,,") ) /// 'while' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1260) + /// (Originally from ..\FSComp.txt:1262) static member tcNoWhileInQuery() = (3140, GetStringFunc("tcNoWhileInQuery",",,,") ) /// 'try/finally' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1261) + /// (Originally from ..\FSComp.txt:1263) static member tcNoTryFinallyInQuery() = (3141, GetStringFunc("tcNoTryFinallyInQuery",",,,") ) /// 'use' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1262) + /// (Originally from ..\FSComp.txt:1264) static member tcUseMayNotBeUsedInQueries() = (3142, GetStringFunc("tcUseMayNotBeUsedInQueries",",,,") ) /// 'let!', 'use!' and 'do!' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1263) + /// (Originally from ..\FSComp.txt:1265) static member tcBindMayNotBeUsedInQueries() = (3143, GetStringFunc("tcBindMayNotBeUsedInQueries",",,,") ) /// 'return' and 'return!' may not be used in queries - /// (Originally from ..\FSComp.txt:1264) + /// (Originally from ..\FSComp.txt:1266) 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:1265) + /// (Originally from ..\FSComp.txt:1267) static member tcUnrecognizedQueryOperator() = (3145, GetStringFunc("tcUnrecognizedQueryOperator",",,,") ) /// 'try/with' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1266) + /// (Originally from ..\FSComp.txt:1268) 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:1267) + /// (Originally from ..\FSComp.txt:1269) 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:1268) + /// (Originally from ..\FSComp.txt:1270) 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:1269) + /// (Originally from ..\FSComp.txt:1271) 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:1270) + /// (Originally from ..\FSComp.txt:1272) static member invalidPlatformTarget() = (3150, GetStringFunc("invalidPlatformTarget",",,,") ) /// This member, function or value declaration may not be declared 'inline' - /// (Originally from ..\FSComp.txt:1271) + /// (Originally from ..\FSComp.txt:1273) 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:1272) + /// (Originally from ..\FSComp.txt:1274) 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:1273) + /// (Originally from ..\FSComp.txt:1275) 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:1274) + /// (Originally from ..\FSComp.txt:1276) static member crefNoSetOfHole() = (3155, GetStringFunc("crefNoSetOfHole",",,,") ) /// + 1 overload - /// (Originally from ..\FSComp.txt:1275) + /// (Originally from ..\FSComp.txt:1277) static member nicePrintOtherOverloads1() = (GetStringFunc("nicePrintOtherOverloads1",",,,") ) /// + %d overloads - /// (Originally from ..\FSComp.txt:1276) + /// (Originally from ..\FSComp.txt:1278) static member nicePrintOtherOverloadsN(a0 : System.Int32) = (GetStringFunc("nicePrintOtherOverloadsN",",,,%d,,,") a0) /// Erased to - /// (Originally from ..\FSComp.txt:1277) + /// (Originally from ..\FSComp.txt:1279) static member erasedTo() = (GetStringFunc("erasedTo",",,,") ) /// Unexpected token '%s' or incomplete expression - /// (Originally from ..\FSComp.txt:1278) + /// (Originally from ..\FSComp.txt:1280) 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:1279) + /// (Originally from ..\FSComp.txt:1281) static member parsAttributeOnIncompleteCode() = (3158, GetStringFunc("parsAttributeOnIncompleteCode",",,,") ) /// Type name cannot be empty. - /// (Originally from ..\FSComp.txt:1280) + /// (Originally from ..\FSComp.txt:1282) static member parsTypeNameCannotBeEmpty() = (3159, GetStringFunc("parsTypeNameCannotBeEmpty",",,,") ) /// Problem reading assembly '%s': %s - /// (Originally from ..\FSComp.txt:1281) + /// (Originally from ..\FSComp.txt:1283) 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:1282) + /// (Originally from ..\FSComp.txt:1284) static member tcTPFieldMustBeLiteral() = (3161, GetStringFunc("tcTPFieldMustBeLiteral",",,,") ) /// (loading description...) - /// (Originally from ..\FSComp.txt:1283) + /// (Originally from ..\FSComp.txt:1285) static member loadingDescription() = (GetStringFunc("loadingDescription",",,,") ) /// (description unavailable...) - /// (Originally from ..\FSComp.txt:1284) + /// (Originally from ..\FSComp.txt:1286) 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:1285) + /// (Originally from ..\FSComp.txt:1287) static member chkTyparMultipleClassConstraints() = (3162, GetStringFunc("chkTyparMultipleClassConstraints",",,,") ) /// 'match' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1286) + /// (Originally from ..\FSComp.txt:1288) 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:1287) + /// (Originally from ..\FSComp.txt:1289) 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:1288) + /// (Originally from ..\FSComp.txt:1290) static member cannotResolveNullableOperators(a0 : System.String) = (3165, GetStringFunc("cannotResolveNullableOperators",",,,%s,,,") a0) /// '%s' must be followed by 'in'. Usage: %s. - /// (Originally from ..\FSComp.txt:1289) + /// (Originally from ..\FSComp.txt:1291) 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:1290) + /// (Originally from ..\FSComp.txt:1292) static member parsIllegalMemberVarInObjectImplementation() = (3168, GetStringFunc("parsIllegalMemberVarInObjectImplementation",",,,") ) /// Copy-and-update record expressions must include at least one field. - /// (Originally from ..\FSComp.txt:1291) + /// (Originally from ..\FSComp.txt:1293) static member tcEmptyCopyAndUpdateRecordInvalid() = (3169, GetStringFunc("tcEmptyCopyAndUpdateRecordInvalid",",,,") ) /// '_' cannot be used as field name - /// (Originally from ..\FSComp.txt:1292) + /// (Originally from ..\FSComp.txt:1294) 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:1293) + /// (Originally from ..\FSComp.txt:1295) 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:1294) + /// (Originally from ..\FSComp.txt:1296) 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:1295) + /// (Originally from ..\FSComp.txt:1297) static member tcRuntimeSuppliedMethodCannotBeUsedInUserCode(a0 : System.String) = (3173, GetStringFunc("tcRuntimeSuppliedMethodCannotBeUsedInUserCode",",,,%s,,,") a0) /// The union case '%s' does not have a field named '%s'. - /// (Originally from ..\FSComp.txt:1296) + /// (Originally from ..\FSComp.txt:1298) static member tcUnionCaseConstructorDoesNotHaveFieldWithGivenName(a0 : System.String, a1 : System.String) = (3174, GetStringFunc("tcUnionCaseConstructorDoesNotHaveFieldWithGivenName",",,,%s,,,%s,,,") a0 a1) /// The exception '%s' does not have a field named '%s'. - /// (Originally from ..\FSComp.txt:1297) + /// (Originally from ..\FSComp.txt:1299) 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) + /// (Originally from ..\FSComp.txt:1300) static member tcActivePatternsDoNotHaveFields() = (3174, GetStringFunc("tcActivePatternsDoNotHaveFields",",,,") ) /// The constructor does not have a field named '%s'. - /// (Originally from ..\FSComp.txt:1299) + /// (Originally from ..\FSComp.txt:1301) 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:1300) + /// (Originally from ..\FSComp.txt:1302) static member tcUnionCaseFieldCannotBeUsedMoreThanOnce(a0 : System.String) = (3175, GetStringFunc("tcUnionCaseFieldCannotBeUsedMoreThanOnce",",,,%s,,,") a0) /// Named field '%s' is used more than once. - /// (Originally from ..\FSComp.txt:1301) + /// (Originally from ..\FSComp.txt:1303) 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:1302) + /// (Originally from ..\FSComp.txt:1304) 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:1303) + /// (Originally from ..\FSComp.txt:1305) static member tastConstantExpressionOverflow() = (3177, GetStringFunc("tastConstantExpressionOverflow",",,,") ) /// This is not valid literal expression. The [] attribute will be ignored. - /// (Originally from ..\FSComp.txt:1304) + /// (Originally from ..\FSComp.txt:1306) static member tcIllegalStructTypeForConstantExpression() = (3178, GetStringFunc("tcIllegalStructTypeForConstantExpression",",,,") ) /// System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. - /// (Originally from ..\FSComp.txt:1305) + /// (Originally from ..\FSComp.txt:1307) 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:1306) + /// (Originally from ..\FSComp.txt:1308) 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:1307) + /// (Originally from ..\FSComp.txt:1309) static member estApplyStaticArgumentsForMethodNotImplemented() = (GetStringFunc("estApplyStaticArgumentsForMethodNotImplemented",",,,") ) /// An error occured applying the static arguments to a provided method - /// (Originally from ..\FSComp.txt:1308) + /// (Originally from ..\FSComp.txt:1310) static member etErrorApplyingStaticArgumentsToMethod() = (3181, GetStringFunc("etErrorApplyingStaticArgumentsToMethod",",,,") ) /// Unexpected character '%s' in preprocessor expression - /// (Originally from ..\FSComp.txt:1309) + /// (Originally from ..\FSComp.txt:1311) static member pplexUnexpectedChar(a0 : System.String) = (3182, GetStringFunc("pplexUnexpectedChar",",,,%s,,,") a0) /// Unexpected token '%s' in preprocessor expression - /// (Originally from ..\FSComp.txt:1310) + /// (Originally from ..\FSComp.txt:1312) static member ppparsUnexpectedToken(a0 : System.String) = (3183, GetStringFunc("ppparsUnexpectedToken",",,,%s,,,") a0) /// Incomplete preprocessor expression - /// (Originally from ..\FSComp.txt:1311) + /// (Originally from ..\FSComp.txt:1313) static member ppparsIncompleteExpression() = (3184, GetStringFunc("ppparsIncompleteExpression",",,,") ) /// Missing token '%s' in preprocessor expression - /// (Originally from ..\FSComp.txt:1312) + /// (Originally from ..\FSComp.txt:1314) 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:1313) + /// (Originally from ..\FSComp.txt:1315) 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:1314) + /// (Originally from ..\FSComp.txt:1316) 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:1315) + /// (Originally from ..\FSComp.txt:1317) static member checkNotSufficientlyGenericBecauseOfScopeAnon() = (3188, GetStringFunc("checkNotSufficientlyGenericBecauseOfScopeAnon",",,,") ) /// Redundant arguments are being ignored in function '%s'. Expected %d but got %d arguments. - /// (Originally from ..\FSComp.txt:1316) + /// (Originally from ..\FSComp.txt:1318) 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:1317) + /// (Originally from ..\FSComp.txt:1319) static member checkLowercaseLiteralBindingInPattern(a0 : System.String) = (3190, GetStringFunc("checkLowercaseLiteralBindingInPattern",",,,%s,,,") a0) /// This literal pattern does not take arguments - /// (Originally from ..\FSComp.txt:1318) + /// (Originally from ..\FSComp.txt:1320) 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:1319) + /// (Originally from ..\FSComp.txt:1321) static member tcConstructorsIllegalInAugmentation() = (3192, GetStringFunc("tcConstructorsIllegalInAugmentation",",,,") ) /// Invalid response file '%s' ( '%s' ) - /// (Originally from ..\FSComp.txt:1320) + /// (Originally from ..\FSComp.txt:1322) 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:1321) + /// (Originally from ..\FSComp.txt:1323) 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:1322) + /// (Originally from ..\FSComp.txt:1324) static member optsResponseFileNameInvalid(a0 : System.String) = (3195, GetStringFunc("optsResponseFileNameInvalid",",,,%s,,,") a0) /// Cannot find FSharp.Core.dll in compiler's directory - /// (Originally from ..\FSComp.txt:1323) + /// (Originally from ..\FSComp.txt:1325) static member fsharpCoreNotFoundToBeCopied() = (3196, GetStringFunc("fsharpCoreNotFoundToBeCopied",",,,") ) /// One tuple type is a struct tuple, the other is a reference tuple - /// (Originally from ..\FSComp.txt:1324) + /// (Originally from ..\FSComp.txt:1326) static member tcTupleStructMismatch() = (GetStringFunc("tcTupleStructMismatch",",,,") ) /// This provided method requires static parameters - /// (Originally from ..\FSComp.txt:1325) + /// (Originally from ..\FSComp.txt:1327) 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:1326) + /// (Originally from ..\FSComp.txt:1328) 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:1327) + /// (Originally from ..\FSComp.txt:1329) 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:1328) + /// (Originally from ..\FSComp.txt:1330) static member tcRecImplied() = (3199, GetStringFunc("tcRecImplied",",,,") ) /// In a recursive declaration group, 'open' declarations must come first in each module - /// (Originally from ..\FSComp.txt:1329) + /// (Originally from ..\FSComp.txt:1331) 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:1330) + /// (Originally from ..\FSComp.txt:1332) static member tcModuleAbbrevFirstInMutRec() = (3201, GetStringFunc("tcModuleAbbrevFirstInMutRec",",,,") ) /// This declaration is not supported in recursive declaration groups - /// (Originally from ..\FSComp.txt:1331) + /// (Originally from ..\FSComp.txt:1333) static member tcUnsupportedMutRecDecl() = (3202, GetStringFunc("tcUnsupportedMutRecDecl",",,,") ) /// Invalid use of 'rec' keyword - /// (Originally from ..\FSComp.txt:1332) + /// (Originally from ..\FSComp.txt:1334) 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:1333) + /// (Originally from ..\FSComp.txt:1335) 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:1334) + /// (Originally from ..\FSComp.txt:1336) 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:1335) + /// (Originally from ..\FSComp.txt:1337) static member tcFixedNotAllowed() = (3207, GetStringFunc("tcFixedNotAllowed",",,,") ) /// Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. - /// (Originally from ..\FSComp.txt:1336) + /// (Originally from ..\FSComp.txt:1338) static member tcCouldNotFindOffsetToStringData() = (3208, GetStringFunc("tcCouldNotFindOffsetToStringData",",,,") ) /// 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:1337) + /// (Originally from ..\FSComp.txt:1339) 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:1338) + /// (Originally from ..\FSComp.txt:1340) 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:1339) + /// (Originally from ..\FSComp.txt:1341) static member DefaultParameterValueNotAppropriateForArgument() = (3211, GetStringFunc("DefaultParameterValueNotAppropriateForArgument",",,,") ) /// The system type '%s' was required but no referenced system DLL contained this type - /// (Originally from ..\FSComp.txt:1340) + /// (Originally from ..\FSComp.txt:1342) 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:1341) + /// (Originally from ..\FSComp.txt:1343) 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:1342) + /// (Originally from ..\FSComp.txt:1344) 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:1343) + /// (Originally from ..\FSComp.txt:1345) static member parsUnexpectedSymbolEqualsInsteadOfIn() = (3215, GetStringFunc("parsUnexpectedSymbolEqualsInsteadOfIn",",,,") ) + /// Two anonymous record types are from different assemblies '%s' and '%s' + /// (Originally from ..\FSComp.txt:1346) + static member tcAnonRecdCcuMismatch(a0 : System.String, a1 : System.String) = (GetStringFunc("tcAnonRecdCcuMismatch",",,,%s,,,%s,,,") a0 a1) + /// Two anonymous record types have mismatched sets of field names '%s' and '%s' + /// (Originally from ..\FSComp.txt:1347) + static member tcAnonRecdFieldNameMismatch(a0 : System.String, a1 : System.String) = (GetStringFunc("tcAnonRecdFieldNameMismatch",",,,%s,,,%s,,,") a0 a1) /// 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:1344) + /// (Originally from ..\FSComp.txt:1348) static member keywordDescriptionAbstract() = (GetStringFunc("keywordDescriptionAbstract",",,,") ) /// Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. - /// (Originally from ..\FSComp.txt:1345) + /// (Originally from ..\FSComp.txt:1349) 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:1346) + /// (Originally from ..\FSComp.txt:1350) static member keywordDescriptionAs() = (GetStringFunc("keywordDescriptionAs",",,,") ) /// Used to verify code during debugging. - /// (Originally from ..\FSComp.txt:1347) + /// (Originally from ..\FSComp.txt:1351) static member keywordDescriptionAssert() = (GetStringFunc("keywordDescriptionAssert",",,,") ) /// Used as the name of the base class object. - /// (Originally from ..\FSComp.txt:1348) + /// (Originally from ..\FSComp.txt:1352) static member keywordDescriptionBase() = (GetStringFunc("keywordDescriptionBase",",,,") ) /// In verbose syntax, indicates the start of a code block. - /// (Originally from ..\FSComp.txt:1349) + /// (Originally from ..\FSComp.txt:1353) static member keywordDescriptionBegin() = (GetStringFunc("keywordDescriptionBegin",",,,") ) /// In verbose syntax, indicates the start of a class definition. - /// (Originally from ..\FSComp.txt:1350) + /// (Originally from ..\FSComp.txt:1354) 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:1351) + /// (Originally from ..\FSComp.txt:1355) static member keywordDescriptionDefault() = (GetStringFunc("keywordDescriptionDefault",",,,") ) /// Used to declare a delegate. - /// (Originally from ..\FSComp.txt:1352) + /// (Originally from ..\FSComp.txt:1356) static member keywordDescriptionDelegate() = (GetStringFunc("keywordDescriptionDelegate",",,,") ) /// Used in looping constructs or to execute imperative code. - /// (Originally from ..\FSComp.txt:1353) + /// (Originally from ..\FSComp.txt:1357) static member keywordDescriptionDo() = (GetStringFunc("keywordDescriptionDo",",,,") ) /// In verbose syntax, indicates the end of a block of code in a looping expression. - /// (Originally from ..\FSComp.txt:1354) + /// (Originally from ..\FSComp.txt:1358) static member keywordDescriptionDone() = (GetStringFunc("keywordDescriptionDone",",,,") ) /// Used to convert to a type that is lower in the inheritance chain. - /// (Originally from ..\FSComp.txt:1355) + /// (Originally from ..\FSComp.txt:1359) static member keywordDescriptionDowncast() = (GetStringFunc("keywordDescriptionDowncast",",,,") ) /// In a for expression, used when counting in reverse. - /// (Originally from ..\FSComp.txt:1356) + /// (Originally from ..\FSComp.txt:1360) static member keywordDescriptionDownto() = (GetStringFunc("keywordDescriptionDownto",",,,") ) /// Used in conditional branching. A short form of else if. - /// (Originally from ..\FSComp.txt:1357) + /// (Originally from ..\FSComp.txt:1361) static member keywordDescriptionElif() = (GetStringFunc("keywordDescriptionElif",",,,") ) /// Used in conditional branching. - /// (Originally from ..\FSComp.txt:1358) + /// (Originally from ..\FSComp.txt:1362) 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:1359) + /// (Originally from ..\FSComp.txt:1363) static member keywordDescriptionEnd() = (GetStringFunc("keywordDescriptionEnd",",,,") ) /// Used to declare an exception type. - /// (Originally from ..\FSComp.txt:1360) + /// (Originally from ..\FSComp.txt:1364) static member keywordDescriptionException() = (GetStringFunc("keywordDescriptionException",",,,") ) /// Indicates that a declared program element is defined in another binary or assembly. - /// (Originally from ..\FSComp.txt:1361) + /// (Originally from ..\FSComp.txt:1365) static member keywordDescriptionExtern() = (GetStringFunc("keywordDescriptionExtern",",,,") ) /// Used as a Boolean literal. - /// (Originally from ..\FSComp.txt:1362) + /// (Originally from ..\FSComp.txt:1366) 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:1363) + /// (Originally from ..\FSComp.txt:1367) static member keywordDescriptionFinally() = (GetStringFunc("keywordDescriptionFinally",",,,") ) /// Used in looping constructs. - /// (Originally from ..\FSComp.txt:1364) + /// (Originally from ..\FSComp.txt:1368) static member keywordDescriptionFor() = (GetStringFunc("keywordDescriptionFor",",,,") ) /// Used in lambda expressions, also known as anonymous functions. - /// (Originally from ..\FSComp.txt:1365) + /// (Originally from ..\FSComp.txt:1369) 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:1366) + /// (Originally from ..\FSComp.txt:1370) static member keywordDescriptionFunction() = (GetStringFunc("keywordDescriptionFunction",",,,") ) /// Used to reference the top-level .NET namespace. - /// (Originally from ..\FSComp.txt:1367) + /// (Originally from ..\FSComp.txt:1371) static member keywordDescriptionGlobal() = (GetStringFunc("keywordDescriptionGlobal",",,,") ) /// Used in conditional branching constructs. - /// (Originally from ..\FSComp.txt:1368) + /// (Originally from ..\FSComp.txt:1372) static member keywordDescriptionIf() = (GetStringFunc("keywordDescriptionIf",",,,") ) /// Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. - /// (Originally from ..\FSComp.txt:1369) + /// (Originally from ..\FSComp.txt:1373) static member keywordDescriptionIn() = (GetStringFunc("keywordDescriptionIn",",,,") ) /// Used to specify a base class or base interface. - /// (Originally from ..\FSComp.txt:1370) + /// (Originally from ..\FSComp.txt:1374) static member keywordDescriptionInherit() = (GetStringFunc("keywordDescriptionInherit",",,,") ) /// Used to indicate a function that should be integrated directly into the caller's code. - /// (Originally from ..\FSComp.txt:1371) + /// (Originally from ..\FSComp.txt:1375) static member keywordDescriptionInline() = (GetStringFunc("keywordDescriptionInline",",,,") ) /// Used to declare and implement interfaces. - /// (Originally from ..\FSComp.txt:1372) + /// (Originally from ..\FSComp.txt:1376) static member keywordDescriptionInterface() = (GetStringFunc("keywordDescriptionInterface",",,,") ) /// Used to specify that a member is visible inside an assembly but not outside it. - /// (Originally from ..\FSComp.txt:1373) + /// (Originally from ..\FSComp.txt:1377) 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:1374) + /// (Originally from ..\FSComp.txt:1378) static member keywordDescriptionLazy() = (GetStringFunc("keywordDescriptionLazy",",,,") ) /// Used to associate, or bind, a name to a value or function. - /// (Originally from ..\FSComp.txt:1375) + /// (Originally from ..\FSComp.txt:1379) static member keywordDescriptionLet() = (GetStringFunc("keywordDescriptionLet",",,,") ) /// Used in computation expressions to bind a name to the result of another computation expression. - /// (Originally from ..\FSComp.txt:1376) + /// (Originally from ..\FSComp.txt:1380) static member keywordDescriptionLetBang() = (GetStringFunc("keywordDescriptionLetBang",",,,") ) /// Used to branch by comparing a value to a pattern. - /// (Originally from ..\FSComp.txt:1377) + /// (Originally from ..\FSComp.txt:1381) static member keywordDescriptionMatch() = (GetStringFunc("keywordDescriptionMatch",",,,") ) /// Used in computation expressions to pattern match directly over the result of another computation expression. - /// (Originally from ..\FSComp.txt:1378) + /// (Originally from ..\FSComp.txt:1382) static member keywordDescriptionMatchBang() = (GetStringFunc("keywordDescriptionMatchBang",",,,") ) /// Used to declare a property or method in an object type. - /// (Originally from ..\FSComp.txt:1379) + /// (Originally from ..\FSComp.txt:1383) static member keywordDescriptionMember() = (GetStringFunc("keywordDescriptionMember",",,,") ) /// Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. - /// (Originally from ..\FSComp.txt:1380) + /// (Originally from ..\FSComp.txt:1384) static member keywordDescriptionModule() = (GetStringFunc("keywordDescriptionModule",",,,") ) /// Used to declare a variable, that is, a value that can be changed. - /// (Originally from ..\FSComp.txt:1381) + /// (Originally from ..\FSComp.txt:1385) static member keywordDescriptionMutable() = (GetStringFunc("keywordDescriptionMutable",",,,") ) /// Used to associate a name with a group of related types and modules, to logically separate it from other code. - /// (Originally from ..\FSComp.txt:1382) + /// (Originally from ..\FSComp.txt:1386) static member keywordDescriptionNamespace() = (GetStringFunc("keywordDescriptionNamespace",",,,") ) /// 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. - /// (Originally from ..\FSComp.txt:1383) + /// (Originally from ..\FSComp.txt:1387) static member keywordDescriptionNew() = (GetStringFunc("keywordDescriptionNew",",,,") ) /// Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. - /// (Originally from ..\FSComp.txt:1384) + /// (Originally from ..\FSComp.txt:1388) static member keywordDescriptionNot() = (GetStringFunc("keywordDescriptionNot",",,,") ) /// Indicates the absence of an object. Also used in generic parameter constraints. - /// (Originally from ..\FSComp.txt:1385) + /// (Originally from ..\FSComp.txt:1389) static member keywordDescriptionNull() = (GetStringFunc("keywordDescriptionNull",",,,") ) /// Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. - /// (Originally from ..\FSComp.txt:1386) + /// (Originally from ..\FSComp.txt:1390) static member keywordDescriptionOf() = (GetStringFunc("keywordDescriptionOf",",,,") ) /// Used to make the contents of a namespace or module available without qualification. - /// (Originally from ..\FSComp.txt:1387) + /// (Originally from ..\FSComp.txt:1391) static member keywordDescriptionOpen() = (GetStringFunc("keywordDescriptionOpen",",,,") ) /// Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. - /// (Originally from ..\FSComp.txt:1388) + /// (Originally from ..\FSComp.txt:1392) static member keywordDescriptionOr() = (GetStringFunc("keywordDescriptionOr",",,,") ) /// Used to implement a version of an abstract or virtual method that differs from the base version. - /// (Originally from ..\FSComp.txt:1389) + /// (Originally from ..\FSComp.txt:1393) static member keywordDescriptionOverride() = (GetStringFunc("keywordDescriptionOverride",",,,") ) /// Restricts access to a member to code in the same type or module. - /// (Originally from ..\FSComp.txt:1390) + /// (Originally from ..\FSComp.txt:1394) static member keywordDescriptionPrivate() = (GetStringFunc("keywordDescriptionPrivate",",,,") ) /// Allows access to a member from outside the type. - /// (Originally from ..\FSComp.txt:1391) + /// (Originally from ..\FSComp.txt:1395) static member keywordDescriptionPublic() = (GetStringFunc("keywordDescriptionPublic",",,,") ) /// Used to indicate that a function is recursive. - /// (Originally from ..\FSComp.txt:1392) + /// (Originally from ..\FSComp.txt:1396) static member keywordDescriptionRec() = (GetStringFunc("keywordDescriptionRec",",,,") ) /// Used to provide a value for the result of the containing computation expression. - /// (Originally from ..\FSComp.txt:1393) + /// (Originally from ..\FSComp.txt:1397) static member keywordDescriptionReturn() = (GetStringFunc("keywordDescriptionReturn",",,,") ) /// 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:1394) + /// (Originally from ..\FSComp.txt:1398) 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. - /// (Originally from ..\FSComp.txt:1395) + /// (Originally from ..\FSComp.txt:1399) static member keywordDescriptionSelect() = (GetStringFunc("keywordDescriptionSelect",",,,") ) /// 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. - /// (Originally from ..\FSComp.txt:1396) + /// (Originally from ..\FSComp.txt:1400) static member keywordDescriptionStatic() = (GetStringFunc("keywordDescriptionStatic",",,,") ) /// Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. - /// (Originally from ..\FSComp.txt:1397) + /// (Originally from ..\FSComp.txt:1401) static member keywordDescriptionStruct() = (GetStringFunc("keywordDescriptionStruct",",,,") ) /// Used in conditional expressions. Also used to perform side effects after object construction. - /// (Originally from ..\FSComp.txt:1398) + /// (Originally from ..\FSComp.txt:1402) static member keywordDescriptionThen() = (GetStringFunc("keywordDescriptionThen",",,,") ) /// Used in for loops to indicate a range. - /// (Originally from ..\FSComp.txt:1399) + /// (Originally from ..\FSComp.txt:1403) static member keywordDescriptionTo() = (GetStringFunc("keywordDescriptionTo",",,,") ) /// Used to introduce a block of code that might generate an exception. Used together with with or finally. - /// (Originally from ..\FSComp.txt:1400) + /// (Originally from ..\FSComp.txt:1404) static member keywordDescriptionTry() = (GetStringFunc("keywordDescriptionTry",",,,") ) /// Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. - /// (Originally from ..\FSComp.txt:1401) + /// (Originally from ..\FSComp.txt:1405) static member keywordDescriptionType() = (GetStringFunc("keywordDescriptionType",",,,") ) /// Used to convert to a type that is higher in the inheritance chain. - /// (Originally from ..\FSComp.txt:1402) + /// (Originally from ..\FSComp.txt:1406) static member keywordDescriptionUpcast() = (GetStringFunc("keywordDescriptionUpcast",",,,") ) /// Used instead of let for values that implement IDisposable" - /// (Originally from ..\FSComp.txt:1403) + /// (Originally from ..\FSComp.txt:1407) static member keywordDescriptionUse() = (GetStringFunc("keywordDescriptionUse",",,,") ) /// Used instead of let! in computation expressions for computation expression results that implement IDisposable. - /// (Originally from ..\FSComp.txt:1404) + /// (Originally from ..\FSComp.txt:1408) static member keywordDescriptionUseBang() = (GetStringFunc("keywordDescriptionUseBang",",,,") ) /// Used in a signature to indicate a value, or in a type to declare a member, in limited situations. - /// (Originally from ..\FSComp.txt:1405) + /// (Originally from ..\FSComp.txt:1409) static member keywordDescriptionVal() = (GetStringFunc("keywordDescriptionVal",",,,") ) /// Indicates the .NET void type. Used when interoperating with other .NET languages. - /// (Originally from ..\FSComp.txt:1406) + /// (Originally from ..\FSComp.txt:1410) static member keywordDescriptionVoid() = (GetStringFunc("keywordDescriptionVoid",",,,") ) /// Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. - /// (Originally from ..\FSComp.txt:1407) + /// (Originally from ..\FSComp.txt:1411) static member keywordDescriptionWhen() = (GetStringFunc("keywordDescriptionWhen",",,,") ) /// Introduces a looping construct. - /// (Originally from ..\FSComp.txt:1408) + /// (Originally from ..\FSComp.txt:1412) static member keywordDescriptionWhile() = (GetStringFunc("keywordDescriptionWhile",",,,") ) /// 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. - /// (Originally from ..\FSComp.txt:1409) + /// (Originally from ..\FSComp.txt:1413) static member keywordDescriptionWith() = (GetStringFunc("keywordDescriptionWith",",,,") ) /// Used in a sequence expression to produce a value for a sequence. - /// (Originally from ..\FSComp.txt:1410) + /// (Originally from ..\FSComp.txt:1414) static member keywordDescriptionYield() = (GetStringFunc("keywordDescriptionYield",",,,") ) /// Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. - /// (Originally from ..\FSComp.txt:1411) + /// (Originally from ..\FSComp.txt:1415) static member keywordDescriptionYieldBang() = (GetStringFunc("keywordDescriptionYieldBang",",,,") ) /// In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions - /// (Originally from ..\FSComp.txt:1412) + /// (Originally from ..\FSComp.txt:1416) static member keywordDescriptionRightArrow() = (GetStringFunc("keywordDescriptionRightArrow",",,,") ) /// Assigns a value to a variable. - /// (Originally from ..\FSComp.txt:1413) + /// (Originally from ..\FSComp.txt:1417) static member keywordDescriptionLeftArrow() = (GetStringFunc("keywordDescriptionLeftArrow",",,,") ) /// Converts a type to type that is higher in the hierarchy. - /// (Originally from ..\FSComp.txt:1414) + /// (Originally from ..\FSComp.txt:1418) static member keywordDescriptionCast() = (GetStringFunc("keywordDescriptionCast",",,,") ) /// Converts a type to a type that is lower in the hierarchy. - /// (Originally from ..\FSComp.txt:1415) + /// (Originally from ..\FSComp.txt:1419) static member keywordDescriptionDynamicCast() = (GetStringFunc("keywordDescriptionDynamicCast",",,,") ) /// Delimits a typed code quotation. - /// (Originally from ..\FSComp.txt:1416) + /// (Originally from ..\FSComp.txt:1420) static member keywordDescriptionTypedQuotation() = (GetStringFunc("keywordDescriptionTypedQuotation",",,,") ) /// Delimits a untyped code quotation. - /// (Originally from ..\FSComp.txt:1417) + /// (Originally from ..\FSComp.txt:1421) static member keywordDescriptionUntypedQuotation() = (GetStringFunc("keywordDescriptionUntypedQuotation",",,,") ) /// %s '%s' not found in assembly '%s'. 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. - /// (Originally from ..\FSComp.txt:1418) + /// (Originally from ..\FSComp.txt:1422) static member itemNotFoundDuringDynamicCodeGen(a0 : System.String, a1 : System.String, a2 : System.String) = (3216, GetStringFunc("itemNotFoundDuringDynamicCodeGen",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// %s '%s' not found in type '%s' from assembly '%s'. 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. - /// (Originally from ..\FSComp.txt:1419) + /// (Originally from ..\FSComp.txt:1423) static member itemNotFoundInTypeDuringDynamicCodeGen(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (3216, GetStringFunc("itemNotFoundInTypeDuringDynamicCodeGen",",,,%s,,,%s,,,%s,,,%s,,,") a0 a1 a2 a3) /// is - /// (Originally from ..\FSComp.txt:1420) + /// (Originally from ..\FSComp.txt:1424) static member descriptionWordIs() = (GetStringFunc("descriptionWordIs",",,,") ) /// This value is not a function and cannot be applied. - /// (Originally from ..\FSComp.txt:1421) + /// (Originally from ..\FSComp.txt:1425) static member notAFunction() = (GetStringFunc("notAFunction",",,,") ) /// This value is not a function and cannot be applied. Did you intend to access the indexer via %s.[index] instead? - /// (Originally from ..\FSComp.txt:1422) + /// (Originally from ..\FSComp.txt:1426) static member notAFunctionButMaybeIndexerWithName(a0 : System.String) = (GetStringFunc("notAFunctionButMaybeIndexerWithName",",,,%s,,,") a0) /// This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? - /// (Originally from ..\FSComp.txt:1423) + /// (Originally from ..\FSComp.txt:1427) static member notAFunctionButMaybeIndexer() = (GetStringFunc("notAFunctionButMaybeIndexer",",,,") ) /// - /// (Originally from ..\FSComp.txt:1424) + /// (Originally from ..\FSComp.txt:1428) static member notAFunctionButMaybeIndexerErrorCode() = (3217, GetStringFunc("notAFunctionButMaybeIndexerErrorCode",",,,") ) /// This value is not a function and cannot be applied. Did you forget to terminate a declaration? - /// (Originally from ..\FSComp.txt:1425) + /// (Originally from ..\FSComp.txt:1429) static member notAFunctionButMaybeDeclaration() = (GetStringFunc("notAFunctionButMaybeDeclaration",",,,") ) /// 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. - /// (Originally from ..\FSComp.txt:1426) + /// (Originally from ..\FSComp.txt:1430) static member ArgumentsInSigAndImplMismatch(a0 : System.String, a1 : System.String) = (3218, GetStringFunc("ArgumentsInSigAndImplMismatch",",,,%s,,,%s,,,") a0 a1) /// 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:1427) + /// (Originally from ..\FSComp.txt:1431) 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:1428) + /// (Originally from ..\FSComp.txt:1432) 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:1429) + /// (Originally from ..\FSComp.txt:1433) 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:1430) + /// (Originally from ..\FSComp.txt:1434) static member implicitlyDiscardedSequenceInSequenceExpression(a0 : System.String) = (3222, GetStringFunc("implicitlyDiscardedSequenceInSequenceExpression",",,,%s,,,") a0) /// The file '%s' changed on disk unexpectedly, please reload. - /// (Originally from ..\FSComp.txt:1431) + /// (Originally from ..\FSComp.txt:1435) 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:1432) + /// (Originally from ..\FSComp.txt:1436) static member writeToReadOnlyByref() = (3224, GetStringFunc("writeToReadOnlyByref",",,,") ) /// A ReadOnly attribute has been applied to a struct type with a mutable field. - /// (Originally from ..\FSComp.txt:1433) + /// (Originally from ..\FSComp.txt:1437) 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:1434) + /// (Originally from ..\FSComp.txt:1438) 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:1435) + /// (Originally from ..\FSComp.txt:1439) 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:1436) + /// (Originally from ..\FSComp.txt:1440) 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:1437) + /// (Originally from ..\FSComp.txt:1441) 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:1438) + /// (Originally from ..\FSComp.txt:1442) 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:1439) + /// (Originally from ..\FSComp.txt:1443) 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:1440) + /// (Originally from ..\FSComp.txt:1444) static member tcIsReadOnlyNotStruct() = (3232, GetStringFunc("tcIsReadOnlyNotStruct",",,,") ) /// Struct members cannot return the address of fields of the struct by reference - /// (Originally from ..\FSComp.txt:1441) + /// (Originally from ..\FSComp.txt:1445) 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:1442) + /// (Originally from ..\FSComp.txt:1446) 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:1443) + /// (Originally from ..\FSComp.txt:1447) 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:1444) + /// (Originally from ..\FSComp.txt:1448) 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:1445) + /// (Originally from ..\FSComp.txt:1449) 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:1446) + /// (Originally from ..\FSComp.txt:1450) static member tcTypeDoesNotInheritAttribute() = (3242, GetStringFunc("tcTypeDoesNotInheritAttribute",",,,") ) + /// Invalid anonymous record expression + /// (Originally from ..\FSComp.txt:1451) + static member parsInvalidAnonRecdExpr() = (3243, GetStringFunc("parsInvalidAnonRecdExpr",",,,") ) + /// Invalid anonymous record type + /// (Originally from ..\FSComp.txt:1452) + static member parsInvalidAnonRecdType() = (3244, GetStringFunc("parsInvalidAnonRecdType",",,,") ) + /// The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + /// (Originally from ..\FSComp.txt:1453) + static member tcCopyAndUpdateNeedsRecordType() = (3245, GetStringFunc("tcCopyAndUpdateNeedsRecordType",",,,") ) /// Call this method once to validate that all known resources are valid; throws if not static member RunStartupValidation() = @@ -4807,6 +4828,7 @@ type internal SR private() = ignore(GetString("parsUnmatched")) ignore(GetString("parsUnmatchedBracketBar")) ignore(GetString("parsUnmatchedBrace")) + ignore(GetString("parsUnmatchedBraceBar")) ignore(GetString("parsFieldBinding")) ignore(GetString("parsMemberIllegalInObjectImplementation")) ignore(GetString("parsMissingFunctionBody")) @@ -5279,6 +5301,7 @@ type internal SR private() = ignore(GetString("typeInfoExtension")) ignore(GetString("typeInfoCustomOperation")) ignore(GetString("typeInfoArgument")) + ignore(GetString("typeInfoAnonRecdField")) ignore(GetString("typeInfoPatternVariable")) ignore(GetString("typeInfoNamespace")) ignore(GetString("typeInfoModule")) @@ -5683,6 +5706,8 @@ type internal SR private() = ignore(GetString("typrelMemberHasMultiplePossibleDispatchSlots")) ignore(GetString("methodIsNotStatic")) ignore(GetString("parsUnexpectedSymbolEqualsInsteadOfIn")) + ignore(GetString("tcAnonRecdCcuMismatch")) + ignore(GetString("tcAnonRecdFieldNameMismatch")) ignore(GetString("keywordDescriptionAbstract")) ignore(GetString("keyworkDescriptionAnd")) ignore(GetString("keywordDescriptionAs")) @@ -5786,4 +5811,7 @@ type internal SR private() = ignore(GetString("chkNoSpanLikeValueFromExpression")) ignore(GetString("tastCantTakeAddressOfExpression")) ignore(GetString("tcTypeDoesNotInheritAttribute")) + ignore(GetString("parsInvalidAnonRecdExpr")) + ignore(GetString("parsInvalidAnonRecdType")) + ignore(GetString("tcCopyAndUpdateNeedsRecordType")) () diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx index 0365551a5fd..a92406320af 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx @@ -1431,6 +1431,9 @@ Unmatched '{{' + + Unmatched '{{|' + Field bindings must have the form 'id = expr;' @@ -2847,6 +2850,9 @@ argument + + anonymous record field + patvar @@ -4059,6 +4065,12 @@ Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + 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. @@ -4369,4 +4381,13 @@ This type does not inherit Attribute, it will not work correctly with other .NET languages. + + Invalid anonymous record expression + + + Invalid anonymous record type + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + \ No newline at end of file diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index 3517d044284..200d4f5a69e 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -960,12 +960,12 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | Parser.TOKEN_RPAREN | Parser.TOKEN_RPAREN_COMING_SOON | Parser.TOKEN_RPAREN_IS_HERE -> getErrorString("Parser.TOKEN.RPAREN") | Parser.TOKEN_LQUOTE -> getErrorString("Parser.TOKEN.LQUOTE") | Parser.TOKEN_LBRACK -> getErrorString("Parser.TOKEN.LBRACK") + | Parser.TOKEN_LBRACE_BAR -> getErrorString("Parser.TOKEN.LBRACE.BAR") | Parser.TOKEN_LBRACK_BAR -> getErrorString("Parser.TOKEN.LBRACK.BAR") | Parser.TOKEN_LBRACK_LESS -> getErrorString("Parser.TOKEN.LBRACK.LESS") | Parser.TOKEN_LBRACE -> getErrorString("Parser.TOKEN.LBRACE") - | Parser.TOKEN_LBRACE_LESS-> getErrorString("Parser.TOKEN.LBRACE.LESS") | Parser.TOKEN_BAR_RBRACK -> getErrorString("Parser.TOKEN.BAR.RBRACK") - | Parser.TOKEN_GREATER_RBRACE -> getErrorString("Parser.TOKEN.GREATER.RBRACE") + | Parser.TOKEN_BAR_RBRACE -> getErrorString("Parser.TOKEN.BAR.RBRACE") | Parser.TOKEN_GREATER_RBRACK -> getErrorString("Parser.TOKEN.GREATER.RBRACK") | Parser.TOKEN_RQUOTE_DOT _ | Parser.TOKEN_RQUOTE -> getErrorString("Parser.TOKEN.RQUOTE") @@ -1096,7 +1096,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = (* Merge a bunch of expression non terminals *) let (|NONTERM_Category_Expr|_|) = function | Parser.NONTERM_argExpr|Parser.NONTERM_minusExpr|Parser.NONTERM_parenExpr|Parser.NONTERM_atomicExpr - | Parser.NONTERM_appExpr|Parser.NONTERM_tupleExpr|Parser.NONTERM_declExpr|Parser.NONTERM_braceExpr + | Parser.NONTERM_appExpr|Parser.NONTERM_tupleExpr|Parser.NONTERM_declExpr|Parser.NONTERM_braceExpr|Parser.NONTERM_braceBarExpr | Parser.NONTERM_typedSeqExprBlock | Parser.NONTERM_interactiveExpr -> Some() | _ -> None diff --git a/src/fsharp/ConstraintSolver.fs b/src/fsharp/ConstraintSolver.fs index e5052b6f740..66b3eb9f9c0 100644 --- a/src/fsharp/ConstraintSolver.fs +++ b/src/fsharp/ConstraintSolver.fs @@ -227,6 +227,7 @@ let rec occursCheck g un ty = match stripTyEqns g ty with | TType_ucase(_, l) | TType_app (_, l) + | TType_anon(_, l) | TType_tuple (_, l) -> List.exists (occursCheck g un) l | TType_fun (d, r) -> occursCheck g un d || occursCheck g un r | TType_var r -> typarEq un r @@ -301,6 +302,7 @@ type TraitConstraintSolution = | TTraitBuiltIn | TTraitSolved of MethInfo * TypeInst | TTraitSolvedRecdProp of RecdFieldInfo * bool + | TTraitSolvedAnonRecdProp of AnonRecdTypeInfo * TypeInst * int let BakedInTraitConstraintNames = [ "op_Division" ; "op_Multiply"; "op_Addition" @@ -581,6 +583,7 @@ let rec SimplifyMeasuresInType g resultFirst ((generalizable, generalized) as pa match stripTyparEqns ty with | TType_ucase(_, l) | TType_app (_, l) + | TType_anon (_,l) | TType_tuple (_, l) -> SimplifyMeasuresInTypes g param l | TType_fun (d, r) -> if resultFirst then SimplifyMeasuresInTypes g param [r;d] else SimplifyMeasuresInTypes g param [d;r] @@ -618,6 +621,7 @@ let rec GetMeasureVarGcdInType v ty = match stripTyparEqns ty with | TType_ucase(_, l) | TType_app (_, l) + | TType_anon (_,l) | TType_tuple (_, l) -> GetMeasureVarGcdInTypes v l | TType_fun (d, r) -> GcdRational (GetMeasureVarGcdInType v d) (GetMeasureVarGcdInType v r) @@ -778,6 +782,14 @@ and solveTypMeetsTyparConstraints (csenv:ConstraintSolverEnv) ndeep m2 trace ty } +and SolveAnonInfoEqualsAnonInfo (csenv:ConstraintSolverEnv) m2 (anonInfo1: AnonRecdTypeInfo) (anonInfo2: AnonRecdTypeInfo) = + if evalTupInfoIsStruct anonInfo1.TupInfo <> evalTupInfoIsStruct anonInfo2.TupInfo then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m,m2)) else + (match anonInfo1.Assembly, anonInfo2.Assembly with + | ccu1, ccu2 -> if not (ccuEq ccu1 ccu2) then ErrorD (ConstraintSolverError(FSComp.SR.tcAnonRecdCcuMismatch(ccu1.AssemblyName, ccu2.AssemblyName), csenv.m,m2)) else ResultD () + ) ++ (fun () -> + if not (anonInfo1.SortedNames = anonInfo2.SortedNames) then ErrorD (ConstraintSolverError(FSComp.SR.tcAnonRecdFieldNameMismatch(sprintf "%A" (Array.toList anonInfo1.SortedNames), sprintf "%A" (Array.toList anonInfo2.SortedNames)), csenv.m,m2)) else + ResultD ()) + /// Add the constraint "ty1 = ty2" to the constraint problem. /// Propagate all effects of adding this constraint, e.g. to solve type variables and SolveTypeEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) (cxsln:(TraitConstraintInfo * TraitConstraintSln) option) ty1 ty2 = @@ -818,6 +830,9 @@ and SolveTypeEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTra | TType_tuple (tupInfo1, l1) , TType_tuple (tupInfo2, l2) -> if evalTupInfoIsStruct tupInfo1 <> evalTupInfoIsStruct tupInfo2 then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m, m2)) else SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2 + | TType_anon (anonInfo1, l1),TType_anon (anonInfo2, l2) -> + SolveAnonInfoEqualsAnonInfo csenv m2 anonInfo1 anonInfo2 ++ (fun () -> + 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) -> @@ -891,6 +906,9 @@ and SolveTypeSubsumesType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalT | TType_tuple (tupInfo1, l1) , TType_tuple (tupInfo2, l2) -> if evalTupInfoIsStruct tupInfo1 <> evalTupInfoIsStruct tupInfo2 then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m, m2)) else SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2 (* nb. can unify since no variance *) + | TType_anon (anonInfo1, l1), TType_anon (anonInfo2, l2) -> + SolveAnonInfoEqualsAnonInfo csenv m2 anonInfo1 anonInfo2 ++ (fun () -> + 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 @@ -992,7 +1010,7 @@ and SolveDimensionlessNumericType (csenv:ConstraintSolverEnv) ndeep m2 trace ty /// will deal with the problem. and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload permitWeakResolution ndeep m2 trace (TTrait(tys, nm, memFlags, argtys, rty, sln)): OperationResult = trackErrors { // Do not re-solve if already solved - if sln.Value.IsSome then return! ResultD true else + if sln.Value.IsSome then return true else let g = csenv.g let m = csenv.m let amap = csenv.amap @@ -1069,18 +1087,18 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p let ms2 = freshMeasure () do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 (mkAppTy tcref [TType_measure ms2]) do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure (Measure.Prod(ms1, if nm = "op_Multiply" then ms2 else Measure.Inv ms2))]) - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _ -> match GetMeasureOfType g argty2 with | Some (tcref, ms2) -> let ms1 = freshMeasure () do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty1 (mkAppTy tcref [TType_measure ms1]) do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure (Measure.Prod(ms1, if nm = "op_Multiply" then ms2 else Measure.Inv ms2))]) - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _ -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, false, ("op_Addition" | "op_Subtraction" | "op_Modulus"), [argty1;argty2] when // Ignore any explicit +/- overloads from any basic integral types @@ -1089,7 +1107,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p || (IsNumericOrIntegralEnumType g argty2 || (nm = "op_Addition" && (isCharTy g argty2 || isStringTy g argty2))) && (permitWeakResolution || not (isTyparTy g argty1)))) -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 - return! ResultD TTraitBuiltIn + return 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 @@ -1098,26 +1116,26 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p || (IsRelationalType g argty2 && (permitWeakResolution || not (isTyparTy g argty1))))) -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty g.bool_ty - return! ResultD TTraitBuiltIn + return 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 -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty ty - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | [], [ty], false, "get_One", [] when IsNumericType g ty || isCharTy g ty -> do! SolveDimensionlessNumericType csenv ndeep m2 trace ty do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty ty - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | [], _, false, ("DivideByInt"), [argty1;argty2] when isFpTy g argty1 || isDecimalTy g argty1 -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 g.int_ty do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 - return! ResultD TTraitBuiltIn + return TTraitBuiltIn // We pretend for uniformity that the 'string' and 'array' types have an indexer property called 'Item' | [], [ty], true, ("get_Item"), [argty1] @@ -1125,7 +1143,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty1 g.int_ty do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty g.char_ty - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | [], [ty], true, ("get_Item"), argtys when isArrayTy g ty -> @@ -1135,7 +1153,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty g.int_ty let ety = destArrayTy g ty do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty ety - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | [], [ty], true, ("set_Item"), argtys when isArrayTy g ty -> @@ -1146,7 +1164,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty g.int_ty let etys = destArrayTy g ty do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace ety etys - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | [], _, false, ("op_BitwiseAnd" | "op_BitwiseOr" | "op_ExclusiveOr"), [argty1;argty2] when (isIntegerOrIntegerEnumTy g argty1 || (isEnumTy g argty1)) && (permitWeakResolution || not (isTyparTy g argty2)) @@ -1155,7 +1173,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 do! SolveDimensionlessNumericType csenv ndeep m2 trace argty1 - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | [], _, false, ("op_LeftShift" | "op_RightShift"), [argty1;argty2] when isIntegerOrIntegerEnumTy g argty1 -> @@ -1163,38 +1181,38 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 g.int_ty do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 do! SolveDimensionlessNumericType csenv ndeep m2 trace argty1 - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, false, ("op_UnaryPlus"), [argty] when IsNumericOrIntegralEnumType g argty -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, false, ("op_UnaryNegation"), [argty] when isSignedIntegerTy g argty || isFpTy g argty || isDecimalTy g argty -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, true, ("get_Sign"), [] when (let argty = tys.Head in isSignedIntegerTy g argty || isFpTy g argty || isDecimalTy g argty) -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty g.int32_ty - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, false, ("op_LogicalNot" | "op_OnesComplement"), [argty] when isIntegerOrIntegerEnumTy g argty -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty do! SolveDimensionlessNumericType csenv ndeep m2 trace argty - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, false, ("Abs"), [argty] when isSignedIntegerTy g argty || isFpTy g argty || isDecimalTy g argty -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, false, "Sqrt", [argty1] when isFpTy g argty1 -> @@ -1203,17 +1221,17 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p let ms1 = freshMeasure () do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty1 (mkAppTy tcref [TType_measure (Measure.Prod (ms1, ms1))]) do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure ms1]) - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | None -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, false, ("Sin" | "Cos" | "Tan" | "Sinh" | "Cosh" | "Tanh" | "Atan" | "Acos" | "Asin" | "Exp" | "Ceiling" | "Floor" | "Round" | "Truncate" | "Log10" | "Log" | "Sqrt"), [argty] when isFpTy g argty -> do! SolveDimensionlessNumericType csenv ndeep m2 trace argty do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, false, ("op_Explicit"), [argty] when (// The input type. @@ -1225,7 +1243,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p // Exclusion: No conversion from char to decimal not (isCharTy g argty && isDecimalTy g rty)) -> - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, false, ("op_Explicit"), [argty] @@ -1234,7 +1252,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p // The output type (isDecimalTy g rty)) -> - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | [], _, false, "Pow", [argty1; argty2] when isFpTy g argty1 -> @@ -1242,7 +1260,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p do! SolveDimensionlessNumericType csenv ndeep m2 trace argty1 do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _, _, false, ("Atan2"), [argty1; argty2] when isFpTy g argty1 -> @@ -1250,7 +1268,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p match GetMeasureOfType g argty1 with | None -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 | Some (tcref, _) -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure Measure.One]) - return! ResultD TTraitBuiltIn + return TTraitBuiltIn | _ -> // OK, this is not solved by a built-in constraint. @@ -1279,9 +1297,24 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p else None + let anonRecdPropSearch = + let isGetProp = nm.StartsWith "get_" + if isGetProp && memFlags.IsInstance then + let propName = nm.[4..] + let props = + tys |> List.choose (fun ty -> + match NameResolution.TryFindAnonRecdFieldOfType g ty propName with + | Some (NameResolution.Item.AnonRecdField(anonInfo, tinst, i, _)) -> Some (anonInfo, tinst, i) + | _ -> None) + match props with + | [ prop ] -> Some prop + | _ -> None + else + None + // Now check if there are no feasible solutions at all - match minfos, recdPropSearch with - | [], None when not (tys |> List.exists (isAnyParTy g)) -> + match minfos, recdPropSearch, anonRecdPropSearch with + | [], None, None when not (tys |> List.exists (isAnyParTy g)) -> if tys |> List.exists (isFunTy g) then return! ErrorD (ConstraintSolverError(FSComp.SR.csExpectTypeWithOperatorButGivenFunction(DecompileOpName nm), m, m2)) elif tys |> List.exists (isAnyTupleTy g) then @@ -1322,13 +1355,20 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p let methOverloadResult, errors = trace.CollectThenUndoOrCommit (fun (a, _) -> Option.isSome a) (fun trace -> ResolveOverloading csenv (WithTrace trace) nm ndeep (Some traitInfo) (0, 0) AccessibleFromEverywhere calledMethGroup false (Some rty)) - match recdPropSearch, methOverloadResult with - | Some (rfinfo, isSetProp), None -> + match anonRecdPropSearch, recdPropSearch, methOverloadResult with + | Some (anonInfo, tinst, i), None, None -> + // OK, the constraint is solved by a record property. Assert that the return types match. + let rty2 = List.item i tinst + do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty rty2 + return TTraitSolvedAnonRecdProp(anonInfo, tinst, i) + + | None, 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 do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty rty2 - return! ResultD (TTraitSolvedRecdProp(rfinfo, isSetProp)) - | None, Some (calledMeth:CalledMeth<_>) -> + return TTraitSolvedRecdProp(rfinfo, isSetProp) + + | None, None, Some (calledMeth:CalledMeth<_>) -> // OK, the constraint is solved. let minfo = calledMeth.Method @@ -1342,7 +1382,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p ErrorD(ConstraintSolverError(FSComp.SR.csMethodFoundButIsStatic((NicePrint.minimalStringOfType denv minfo.ApparentEnclosingType), (DecompileOpName nm), nm), m, m2 )) else do! CheckMethInfoAttributes g m None minfo - return! ResultD (TTraitSolved (minfo, calledMeth.CalledTyArgs)) + return TTraitSolved (minfo, calledMeth.CalledTyArgs) | _ -> let support = GetSupportOfMemberConstraint csenv traitInfo @@ -1375,8 +1415,13 @@ and RecordMemberConstraintSolution css m trace traitInfo res = TransactMemberConstraintSolution traitInfo trace BuiltInSln; ResultD true - | TTraitSolvedRecdProp (rfinfo, isSetProp) -> - let sln = MemberConstraintSolutionOfRecdFieldInfo rfinfo isSetProp + | TTraitSolvedRecdProp (rfinfo, isSet) -> + let sln = FSRecdFieldSln(rfinfo.TypeInst,rfinfo.RecdFieldRef,isSet) + TransactMemberConstraintSolution traitInfo trace sln; + ResultD true + + | TTraitSolvedAnonRecdProp (anonInfo, tinst, i) -> + let sln = FSAnonRecdFieldSln(anonInfo, tinst, i) TransactMemberConstraintSolution traitInfo trace sln; ResultD true @@ -1421,9 +1466,6 @@ and MemberConstraintSolutionOfMethInfo css m minfo minst = #endif -and MemberConstraintSolutionOfRecdFieldInfo rfinfo isSet = - FSRecdFieldSln(rfinfo.TypeInst, rfinfo.RecdFieldRef, isSet) - /// Write into the reference cell stored in the TAST and add to the undo trace if necessary and TransactMemberConstraintSolution traitInfo (trace:OptionalTrace) sln = let prev = traitInfo.Solution @@ -2533,14 +2575,14 @@ let UnifyUniqueOverloading (ArgsMustSubsumeOrConvert csenv ndeep NoTrace None false) // UnifyUniqueOverloading is not called in case of trait call - pass isConstraint=false (Some reqdRetTy) calledMeth - return! ResultD true + return true } | [], _ -> ErrorD (Error (FSComp.SR.csMethodNotFound(methodName), m)) | _, [] -> trackErrors { do! ReportNoCandidatesErrorSynExpr csenv callerArgCounts methodName ad calledMethGroup - return! ResultD false + return false } | _ -> ResultD false @@ -2670,7 +2712,7 @@ let CodegenWitnessThatTypeSupportsTraitConstraint tcVal g amap m (traitInfo:Trai let! _res = SolveMemberConstraint csenv true true 0 m NoTrace traitInfo let sln = match traitInfo.Solution with - | None -> Choice4Of4() + | None -> Choice5Of5() | Some sln -> match sln with | ILMethSln(origTy, extOpt, mref, minst) -> @@ -2683,18 +2725,20 @@ let CodegenWitnessThatTypeSupportsTraitConstraint tcVal g amap m (traitInfo:Trai | Some ilActualTypeRef -> let actualTyconRef = Import.ImportILTypeRef amap m ilActualTypeRef MethInfo.CreateILExtensionMeth(amap, m, origTy, actualTyconRef, None, mdef) - Choice1Of4 (ilMethInfo, minst) + Choice1Of5 (ilMethInfo, minst) | FSMethSln(ty, vref, minst) -> - Choice1Of4 (FSMeth(g, ty, vref, None), minst) + Choice1Of5 (FSMeth(g, ty, vref, None), minst) | FSRecdFieldSln(tinst, rfref, isSetProp) -> - Choice2Of4 (tinst, rfref, isSetProp) + Choice2Of5 (tinst, rfref, isSetProp) + | FSAnonRecdFieldSln(anonInfo, tinst, i) -> + Choice3Of5 (anonInfo, tinst, i) | BuiltInSln -> - Choice4Of4 () + Choice5Of5 () | ClosedExprSln expr -> - Choice3Of4 expr + Choice4Of5 expr return! match sln with - | Choice1Of4(minfo, methArgTys) -> + | Choice1Of5(minfo, methArgTys) -> let argExprs = // FIX for #421894 - typechecker assumes that coercion can be applied for the trait calls arguments but codegen doesn't emit coercion operations // result - generation of non-verifyable code @@ -2725,7 +2769,7 @@ let CodegenWitnessThatTypeSupportsTraitConstraint tcVal g amap m (traitInfo:Trai else ResultD (Some (MakeMethInfoCall amap m minfo methArgTys argExprs )) - | Choice2Of4 (tinst, rfref, isSet) -> + | Choice2Of5 (tinst, rfref, isSet) -> let res = match isSet, rfref.RecdField.IsStatic, argExprs.Length with | true, true, 1 -> @@ -2748,8 +2792,18 @@ let CodegenWitnessThatTypeSupportsTraitConstraint tcVal g amap m (traitInfo:Trai Some (mkRecdFieldGet g (argExprs.[0], rfref, tinst, m)) | _ -> None ResultD res - | Choice3Of4 expr -> ResultD (Some (MakeApplicationAndBetaReduce g (expr, tyOfExpr g expr, [], argExprs, m))) - | Choice4Of4 () -> ResultD None + | Choice3Of5 (anonInfo, tinst, i) -> + let res = + let tupInfo = anonInfo.TupInfo + if evalTupInfoIsStruct tupInfo && isByrefTy g (tyOfExpr g argExprs.[0]) then + Some (mkAnonRecdFieldGetViaExprAddr (anonInfo, argExprs.[0], tinst, i, m)) + else + Some (mkAnonRecdFieldGet g (anonInfo, argExprs.[0], tinst, i, m)) + ResultD res + + | Choice4Of5 expr -> ResultD (Some (MakeApplicationAndBetaReduce g (expr, tyOfExpr g expr, [], argExprs, m))) + + | Choice5Of5 () -> ResultD None } diff --git a/src/fsharp/FSComp.txt b/src/fsharp/FSComp.txt index a3f5f82d0ea..6968888e644 100644 --- a/src/fsharp/FSComp.txt +++ b/src/fsharp/FSComp.txt @@ -440,6 +440,7 @@ parsParenFormIsForML,"In F# code you may use 'expr.[expr]'. A type annotation ma 602,parsUnmatched,"Unmatched '%s'" 603,parsUnmatchedBracketBar,"Unmatched '[|'" 604,parsUnmatchedBrace,"Unmatched '{{'" +605,parsUnmatchedBraceBar,"Unmatched '{{|'" 609,parsFieldBinding,"Field bindings must have the form 'id = expr;'" 610,parsMemberIllegalInObjectImplementation,"This member is not permitted in an object implementation" 611,parsMissingFunctionBody,"Missing function body" @@ -922,6 +923,7 @@ typeInfoProperty,"property" typeInfoExtension,"extension" typeInfoCustomOperation,"custom operation" typeInfoArgument,"argument" +typeInfoAnonRecdField,"anonymous record field" typeInfoPatternVariable,"patvar" typeInfoNamespace,"namespace" typeInfoModule,"module" @@ -1341,6 +1343,8 @@ tcGlobalsSystemTypeNotFound,"The system type '%s' was required but no referenced 3213,typrelMemberHasMultiplePossibleDispatchSlots,"The member '%s' matches multiple overloads of the same method.\nPlease restrict it to one of the following:%s." 3214,methodIsNotStatic,"Method or object constructor '%s' is not static" 3215,parsUnexpectedSymbolEqualsInsteadOfIn,"Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead?" +tcAnonRecdCcuMismatch,"Two anonymous record types are from different assemblies '%s' and '%s'" +tcAnonRecdFieldNameMismatch,"Two anonymous record types have mismatched sets of field names '%s' and '%s'" keywordDescriptionAbstract,"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." keyworkDescriptionAnd,"Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters." keywordDescriptionAs,"Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match." @@ -1444,3 +1448,6 @@ notAFunctionButMaybeDeclaration,"This value is not a function and cannot be appl 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." +3243,parsInvalidAnonRecdExpr,"Invalid anonymous record expression" +3244,parsInvalidAnonRecdType,"Invalid anonymous record type" +3245,tcCopyAndUpdateNeedsRecordType,"The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record" diff --git a/src/fsharp/FSStrings.resx b/src/fsharp/FSStrings.resx index 5a99d5e9e74..05cd75cc669 100644 --- a/src/fsharp/FSStrings.resx +++ b/src/fsharp/FSStrings.resx @@ -396,6 +396,9 @@ symbol '[' + + symbol '{|' + symbol '[|' @@ -411,6 +414,9 @@ symbol '|]' + + symbol '|}' + symbol '>}' diff --git a/src/fsharp/FSharp.Core/printf.fs b/src/fsharp/FSharp.Core/printf.fs index f3d47e1c0ab..535d87d491b 100644 --- a/src/fsharp/FSharp.Core/printf.fs +++ b/src/fsharp/FSharp.Core/printf.fs @@ -4,6 +4,8 @@ namespace Microsoft.FSharp.Core type PrintfFormat<'Printer,'State,'Residue,'Result>(value:string) = member x.Value = value + + override __.ToString() = value type PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple>(value:string) = inherit PrintfFormat<'Printer,'State,'Residue,'Result>(value) diff --git a/src/fsharp/FSharp.Core/printf.fsi b/src/fsharp/FSharp.Core/printf.fsi index 011e4f0d9b9..c8f7b2dcaeb 100644 --- a/src/fsharp/FSharp.Core/printf.fsi +++ b/src/fsharp/FSharp.Core/printf.fsi @@ -15,10 +15,12 @@ open System.Text /// Value generated by the overall printf action (e.g. sprint generates a string) /// Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) type PrintfFormat<'Printer,'State,'Residue,'Result> = + /// Construct a format string /// The input string. /// The PrintfFormat containing the formatted result. new : value:string -> PrintfFormat<'Printer,'State,'Residue,'Result> + /// The raw text of the format string. member Value : string @@ -29,7 +31,9 @@ type PrintfFormat<'Printer,'State,'Residue,'Result> = /// Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) /// Tuple of values generated by scan or match. type PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> = + inherit PrintfFormat<'Printer,'State,'Residue,'Result> + /// Construct a format string /// The input string. /// The created format string. @@ -137,9 +141,11 @@ module Printf = /// Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The first type parameter indicates the /// arguments of the format operation and the last the overall return type. type BuilderFormat<'T,'Result> = Format<'T, StringBuilder, unit, 'Result> + /// Represents a statically-analyzed format when formatting builds a string. The first type parameter indicates the /// arguments of the format operation and the last the overall return type. type StringFormat<'T,'Result> = Format<'T, unit, string, 'Result> + /// Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The first type parameter indicates the /// arguments of the format operation and the last the overall return type. type TextWriterFormat<'T,'Result> = Format<'T, TextWriter, unit, 'Result> @@ -147,15 +153,15 @@ module Printf = /// Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The type parameter indicates the /// arguments and return type of the format operation. type BuilderFormat<'T> = BuilderFormat<'T,unit> + /// Represents a statically-analyzed format when formatting builds a string. The type parameter indicates the /// arguments and return type of the format operation. type StringFormat<'T> = StringFormat<'T,string> + /// Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The type parameter indicates the /// arguments and return type of the format operation. type TextWriterFormat<'T> = TextWriterFormat<'T,unit> - - /// Print to a System.Text.StringBuilder /// The StringBuilder to print to. /// The input formatter. diff --git a/src/fsharp/FindUnsolved.fs b/src/fsharp/FindUnsolved.fs index e78e41212dd..89dea15eed4 100644 --- a/src/fsharp/FindUnsolved.fs +++ b/src/fsharp/FindUnsolved.fs @@ -1,9 +1,7 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -//------------------------------------------------------------------------- -// Find unsolved, uninstantiated type variables -//------------------------------------------------------------------------- +/// Find unsolved, uninstantiated type variables module internal Microsoft.FSharp.Compiler.FindUnsolved open Microsoft.FSharp.Compiler @@ -16,24 +14,24 @@ open Microsoft.FSharp.Compiler.TypeRelations type env = Nix +/// The environment and collector type cenv = { g: TcGlobals amap: Import.ImportMap denv: DisplayEnv mutable unsolved: Typars } +/// Walk types, collecting type variables let accTy cenv _env ty = - (freeInType CollectTyparsNoCaching (tryNormalizeMeasureInType cenv.g ty)).FreeTypars |> Zset.iter (fun tp -> - if (tp.Rigidity <> TyparRigidity.Rigid) then - cenv.unsolved <- tp :: cenv.unsolved) + let normalizedTy = tryNormalizeMeasureInType cenv.g ty + (freeInType CollectTyparsNoCaching normalizedTy).FreeTypars |> Zset.iter (fun tp -> + if (tp.Rigidity <> TyparRigidity.Rigid) then + cenv.unsolved <- tp :: cenv.unsolved) let accTypeInst cenv env tyargs = - tyargs |> List.iter (accTy cenv env) + tyargs |> List.iter (accTy cenv env) -//-------------------------------------------------------------------------- -// walk exprs etc -//-------------------------------------------------------------------------- - +/// Walk expressions, collecting type variables let rec accExpr (cenv:cenv) (env:env) expr = let expr = stripExpr expr match expr with @@ -62,7 +60,6 @@ let rec accExpr (cenv:cenv) (env:env) expr = accTypeInst cenv env tyargs accExpr cenv env f accExprs cenv env argsl - // REVIEW: fold the next two cases together | Expr.Lambda(_,_ctorThisValOpt,_baseValOpt,argvs,_body,m,rty) -> let topValInfo = ValReprInfo ([],[argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)],ValReprInfo.unnamedRetVal) let ty = mkMultiLambdaTy m argvs rty @@ -136,6 +133,7 @@ and accLambdas cenv env topValInfo e ety = accExpr cenv env e and accExprs cenv env exprs = exprs |> List.iter (accExpr cenv env) + and accTargets cenv env m ty targets = Array.iter (accTarget cenv env m ty) targets and accTarget cenv env _m _ty (TTarget(_vs,e,_)) = accExpr cenv env e @@ -192,10 +190,6 @@ and accBind cenv env (bind:Binding) = and accBinds cenv env xs = xs |> List.iter (accBind cenv env) -//-------------------------------------------------------------------------- -// check tycons -//-------------------------------------------------------------------------- - let accTyconRecdField cenv env _tycon (rfield:RecdField) = accAttribs cenv env rfield.PropertyAttribs accAttribs cenv env rfield.FieldAttribs @@ -208,14 +202,9 @@ let accTycon cenv env (tycon:Tycon) = tycon.UnionCasesAsList |> List.iter (fun uc -> accAttribs cenv env uc.Attribs uc.RecdFields |> List.iter (accTyconRecdField cenv env tycon)) - let accTycons cenv env tycons = List.iter (accTycon cenv env) tycons -//-------------------------------------------------------------------------- -// check modules -//-------------------------------------------------------------------------- - let rec accModuleOrNamespaceExpr cenv env x = match x with | ModuleOrNamespaceExprWithSig(_mty, def, _m) -> accModuleOrNamespaceDef cenv env def @@ -231,7 +220,9 @@ and accModuleOrNamespaceDef cenv env x = | TMDefDo(e,_m) -> accExpr cenv env e | TMAbstract(def) -> accModuleOrNamespaceExpr cenv env def | TMDefs(defs) -> accModuleOrNamespaceDefs cenv env defs + and accModuleOrNamespaceBinds cenv env xs = List.iter (accModuleOrNamespaceBind cenv env) xs + and accModuleOrNamespaceBind cenv env x = match x with | ModuleOrNamespaceBinding.Binding bind -> accBind cenv env bind diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index d115154a756..4afd8e651c0 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -400,13 +400,15 @@ and GenTyAppAux amap m tyenv repr tinst = let ty = IL.instILType ilTypeInst ty ty | CompiledTypeRepr.ILAsmNamed (tref, boxity, ilTypeOpt) -> - match ilTypeOpt with - | None -> - let ilTypeInst = GenTypeArgsAux amap m tyenv tinst - mkILTy boxity (mkILTySpec (tref,ilTypeInst)) - | Some ilType -> - ilType // monomorphic types include a cached ilType to avoid reallocation of an ILType node + GenILTyAppAux amap m tyenv (tref, boxity, ilTypeOpt) tinst +and GenILTyAppAux amap m tyenv (tref, boxity, ilTypeOpt) tinst = + match ilTypeOpt with + | None -> + let ilTypeInst = GenTypeArgsAux amap m tyenv tinst + mkILTy boxity (mkILTySpec (tref,ilTypeInst)) + | Some ilType -> + ilType // monomorphic types include a cached ilType to avoid reallocation of an ILType node and GenNamedTyAppAux (amap:ImportMap) m tyenv ptrsOK tcref tinst = let g = amap.g @@ -439,6 +441,10 @@ and GenTypeAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = | 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_anon (anonInfo, tinst) -> + let tref = anonInfo.ILTypeRef + let boxity = if evalAnonInfoIsStruct anonInfo then ILBoxity.AsValue else ILBoxity.AsObject + GenILTyAppAux amap m tyenv (tref, boxity, None) tinst | TType_ucase (ucref, args) -> let cuspec,idx = GenUnionCaseSpec amap m tyenv ucref args @@ -541,14 +547,7 @@ 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 - -let GenericParamHasConstraint (gp: ILGenericParameterDef) = - gp.Constraints.Length <> 0 || - gp.Variance <> NonVariant || - gp.HasReferenceTypeConstraint || - gp.HasNotNullableValueTypeConstraint || - gp.HasDefaultConstructorConstraint - +and GenTypePermitVoidAux amap m tyenv ty = GenTypeAux amap m tyenv VoidOK PtrTypesNotOK ty // Static fields generally go in a private InitializationCodeAndBackingFields section. This is to ensure all static // fields are initialized only in their class constructors (we generate one primary @@ -580,8 +579,7 @@ let GenRecdFieldRef m cenv tyenv (rfref:RecdFieldRef) tyargs = GenType cenv.amap m tyenvinner rfref.RecdField.FormalType) let GenExnType amap m tyenv (ecref:TyconRef) = GenTyApp amap m tyenv ecref.CompiledRepresentation [] - - + //-------------------------------------------------------------------------- // Closure summaries //-------------------------------------------------------------------------- @@ -860,7 +858,6 @@ let ComputeFieldSpecForVal(optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, else generate() - let IsValCompiledAsMethod g (v:Val) = match v.ValReprInfo with | None -> false @@ -1029,7 +1026,7 @@ and AddBindingsForModuleTopVals _g allocVal _cloc eenv vs = let AddIncrementalLocalAssemblyFragmentToIlxGenEnv (amap:ImportMap, isIncrementalFragment, g, ccu, fragName, intraAssemblyInfo, eenv, typedImplFiles) = let cloc = CompLocForFragment fragName ccu let allocVal = ComputeAndAddStorageForLocalTopVal (amap, g, intraAssemblyInfo, true, NoShadowLocal) - (eenv, typedImplFiles) ||> List.fold (fun eenv (TImplFile(qname,_,mexpr,_,_)) -> + (eenv, typedImplFiles) ||> List.fold (fun eenv (TImplFile(qname, _, mexpr, _, _, _)) -> let cloc = { cloc with clocTopImplQualifiedName = qname.Text } if isIncrementalFragment then match mexpr with @@ -1183,14 +1180,20 @@ and TypeDefsBuilder() = let idx = if addAtEnd then (countDown <- countDown - 1; countDown) else tdefs.Count tdefs.Add (tdef.Name, (idx, (new TypeDefBuilder(tdef, tdefDiscards), eliminateIfEmpty))) +type AnonTypeGenerationTable() = + let dict = Dictionary(HashIdentity.Structural) + member __.Table = dict + /// Assembly generation buffers -type AssemblyBuilder(cenv:cenv) as mgbuf = +type AssemblyBuilder(cenv:cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf = // The Abstract IL table of types let gtdefs= new TypeDefsBuilder() // The definitions of top level values, as quotations. - let mutable reflectedDefinitions : System.Collections.Generic.Dictionary = System.Collections.Generic.Dictionary(HashIdentity.Reference) + let mutable reflectedDefinitions : Dictionary = Dictionary(HashIdentity.Reference) + let mutable extraBindingsToGenerate = [] + // A memoization table for generating value types for big constant arrays - let vtgenerator= + let rawDataValueTypeGenerator = new MemoizationTable<(CompileLocation * int) , ILTypeSpec> ((fun (cloc,size) -> let name = CompilerGeneratedName ("T" + string(newUnique()) + "_" + string size + "Bytes") // Type names ending ...$T_37Bytes @@ -1202,6 +1205,129 @@ type AssemblyBuilder(cenv:cenv) as mgbuf = vtspec), keyComparer=HashIdentity.Structural) + let generateAnonType genToStringMethod (isStruct, ilTypeRef, nms) = + + let flds = [ for (i,nm) in Array.indexed nms -> (nm, nm + "@", ILType.TypeVar (uint16 i)) ] + // Note that this alternative below would give the same names as C#, but the generated + // comparison/equality doesn't know about these names. + //let flds = [ for (i,nm) in Array.indexed nms -> (nm, "<" + nm + ">" + "i__Field", ILType.TypeVar (uint16 i)) ] + + let ilGenericParams = + [ for nm in nms -> + { Name = sprintf "<%s>j__TPar" nm + Constraints = [] + Variance=NonVariant + CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs + HasReferenceTypeConstraint=false + HasNotNullableValueTypeConstraint=false + HasDefaultConstructorConstraint= false + MetadataIndex = NoMetadataIdx } ] + + let ilTy = mkILFormalNamedTy (if isStruct then ILBoxity.AsValue else ILBoxity.AsObject) ilTypeRef ilGenericParams + + // Generate the IL fields + let ilFieldDefs = + mkILFields + [ for (_, fldName, fldTy) in flds -> + let fdef = mkILInstanceField (fldName, fldTy, None, ILMemberAccess.Private) + fdef.With(customAttrs = mkILCustomAttrs [ cenv.g.DebuggerBrowsableNeverAttribute ]) ] + + // Generate property definitions for the fields compiled as properties + let ilProperties = + mkILProperties + [ for (i,(propName, _fldName, fldTy)) in List.indexed flds -> + ILPropertyDef(name=propName, + attributes=PropertyAttributes.None, + setMethod=None, + getMethod=Some(mkILMethRef(ilTypeRef,ILCallingConv.Instance,"get_" + propName,0,[],fldTy )), + callingConv=ILCallingConv.Instance.ThisConv, + propertyType=fldTy, + init= None, + args=[], + customAttrs=mkILCustomAttrs [ mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i ]) ] + + let ilMethods = + [ for (propName, fldName, fldTy) in flds -> + mkLdfldMethodDef ("get_" + propName,ILMemberAccess.Public,false,ilTy,fldName,fldTy) + yield! genToStringMethod ilTy ] + + let ilBaseTy = (if isStruct then cenv.g.iltyp_ValueType else cenv.g.ilg.typ_Object) + + let ilCtorDef = mkILSimpleStorageCtorWithParamNames(None, (if isStruct then None else Some ilBaseTy.TypeSpec), ilTy, [], flds, ILMemberAccess.Public) + let ilCtorRef = mkRefToILMethod(ilTypeRef, ilCtorDef) + let ilMethodRefs = [| for mdef in ilMethods -> mkRefToILMethod(ilTypeRef, mdef) |] + + if ilTypeRef.Scope.IsLocalRef then + + // Create a tycon that looks exactly like a record definition, to help drive the generation of equality/comparison code + let m = range0 + let tps = + [ for nm in nms -> + let stp = Typar(mkSynId m ("T"+nm),TyparStaticReq.NoStaticReq,true) + NewTypar (TyparKind.Type, TyparRigidity.WarnIfNotRigid,stp,false,TyparDynamicReq.Yes,[],true,true) ] + + let tycon = + let lmtyp = MaybeLazy.Strict (NewEmptyModuleOrNamespaceType ModuleOrType) + let cpath = CompPath(ilTypeRef.Scope,[]) + NewTycon(Some cpath, ilTypeRef.Name, m, taccessPublic, taccessPublic, TyparKind.Type, LazyWithContext.NotLazy tps, XmlDoc.Empty, false, false, false, lmtyp) + + if isStruct then + tycon.SetIsStructRecordOrUnion(true) + + tycon.entity_tycon_repr <- + TRecdRepr (MakeRecdFieldsTable + [ for (tp, (propName, _fldName, _fldTy)) in (List.zip tps flds) -> + NewRecdField false None (mkSynId m propName) false (mkTyparTy tp) true false [] [] XmlDoc.Empty taccessPublic false ]) + + let tcref = mkLocalTyconRef tycon + let _,typ = generalizeTyconRef tcref + let tcaug = tcref.TypeContents + + tcaug.tcaug_interfaces <- + [ (cenv.g.mk_IStructuralComparable_ty,true,m) + (cenv.g.mk_IComparable_ty,true,m) + (mkAppTy cenv.g.system_GenericIComparable_tcref [typ],true,m) + (cenv.g.mk_IStructuralEquatable_ty,true,m) + (mkAppTy cenv.g.system_GenericIEquatable_tcref [typ],true,m) ] + + let vspec1,vspec2 = AugmentWithHashCompare.MakeValsForEqualsAugmentation cenv.g tcref + let evspec1,evspec2,evspec3 = AugmentWithHashCompare.MakeValsForEqualityWithComparerAugmentation cenv.g tcref + let cvspec1,cvspec2 = AugmentWithHashCompare.MakeValsForCompareAugmentation cenv.g tcref + let cvspec3 = AugmentWithHashCompare.MakeValsForCompareWithComparerAugmentation cenv.g tcref + + tcaug.SetCompare (mkLocalValRef cvspec1, mkLocalValRef cvspec2) + tcaug.SetCompareWith (mkLocalValRef cvspec3) + tcaug.SetEquals (mkLocalValRef vspec1, mkLocalValRef vspec2) + tcaug.SetHashAndEqualsWith (mkLocalValRef evspec1, mkLocalValRef evspec2, mkLocalValRef evspec3) + + // Build the ILTypeDef. We don't rely on the normal record generation process because we want very specific field names + + let ilTypeDefAttribs = mkILCustomAttrs [ cenv.g.CompilerGeneratedAttribute; mkCompilationMappingAttr cenv.g (int SourceConstructFlags.RecordType) ] + + let ilInterfaceTys = [ for (ity,_,_) in tcaug.tcaug_interfaces -> GenType cenv.amap m (TypeReprEnv.ForTypars tps) ity ] + + let ilTypeDef = + mkILGenericClass (ilTypeRef.Name, ILTypeDefAccess.Public, ilGenericParams, ilBaseTy, ilInterfaceTys, + mkILMethods (ilCtorDef :: ilMethods), ilFieldDefs, emptyILTypeDefs, + ilProperties, mkILEvents [], ilTypeDefAttribs, + ILTypeInit.BeforeField) + + let ilTypeDef = ilTypeDef.WithSealed(true).WithSerializable(true) + + mgbuf.AddTypeDef(ilTypeRef, ilTypeDef, false, true, None) + + let extraBindings = + [ yield! AugmentWithHashCompare.MakeBindingsForCompareAugmentation cenv.g tycon + yield! AugmentWithHashCompare.MakeBindingsForCompareWithComparerAugmentation cenv.g tycon + yield! AugmentWithHashCompare.MakeBindingsForEqualityWithComparerAugmentation cenv.g tycon + yield! AugmentWithHashCompare.MakeBindingsForEqualsAugmentation cenv.g tycon ] + + let optimizedExtraBindings = extraBindings |> List.map (fun (TBind(a,b,c)) -> TBind(a,cenv.optimizeDuringCodeGen b,c)) + + extraBindingsToGenerate <- optimizedExtraBindings @ extraBindingsToGenerate + + (ilCtorRef,ilMethodRefs,ilTy) + let mutable explicitEntryPointInfo : ILTypeRef option = None /// static init fields on script modules. @@ -1221,14 +1347,32 @@ type AssemblyBuilder(cenv:cenv) as mgbuf = scriptInitFspecs |> List.iter IntializeCompiledScript | None -> () - - member mgbuf.GenerateRawDataValueType(cloc,size) = // Byte array literals require a ValueType of size the required number of bytes. // With fsi.exe, S.R.Emit TypeBuilder CreateType has restrictions when a ValueType VT is nested inside a type T, and T has a field of type VT. // To avoid this situation, these ValueTypes are generated under the private implementation rather than in the current cloc. [was bug 1532]. let cloc = CompLocForPrivateImplementationDetails cloc - vtgenerator.Apply((cloc,size)) + rawDataValueTypeGenerator.Apply((cloc,size)) + + member mgbuf.GenerateAnonType(genToStringMethod, anonInfo:AnonRecdTypeInfo) = + let isStruct = evalAnonInfoIsStruct anonInfo + let key = anonInfo.Stamp + match anonTypeTable.Table.TryGetValue key with + | true, res -> res + | _ -> + let info = generateAnonType genToStringMethod (isStruct,anonInfo.ILTypeRef,anonInfo.SortedNames) + anonTypeTable.Table.[key] <- info + info + + member mgbuf.LookupAnonType(anonInfo:AnonRecdTypeInfo) = + match anonTypeTable.Table.TryGetValue anonInfo.Stamp with + | true, res -> res + | _ -> failwithf "the anonymous record %A has not been generated in the pre-phase of generating this module" anonInfo.ILTypeRef + + member mgbuf.GrabExtraBindingsToGenerate() = + let result = extraBindingsToGenerate + extraBindingsToGenerate <- [] + result member mgbuf.AddTypeDef(tref:ILTypeRef, tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) = gtdefs.FindNestedTypeDefsBuilder(tref.Enclosing).AddTypeDef(tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) @@ -1281,7 +1425,6 @@ type AssemblyBuilder(cenv:cenv) as mgbuf = member mgbuf.cenv = cenv member mgbuf.GetExplicitEntryPointInfo() = explicitEntryPointInfo - /// Record the types of the things on the evaluation stack. /// Used for the few times we have to flush the IL evaluation stack and to compute maxStack. @@ -1895,13 +2038,17 @@ let rec GenExpr (cenv:cenv) (cgbuf:CodeGenBuffer) eenv sp expr sequel = | Expr.Val(v,_,m) -> GenGetVal cenv cgbuf eenv (v,m) sequel | Expr.Op(op,tyargs,args,m) -> - begin match op,args,tyargs with + match op,args,tyargs with | TOp.ExnConstr(c),_,_ -> GenAllocExn cenv cgbuf eenv (c,args,m) sequel | TOp.UnionCase(c),_,_ -> GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel | TOp.Recd(isCtor,tycon),_,_ -> GenAllocRecd cenv cgbuf eenv isCtor (tycon,tyargs,args,m) sequel + | TOp.AnonRecd(anonInfo),_,_ -> + GenAllocAnonRecd cenv cgbuf eenv (anonInfo,tyargs,args,m) sequel + | TOp.AnonRecdGet (anonInfo,n),[e],_ -> + GenGetAnonRecdField cenv cgbuf eenv (anonInfo,e,tyargs,n,m) sequel | TOp.TupleFieldGet (tupInfo,n),[e],_ -> GenGetTupleField cenv cgbuf eenv (tupInfo,e,tyargs,n,m) sequel | TOp.ExnFieldGet(ecref,n),[e],_ -> @@ -1981,7 +2128,6 @@ let rec GenExpr (cenv:cenv) (cgbuf:CodeGenBuffer) eenv sp expr sequel = cgbuf.SetMarkToHere (Mark label) GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel | _ -> error(InternalError("Unexpected operator node expression",expr.Range)) - end | Expr.StaticOptimization(constraints,e2,e3,m) -> GenStaticOptimization cenv cgbuf eenv (constraints,e2,e3,m) sequel | Expr.Obj(_,ty,_,_,[meth],[],m) when isDelegateTy cenv.g ty -> @@ -2226,6 +2372,24 @@ and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = (mkILCtorMethSpecForTy (ty,relevantFields |> List.map (fun f -> GenType cenv.amap m tyenvinner f.FormalType) ))) GenSequel cenv eenv.cloc cgbuf sequel +and GenAllocAnonRecd cenv cgbuf eenv (anonInfo: AnonRecdTypeInfo, tyargs, args, m) sequel = + let anonCtor, _anonMethods, anonType = cgbuf.mgbuf.LookupAnonType(anonInfo) + let boxity = anonType.Boxity + GenExprs cenv cgbuf eenv args + let ilTypeArgs = GenTypeArgs cenv.amap m eenv.tyenv tyargs + let anonTypeWithInst = mkILTy boxity (mkILTySpec(anonType.TypeSpec.TypeRef,ilTypeArgs)) + CG.EmitInstr cgbuf (pop args.Length) (Push [anonTypeWithInst]) (mkNormalNewobj (mkILMethSpec(anonCtor,boxity,ilTypeArgs,[]))) + GenSequel cenv eenv.cloc cgbuf sequel + +and GenGetAnonRecdField cenv cgbuf eenv (anonInfo: AnonRecdTypeInfo, e, tyargs, n, m) sequel = + let _anonCtor, anonMethods, anonType = cgbuf.mgbuf.LookupAnonType(anonInfo) + let boxity = anonType.Boxity + let ilTypeArgs = GenTypeArgs cenv.amap m eenv.tyenv tyargs + let anonMethod = anonMethods.[n] + let anonFieldType = ilTypeArgs.[n] + GenExpr cenv cgbuf eenv SPSuppress e Continue + CG.EmitInstr cgbuf (pop 1) (Push [anonFieldType]) (mkNormalCall (mkILMethSpec(anonMethod,boxity,ilTypeArgs,[]))) + GenSequel cenv eenv.cloc cgbuf sequel and GenNewArraySimple cenv cgbuf eenv (elems,elemTy,m) sequel = let ilElemTy = GenType cenv.amap m eenv.tyenv elemTy @@ -3634,7 +3798,6 @@ and GenObjectExpr cenv cgbuf eenvouter expr (baseType,baseValOpt,basecall,overri let eenvinner = bindBaseOrThisVarOpt cenv eenvinner baseValOpt let ilCtorBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],cloName,eenvinner,1,basecall,discardAndReturnVoid) - let genMethodAndOptionalMethodImpl tmethod useMethodImpl = [ for ((useMethodImpl,methodImplGeneratorFunction,methTyparsOfOverridingMethod),mdef) in GenObjectMethod cenv eenvinner cgbuf useMethodImpl tmethod do let mimpl = (if useMethodImpl then Some(methodImplGeneratorFunction (ilTyForOverriding,methTyparsOfOverridingMethod)) else None) @@ -3697,12 +3860,6 @@ and GenSequenceExpr cenv (cgbuf:CodeGenBuffer) eenvouter (nextEnumeratorValRef:V CodeGenMethod cenv cgbuf.mgbuf ([],"GetFreshEnumerator",eenvinner,1, (fun cgbuf eenv -> for fv in cloFreeVars do -(* TODO: Emit CompareExchange - if (System.Threading.Interlocked.CompareExchange(&__state, 1, 0) = 0) then - (x :> IEnumerator<'T>) - else - ... -*) /// State variables always get zero-initialized if stateVarsSet.Contains fv then GenDefaultValue cenv cgbuf eenv (fv.Type,m) @@ -3799,12 +3956,13 @@ and GenLambdaClosure cenv (cgbuf:CodeGenBuffer) eenv isLocalTypeFunc selfv expr | Expr.Lambda (_,_,_,_,_,m,_) | Expr.TyLambda(_,_,_,m,_) -> - let cloinfo,body,eenvinner = GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenv expr + let cloinfo,body,eenvinner = GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenv expr let entryPointInfo = match selfv with | Some v -> [(v, BranchCallClosure (cloinfo.cloArityInfo))] | _ -> [] + let ilCloBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,entryPointInfo,cloinfo.cloName,eenvinner,1,body,Return) let ilCloTypeRef = cloinfo.cloSpec.TypeRef let cloTypeDefs = @@ -3968,7 +4126,7 @@ and GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr = (cloAttribs,cloInternalFreeTyvars,cloContractFreeTyvars,cloFreeTyvars,cloFreeVars,ilCloTypeRef,Array.ofList ilCloFreeVars,eenvinner) -and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = +and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = let returnTy = match expr with | Expr.Lambda (_,_,_,_,_,_,returnTy) | Expr.TyLambda(_,_,_,_,returnTy) -> returnTy @@ -4622,7 +4780,7 @@ and GenLetRecFixup cenv cgbuf eenv (ilxCloSpec:IlxClosureSpec,e,ilField:ILFieldS GenExpr cenv cgbuf eenv SPSuppress e2 Continue CG.EmitInstrs cgbuf (pop 2) Push0 [ mkNormalStfld (mkILFieldSpec(ilField.FieldRef,ilxCloSpec.ILType)) ] -and GenLetRecBindings cenv cgbuf eenv (allBinds: Bindings,m) = +and GenLetRecBindings cenv (cgbuf:CodeGenBuffer) eenv (allBinds: Bindings,m) = // Fix up recursion for non-toplevel recursive bindings let bindsPossiblyRequiringFixup = allBinds |> List.filter (fun b -> @@ -5263,7 +5421,7 @@ and GenMethodForBinding let securityAttributes,attrs = attrs |> List.partition (fun a -> IsSecurityAttribute cenv.g cenv.amap cenv.casApplied a m) - let permissionSets = CreatePermissionSets cenv.g cenv.amap eenv securityAttributes + let permissionSets = CreatePermissionSets cenv eenv securityAttributes let secDecls = if List.isEmpty securityAttributes then emptyILSecurityDecls else mkILSecurityDecls permissionSets @@ -5824,18 +5982,18 @@ and GenCompilationArgumentCountsAttr cenv (v:Val) = () ] // Create a permission set for a list of security attributes -and CreatePermissionSets g amap eenv (securityAttributes : Attrib list) = +and CreatePermissionSets cenv eenv (securityAttributes : Attrib list) = [for ((Attrib(tcref,_,actions,_,_,_,_)) as attr) in securityAttributes do let action = match actions with | [AttribInt32Arg act] -> act | _ -> failwith "internal error: unrecognized security action" let secaction = (List.assoc action (Lazy.force ILSecurityActionRevMap)) let tref = tcref.CompiledRepresentationForNamedType - let ilattr = GenAttr amap g eenv attr + let ilattr = GenAttr cenv.amap cenv.g eenv attr let _, ilNamedArgs = - match TryDecodeILAttribute g tref (mkILCustomAttrs [ilattr]) with + match TryDecodeILAttribute cenv.g tref (mkILCustomAttrs [ilattr]) with | Some(ae,na) -> ae, na | _ -> [],[] let setArgs = ilNamedArgs |> List.map (fun (n,ilt,_,ilae) -> (n,ilt,ilae)) - yield IL.mkPermissionSet g.ilg (secaction, [(tref, setArgs)])] + yield IL.mkPermissionSet cenv.g.ilg (secaction, [(tref, setArgs)])] //-------------------------------------------------------------------------- // Generate the set of modules for an assembly, and the declarations in each module @@ -5941,7 +6099,14 @@ and GenModuleBinding cenv (cgbuf:CodeGenBuffer) (qname:QualifiedNameOfFile) lazy /// Generate the namespace fragments in a single file -and GenTopImpl cenv mgbuf mainInfoOpt eenv (TImplFile(qname, _, mexpr, hasExplicitEntryPoint, isScript), optimizeDuringCodeGen) = +and GenTopImpl cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (TImplFile(qname, _, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes), optimizeDuringCodeGen) = + + let m = qname.Range + + // Generate all the anonymous record types mentioned anywhere in this module + for anonInfo in anonRecdTypes.Values do + mgbuf.GenerateAnonType((fun ilThisTy -> GenToStringMethod cenv eenv ilThisTy m), anonInfo) |> ignore + let eenv = {eenv with cloc = { eenv.cloc with clocTopImplQualifiedName = qname.Text } } cenv.optimizeDuringCodeGen <- optimizeDuringCodeGen @@ -5971,7 +6136,6 @@ and GenTopImpl cenv mgbuf mainInfoOpt eenv (TImplFile(qname, _, mexpr, hasExplic let lazyInitInfo = new ResizeArray ILInstr list -> ILInstr list -> unit>() // codegen .cctor/main for outer module - let m = qname.Range let clocCcu = CompLocForCcu cenv.viewCcu // This method name is only used internally in ilxgen.fs to aid debugging @@ -5997,8 +6161,6 @@ and GenTopImpl cenv mgbuf mainInfoOpt eenv (TImplFile(qname, _, mexpr, hasExplic // Library file (mainInfoOpt = None) : optional .cctor if topCode has initialization effect // Final file, explicit entry point (mainInfoOpt = Some _, GetExplicitEntryPointInfo() = Some) : main + optional .cctor if topCode has initialization effect // Final file, implicit entry point (mainInfoOpt = Some _, GetExplicitEntryPointInfo() = None) : main + initialize + optional .cctor calling initialize - - let doesSomething = CheckCodeDoesSomething topCode.Code // Make a FEEFEE instruction to mark hidden code regions @@ -6177,12 +6339,11 @@ and GenAbstractBinding cenv eenv tref (vref:ValRef) = else [],[],[] -and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = - let genToString ilThisTy = - [ - 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,_,_,_,_))) -> +/// Generate a ToString method that calls 'sprintf "%A"' +and GenToStringMethod cenv eenv ilThisTy m = + [ 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,_,_,_,_))) -> // 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 @@ -6216,9 +6377,9 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = None)) let mdef = mdef.With(customAttrs = mkILCustomAttrs [ cenv.g.CompilerGeneratedAttribute ]) yield mdef - | None,_ -> () - | _,None -> () - | _ -> ()] + | _ -> () ] + +and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let tcref = mkLocalTyconRef tycon if tycon.IsTypeAbbrev then () else match tycon.TypeReprInfo with @@ -6330,7 +6491,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let generateDebugProxies = (not (tyconRefEq cenv.g tcref cenv.g.unit_tcr_canon) && not (HasFSharpAttribute cenv.g cenv.g.attrib_DebuggerTypeProxyAttribute tycon.Attribs)) - let permissionSets = CreatePermissionSets cenv.g cenv.amap eenv securityAttrs + let permissionSets = CreatePermissionSets cenv eenv securityAttrs let secDecls = if List.isEmpty securityAttrs then emptyILSecurityDecls else mkILSecurityDecls permissionSets let ilDebugDisplayAttributes = @@ -6583,7 +6744,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = yield mkILSimpleStorageCtor(None, Some cenv.g.ilg.typ_Object.TypeSpec, ilThisTy, [], [], reprAccess) if not (tycon.HasMember cenv.g "ToString" []) then - yield! genToString ilThisTy + yield! GenToStringMethod cenv eenv ilThisTy m | TFSharpObjectRepr r when tycon.IsFSharpDelegateTycon -> // Build all the methods that go with a delegate type @@ -6598,12 +6759,11 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = | [[tsp]] when isUnitTy cenv.g tsp.Type -> [] (* suppress unit arg *) | paraml -> paraml 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 + yield! mkILDelegateMethods reprAccess cenv.g.ilg (cenv.g.iltyp_AsyncCallback, cenv.g.iltyp_IAsyncResult) (p,r) | _ -> () | TUnionRepr _ when not (tycon.HasMember cenv.g "ToString" []) -> - yield! genToString ilThisTy + yield! GenToStringMethod cenv eenv ilThisTy m | _ -> () ] let ilMethods = methodDefs @ augmentOverrideMethodDefs @ abstractMethodDefs @@ -6929,7 +7089,26 @@ let CodegenAssembly cenv eenv mgbuf fileImpls = if not (isNil fileImpls) then let a,b = List.frontAndBack fileImpls let eenv = List.fold (GenTopImpl cenv mgbuf None) eenv a - let _eenv = GenTopImpl cenv mgbuf cenv.opts.mainMethodInfo eenv b + let eenv = GenTopImpl cenv mgbuf cenv.opts.mainMethodInfo eenv b + + // Some constructs generate residue types and bindings. Generate these now. They don't result in any + // top-level initialization code. + begin + let extraBindings = mgbuf.GrabExtraBindingsToGenerate() + //printfn "#extraBindings = %d" extraBindings.Length + if extraBindings.Length > 0 then + let mexpr = TMDefs [ for b in extraBindings -> TMDefLet(b,range0) ] + let _emptyTopInstrs,_emptyTopCode = + CodeGenMethod cenv mgbuf ([],"unused",eenv,0, (fun cgbuf eenv -> + let lazyInitInfo = ResizeArray() + let qname = QualifiedNameOfFile(mkSynId range0 "unused") + LocalScope "module" cgbuf (fun scopeMarks -> + let eenv = AddBindingsForModuleDef (fun cloc v -> AllocTopValWithinExpr cenv cgbuf cloc scopeMarks v) eenv.cloc eenv mexpr + GenModuleDef cenv cgbuf qname lazyInitInfo eenv mexpr)),range0) + //printfn "#_emptyTopInstrs = %d" _emptyTopInstrs.Length + () + end + mgbuf.AddInitializeScriptsInOrderToEntryPoint() //------------------------------------------------------------------------- @@ -6954,15 +7133,17 @@ type IlxGenResults = { ilTypeDefs: ILTypeDef list ilAssemAttrs : ILAttribute list ilNetModuleAttrs: ILAttribute list + topAssemblyAttrs : Attribs + permissionSets : ILSecurityDecl list quotationResourceInfo: (ILTypeRef list * byte[]) list } -let GenerateCode (cenv, eenv, TypedAssemblyAfterOptimization fileImpls, assemAttribs, moduleAttribs) = +let GenerateCode (cenv, anonTypeTable, eenv, TypedAssemblyAfterOptimization fileImpls, assemAttribs, moduleAttribs) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.IlxGen // Generate the implementations into the mgbuf - let mgbuf= new AssemblyBuilder(cenv) + let mgbuf = new AssemblyBuilder(cenv, anonTypeTable) let eenv = { eenv with cloc = CompLocForFragment cenv.opts.fragName cenv.viewCcu } // Generate the PrivateImplementationDetails type @@ -6975,6 +7156,7 @@ let GenerateCode (cenv, eenv, TypedAssemblyAfterOptimization fileImpls, assemAtt let tdefs,reflectedDefinitions = mgbuf.Close() + // Generate the quotations let quotationResourceInfo = match reflectedDefinitions with @@ -7011,9 +7193,16 @@ let GenerateCode (cenv, eenv, TypedAssemblyAfterOptimization fileImpls, assemAtt let ilNetModuleAttrs = GenAttrs cenv eenv moduleAttribs + let casApplied = new Dictionary() + let securityAttrs, topAssemblyAttrs = assemAttribs |> List.partition (fun a -> IsSecurityAttribute cenv.g cenv.amap casApplied a rangeStartup) + // remove any security attributes from the top-level assembly attribute list + let permissionSets = CreatePermissionSets cenv eenv securityAttrs + { ilTypeDefs= tdefs ilAssemAttrs = ilAssemAttrs ilNetModuleAttrs = ilNetModuleAttrs + topAssemblyAttrs = topAssemblyAttrs + permissionSets = permissionSets quotationResourceInfo = quotationResourceInfo } @@ -7113,37 +7302,13 @@ let ClearGeneratedValue (ctxt: ExecutionContext) (_g:TcGlobals) eenv (v:Val) = #endif () -(* -let LookupGeneratedInfo (ctxt: ExecutionContext) (g:TcGlobals) eenv (v:Val) = - try - match StorageForVal v.Range v eenv with - | StaticField (fspec, _, hasLiteralAttr, ilContainerTy, _, _, ilGetterMethRef, _, _) -> - let staticTy = ctxt.LookupTypeRef ilContainerTy.TypeRef - if hasLiteralAttr then - Some (staticTy.GetField(fspec.Name) :> MemberInfo) - else - Some (staticTy.GetMethod(ilGetterMethRef.Name,[||]) :> MemberInfo) - | Null -> None - | Local _ -> None - | Method _ -> None - | Arg _ -> None - | Env _ -> None - with - e -> -#if DEBUG - printf "ilxGen.lookupGenertedInfo for v=%s caught exception:\n%A\n\n" v.LogicalName e -#endif - None - - -*) - /// The published API from the ILX code generator type IlxAssemblyGenerator(amap: ImportMap, tcGlobals: TcGlobals, tcVal : ConstraintSolver.TcValF, ccu: Tast.CcuThunk) = // The incremental state held by the ILX code generator let mutable ilxGenEnv = GetEmptyIlxGenEnv tcGlobals.ilg ccu + let anonTypeTable = AnonTypeGenerationTable() let intraAssemblyInfo = { StaticFieldInfo = new Dictionary<_,_>(HashIdentity.Structural) } let casApplied = new Dictionary() @@ -7168,7 +7333,7 @@ type IlxAssemblyGenerator(amap: ImportMap, tcGlobals: TcGlobals, tcVal : Constra intraAssemblyInfo = intraAssemblyInfo opts = codeGenOpts optimizeDuringCodeGen = (fun x -> x) } - GenerateCode (cenv, ilxGenEnv, typedAssembly, assemAttribs, moduleAttribs) + GenerateCode (cenv, anonTypeTable, ilxGenEnv, typedAssembly, assemAttribs, moduleAttribs) /// Invert the compilation of the given value and clear the storage of the value member __.ClearGeneratedValue (ctxt, v) = ClearGeneratedValue ctxt tcGlobals ilxGenEnv v @@ -7176,5 +7341,4 @@ type IlxAssemblyGenerator(amap: ImportMap, tcGlobals: TcGlobals, tcVal : Constra /// Invert the compilation of the given value and return its current dynamic value and its compiled System.Type member __.LookupGeneratedValue (ctxt, v) = LookupGeneratedValue amap ctxt ilxGenEnv v - /// Create the CAS permission sets for an assembly fragment - member __.CreatePermissionSets attribs = CreatePermissionSets tcGlobals amap ilxGenEnv attribs + diff --git a/src/fsharp/IlxGen.fsi b/src/fsharp/IlxGen.fsi index 25c727eca82..6d50da1bfd3 100644 --- a/src/fsharp/IlxGen.fsi +++ b/src/fsharp/IlxGen.fsi @@ -62,6 +62,10 @@ type public IlxGenResults = ilAssemAttrs : ILAttribute list /// The generated IL/ILX .NET module attributes ilNetModuleAttrs : ILAttribute list + /// The attributes for the assembly in F# form + topAssemblyAttrs : Attribs + /// The security attributes to attach to the assembly + permissionSets : ILSecurityDecl list /// The generated IL/ILX resources associated with F# quotations quotationResourceInfo : (ILTypeRef list * byte[]) list } @@ -88,9 +92,6 @@ type public IlxAssemblyGenerator = /// Generate ILX code for an assembly fragment member GenerateCode : IlxGenOptions * TypedAssemblyAfterOptimization * Attribs * Attribs -> IlxGenResults - /// Create the CAS permission sets for an assembly fragment - 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/InnerLambdasToTopLevelFuncs.fs b/src/fsharp/InnerLambdasToTopLevelFuncs.fs index da5c49f4bb7..c783c1efe1c 100644 --- a/src/fsharp/InnerLambdasToTopLevelFuncs.fs +++ b/src/fsharp/InnerLambdasToTopLevelFuncs.fs @@ -1280,9 +1280,9 @@ module Pass4_RewriteAssembly = let rhs,z = TransModuleDef penv z rhs ModuleOrNamespaceBinding.Module(nm,rhs),z - let TransImplFile penv z (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript)) = + let TransImplFile penv z (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes)) = let moduleExpr,z = TransModuleExpr penv z moduleExpr - (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript)),z + (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes)),z //------------------------------------------------------------------------- // pass5: copyExpr diff --git a/src/fsharp/LexFilter.fs b/src/fsharp/LexFilter.fs index f8b7f951c29..c67aa06cb42 100755 --- a/src/fsharp/LexFilter.fs +++ b/src/fsharp/LexFilter.fs @@ -342,7 +342,7 @@ let rec isSeqBlockElementContinuator token = // ... // ), <------- NOTE RPAREN HERE // Shortcut.CtrlO) - | END | AND | WITH | THEN | RPAREN | RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ -> true + | END | AND | WITH | THEN | RPAREN | RBRACE | BAR_RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ -> true // The following arise during reprocessing of the inserted tokens when we hit a DONE | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true @@ -370,7 +370,7 @@ let isAtomicExprEndToken token = | UINT8 _ | UINT16 _ | UINT32 _ | UINT64 _ | UNATIVEINT _ | DECIMAL _ | BIGNUM _ | STRING _ | BYTEARRAY _ | CHAR _ | IEEE32 _ | IEEE64 _ - | RPAREN | RBRACK | RBRACE | BAR_RBRACK | END + | RPAREN | RBRACK | RBRACE | BAR_RBRACE | BAR_RBRACK | END | NULL | FALSE | TRUE | UNDERSCORE -> true | _ -> false @@ -381,6 +381,7 @@ let parenTokensBalance t1 t2 = match t1,t2 with | (LPAREN,RPAREN) | (LBRACE,RBRACE) + | (LBRACE_BAR,BAR_RBRACE) | (LBRACK,RBRACK) | (INTERFACE,END) | (CLASS,END) @@ -676,7 +677,6 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | _,(CtxtSeqBlock _ :: CtxtParen((LBRACE | LBRACK | LBRACK_BAR),_) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) -> unindentationLimit false rest - // MAJOR PERMITTED UNDENTATION This is allowing: // if x then y else // let x = 3 + 4 @@ -752,8 +752,8 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // 'if ... else [' limited by 'if' // 'if ... else [|' limited by 'if' | _,(CtxtParen ((SIG | STRUCT | BEGIN),_) :: CtxtSeqBlock _ :: (CtxtModuleBody (_,false) as limitCtxt) :: _) - | _,(CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACK_BAR) ,_) :: CtxtSeqBlock _ :: CtxtThen _ :: (CtxtIf _ as limitCtxt) :: _) - | _,(CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACK_BAR) ,_) :: CtxtSeqBlock _ :: CtxtElse _ :: (CtxtIf _ as limitCtxt) :: _) + | _,(CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR) ,_) :: CtxtSeqBlock _ :: CtxtThen _ :: (CtxtIf _ as limitCtxt) :: _) + | _,(CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR | LBRACK_LESS) ,_) :: CtxtSeqBlock _ :: CtxtElse _ :: (CtxtIf _ as limitCtxt) :: _) // 'f ... (' in seqblock limited by 'f' // 'f ... {' in seqblock limited by 'f' NOTE: this is covered by the more generous case above @@ -770,7 +770,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // REVIEW: document these | _,(CtxtSeqBlock _ :: CtxtParen((BEGIN | LPAREN | LBRACK | LBRACK_BAR),_) :: CtxtVanilla _ :: (CtxtSeqBlock _ as limitCtxt) :: _) - | (CtxtSeqBlock _),(CtxtParen ((BEGIN | LPAREN | LBRACE | LBRACK | LBRACK_BAR) ,_) :: CtxtSeqBlock _ :: ((CtxtTypeDefns _ | CtxtLetDecl _ | CtxtMemberBody _ | CtxtWithAsLet _) as limitCtxt) :: _) + | (CtxtSeqBlock _),(CtxtParen ((BEGIN | LPAREN | LBRACE | LBRACE_BAR | LBRACK | LBRACK_BAR) ,_) :: CtxtSeqBlock _ :: ((CtxtTypeDefns _ | CtxtLetDecl _ | CtxtMemberBody _ | CtxtWithAsLet _) as limitCtxt) :: _) -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol + 1) // Permitted inner-construct (e.g. "then" block and "else" block in overall @@ -917,10 +917,15 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // fx // fx // f x>x + // f<{| C : int |}>x // fx // fx | DEFAULT | COLON | COLON_GREATER | STRUCT | NULL | DELEGATE | AND | WHEN | DOT_DOT + | NEW + | LBRACE_BAR + | SEMICOLON + | BAR_RBRACE | INFIX_AT_HAT_OP "^" | INFIX_AT_HAT_OP "^-" | INFIX_STAR_DIV_MOD_OP "/" @@ -995,7 +1000,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // WITH balances except in the following contexts.... Phew - an overused keyword! | WITH , ( ((CtxtMatch _ | CtxtException _ | CtxtMemberHead _ | CtxtInterfaceHead _ | CtxtTry _ | CtxtTypeDefns _ | CtxtMemberBody _) :: _) // This is the nasty record/object-expression case - | (CtxtSeqBlock _ :: CtxtParen(LBRACE,_) :: _) ) + | (CtxtSeqBlock _ :: CtxtParen((LBRACE | LBRACE_BAR),_) :: _) ) | FINALLY , (CtxtTry _ :: _) -> true @@ -1166,6 +1171,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | RPAREN | GREATER true | RBRACE + | BAR_RBRACE | RBRACK | BAR_RBRACK | WITH @@ -1204,7 +1210,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, while not offsideStack.IsEmpty && (not(nextOuterMostInterestingContextIsNamespaceOrModule(offsideStack))) && (match offsideStack.Head with // open-parens of sorts - | CtxtParen((LPAREN|LBRACK|LBRACE|LBRACK_BAR),_) -> true + | CtxtParen((LPAREN|LBRACK|LBRACE|LBRACE_BAR|LBRACK_BAR),_) -> true // seq blocks | CtxtSeqBlock _ -> true // vanillas @@ -1297,9 +1303,9 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, hwTokenFetch(useBlockRule) // Balancing rule. Encountering a ')' or '}' balances with a '(' or '{', even if not offside - | ((END | RPAREN | RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ | GREATER true) as t2), (CtxtParen (t1,_) :: _) + | ((END | RPAREN | RBRACE | BAR_RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ | GREATER true) as t2), (CtxtParen (t1,_) :: _) when parenTokensBalance t1 t2 -> - if debug then dprintf "RPAREN/RBRACE/RBRACK/BAR_RBRACK/RQUOTE/END at %a terminates CtxtParen()\n" outputPos tokenStartPos + if debug then dprintf "RPAREN/RBRACE/BAR_RBRACE/RBRACK/BAR_RBRACK/RQUOTE/END at %a terminates CtxtParen()\n" outputPos tokenStartPos popCtxt() // Queue a dummy token at this position to check if any closing rules apply delayToken(tokenTup.UseLocation(ODUMMY(token))) @@ -1792,7 +1798,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // '{ id1 = 1 // M.id2 = ... ' ~~~> CtxtSeqBlock | EQUALS, ((CtxtWithAsLet _) :: _) // This detects 'with = '. - | EQUALS, ((CtxtVanilla (_,true)) :: (CtxtSeqBlock _) :: (CtxtWithAsLet _ | CtxtParen(LBRACE,_)) :: _) -> + | EQUALS, ((CtxtVanilla (_,true)) :: (CtxtSeqBlock _) :: (CtxtWithAsLet _ | CtxtParen((LBRACE | LBRACE_BAR),_)) :: _) -> if debug then dprintf "CtxtLetDecl/CtxtWithAsLet: EQUALS, pushing CtxtSeqBlock\n" // We don't insert begin/end block tokens for single-line bindings since we can't properly distinguish single-line *) // record update expressions such as "{ t with gbuckets=Array.copy t.gbuckets; gcount=t.gcount }" *) @@ -1816,7 +1822,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, returnToken tokenLexbufState token // '(' tokens are balanced with ')' tokens and also introduce a CtxtSeqBlock - | (BEGIN | LPAREN | SIG | LBRACE | LBRACK | LBRACK_BAR | LQUOTE _ | LESS true), _ -> + | (BEGIN | LPAREN | SIG | LBRACE | LBRACE_BAR | LBRACK | LBRACK_BAR | LQUOTE _ | LESS true), _ -> if debug then dprintf "LPAREN etc., pushes CtxtParen, pushing CtxtSeqBlock, tokenStartPos = %a\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtParen (token,tokenStartPos)) pushCtxtSeqBlock(false,NoAddBlockEnd) @@ -1842,7 +1848,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // comprehension/match | (CtxtWhile _ | CtxtFor _ | CtxtWhen _ | CtxtMatchClauses _ | CtxtFun _) :: _ -> true // comprehension - | (CtxtSeqBlock _ :: CtxtParen ((LBRACK | LBRACE | LBRACK_BAR), _) :: _) -> true + | (CtxtSeqBlock _ :: CtxtParen ((LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR), _) :: _) -> true // comprehension | (CtxtSeqBlock _ :: (CtxtDo _ | CtxtWhile _ | CtxtFor _ | CtxtWhen _ | CtxtMatchClauses _ | CtxtTry _ | CtxtThen _ | CtxtElse _) :: _) -> true | _ -> false) -> @@ -1893,7 +1899,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, returnToken tokenLexbufState token | WITH, (((CtxtException _ | CtxtTypeDefns _ | CtxtMemberHead _ | CtxtInterfaceHead _ | CtxtMemberBody _) as limCtxt) :: _) - | WITH, ((CtxtSeqBlock _) as limCtxt :: CtxtParen(LBRACE,_) :: _) -> + | WITH, ((CtxtSeqBlock _) as limCtxt :: CtxtParen((LBRACE | LBRACE_BAR),_) :: _) -> let lookaheadTokenTup = peekNextTokenTup() let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup match lookaheadTokenTup.Token with diff --git a/src/fsharp/NameResolution.fs b/src/fsharp/NameResolution.fs index 28e6830c8eb..0b95e6f72f3 100644 --- a/src/fsharp/NameResolution.fs +++ b/src/fsharp/NameResolution.fs @@ -155,6 +155,9 @@ type Item = /// Represents the resolution of a name to an F# record field. | RecdField of RecdFieldInfo + /// Represents the resolution of a name to a field of an anonymous record type. + | AnonRecdField of AnonRecdTypeInfo * TTypes * int * range + // The following are never in the items table but are valid results of binding // an identifier in different circumstances. @@ -226,6 +229,7 @@ type Item = | Item.UnionCase(uinfo,_) -> DecompileOpName uinfo.UnionCase.DisplayName | Item.ExnCase tcref -> tcref.LogicalName | Item.RecdField rfinfo -> DecompileOpName rfinfo.RecdField.Name + | Item.AnonRecdField (anonInfo, _tys, i, _m) -> anonInfo.SortedNames.[i] | Item.NewDef id -> id.idText | Item.ILField finfo -> finfo.FieldName | Item.Event einfo -> einfo.EventName @@ -1411,6 +1415,8 @@ let ItemsAreEffectivelyEqual g orig other = | (Item.ArgName (id,_, _), ValUse vref) | (ValUse vref, Item.ArgName (id, _, _)) -> ((id.idRange = vref.DefinitionRange || id.idRange = vref.SigRange) && id.idText = vref.DisplayName) + | Item.AnonRecdField(anon1, _, i1, _), Item.AnonRecdField(anon2, _, i2, _) -> Tastops.anonInfoEquiv anon1 anon2 && i1 = i2 + | ILFieldUse f1, ILFieldUse f2 -> ILFieldInfo.ILFieldInfosUseIdenticalDefinitions f1 f2 @@ -1693,6 +1699,7 @@ let CheckAllTyparsInferrable amap m item = | Item.UnionCase _ | Item.ExnCase _ | Item.RecdField _ + | Item.AnonRecdField _ | Item.NewDef _ | Item.ILField _ | Item.Event _ @@ -2054,6 +2061,15 @@ let TryFindUnionCaseOfType g ty nm = | _ -> ValueNone +/// Try to find a union case of a type, with the given name +let TryFindAnonRecdFieldOfType g typ nm = + match tryDestAnonRecdTy g typ with + | ValueSome (anonInfo, tys) -> + match anonInfo.SortedIds |> Array.tryFindIndex (fun x -> x.idText = nm) with + | Some i -> Some (Item.AnonRecdField(anonInfo, tys, i, anonInfo.SortedIds.[i].idRange)) + | None -> None + | ValueNone -> None + let CoreDisplayName(pinfo:PropInfo) = match pinfo with | FSProp(_,_,_,Some set) -> set.CoreDisplayName @@ -2110,8 +2126,16 @@ let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo match unionCaseSearch with | ValueSome ucase -> OneResult (success(resInfo,Item.UnionCase(ucase,false),rest)) - | _ -> - let isLookUpExpr = lookupKind = LookupKind.Expr + | ValueNone -> + let anonRecdSearch = + match lookupKind with + | LookupKind.Expr -> TryFindAnonRecdFieldOfType g ty nm + | _ -> None + match anonRecdSearch with + | Some item -> + OneResult (success(resInfo, item, rest)) + | None -> + 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 @@ -2124,6 +2148,7 @@ let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo 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 @@ -2136,8 +2161,10 @@ let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo | 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 ty @@ -3631,10 +3658,20 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso let nm = h.LogicalName partitionl t (NameMultiMap.add nm h acc) + let anonFields = + if statics then [] + else + match tryDestAnonRecdTy g ty with + | ValueSome (anonInfo, tys) -> + [ for (i,id) in Array.indexed anonInfo.SortedIds do + yield Item.AnonRecdField(anonInfo, tys, i, id.idRange) ] + | _ -> [] + // Build the results ucinfos @ List.map Item.RecdField rfinfos @ pinfoItems @ + anonFields @ List.map Item.ILField finfos @ List.map Item.Event einfos @ List.map (ItemOfTy g) nestedTypes @ @@ -3670,6 +3707,12 @@ let rec ResolvePartialLongIdentInType (ncenv: NameResolver) nenv isApplicableMet |> 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)) @ + (if statics then [] + else + match TryFindAnonRecdFieldOfType g ty id with + | Some (Item.AnonRecdField(_anonInfo, tys, i, _)) -> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest tys.[i] + | _ -> []) @ + // e.g. .. (ncenv.InfoReader.GetEventInfosOfType(Some id,ad,m,ty) |> List.collect (PropTypOfEventInfo ncenv.InfoReader m ad >> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) @ @@ -4166,6 +4209,13 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics ty ( if statics then yield! ty |> GetNestedTypesOfType (ad, ncenv, None, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) |> List.map (ItemOfTy g) | _ -> + if not statics then + match tryDestAnonRecdTy g ty with + | ValueSome (anonInfo, tys) -> + for (i,id) in Array.indexed anonInfo.SortedIds do + yield Item.AnonRecdField(anonInfo, tys, i, id.idRange) + | _ -> () + let pinfosIncludingUnseen = AllPropInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m ty |> List.filter (fun x -> @@ -4342,6 +4392,12 @@ let rec ResolvePartialLongIdentInTypeForItem (ncenv: NameResolver) nenv m ad sta for pinfo in pinfos do yield! (fullTypeOfPinfo pinfo) |> ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item + match TryFindAnonRecdFieldOfType g ty id with + | Some (Item.AnonRecdField(_anonInfo, tys, i, _)) -> + let tyinfo = tys.[i] + yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item tyinfo + | _ -> () + // e.g. .. for einfo in ncenv.InfoReader.GetEventInfosOfType(Some id, ad, m, ty) do let tyinfo = PropTypOfEventInfo ncenv.InfoReader m ad einfo diff --git a/src/fsharp/NameResolution.fsi b/src/fsharp/NameResolution.fsi index f381d1088dc..178d6a8e3cc 100755 --- a/src/fsharp/NameResolution.fsi +++ b/src/fsharp/NameResolution.fsi @@ -64,6 +64,9 @@ type Item = /// Represents the resolution of a name to an F# record field. | RecdField of RecdFieldInfo + /// Represents the resolution of a name to a field of an anonymous record type. + | AnonRecdField of AnonRecdTypeInfo * TTypes * int * range + // The following are never in the items table but are valid results of binding // an identifier in different circumstances. @@ -166,6 +169,9 @@ type FullyQualifiedFlag = [] type BulkAdd = Yes | No +/// Find a field in anonymous record type +val internal TryFindAnonRecdFieldOfType : TcGlobals -> TType -> string -> Item option + /// Add extra items to the environment for Visual Studio, e.g. static members val internal AddFakeNamedValRefToNameEnv : string -> NameResolutionEnv -> ValRef -> NameResolutionEnv diff --git a/src/fsharp/NicePrint.fs b/src/fsharp/NicePrint.fs index ef865b0afa3..142ccbae076 100755 --- a/src/fsharp/NicePrint.fs +++ b/src/fsharp/NicePrint.fs @@ -33,6 +33,7 @@ module internal PrintUtilities = let squareAngleL x = LeftL.leftBracketAngle ^^ x ^^ RightL.rightBracketAngle let angleL x = sepL Literals.leftAngle ^^ x ^^ rightL Literals.rightAngle let braceL x = leftL Literals.leftBrace ^^ x ^^ rightL Literals.rightBrace + let braceBarL x = leftL Literals.leftBraceBar ^^ x ^^ rightL Literals.rightBraceBar let comment str = wordL (tagText (sprintf "(* %s *)" str)) @@ -934,6 +935,14 @@ module private PrintTypes = | TType_ucase (UCRef(tc,_),args) -> layoutTypeAppWithInfoAndPrec denv env (layoutTyconRef denv tc) prec tc.IsPrefixDisplay args + // Layout a tuple type + | TType_anon (anonInfo,tys) -> + let core = sepListL (wordL (tagPunctuation ";")) (List.map2 (fun nm ty -> wordL (tagField nm) ^^ wordL (tagPunctuation ":") ^^ layoutTypeWithInfoAndPrec denv env prec ty) (Array.toList anonInfo.SortedNames) tys) + if evalAnonInfoIsStruct anonInfo then + WordL.keywordStruct --- braceBarL core + else + braceBarL core + // Layout a tuple type | TType_tuple (tupInfo,t) -> if evalTupInfoIsStruct tupInfo then diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 043e9e4747f..599392383d7 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -157,17 +157,20 @@ let braceL x = leftL (tagText "{") ^^ x ^^ rightL (tagText "}") let seqL xL xs = Seq.fold (fun z x -> z @@ xL x) emptyL xs let namemapL xL xmap = NameMap.foldBack (fun nm x z -> xL nm x @@ z) xmap emptyL -let rec exprValueInfoL g = function - | ConstValue (x, ty) -> NicePrint.layoutConst g ty x - | UnknownValue -> wordL (tagText "?") - | SizeValue (_, vinfo) -> exprValueInfoL g vinfo - | ValValue (vr, vinfo) -> bracketL ((valRefL vr ^^ wordL (tagText "alias")) --- exprValueInfoL g vinfo) - | TupleValue vinfos -> bracketL (exprValueInfosL g vinfos) - | RecdValue (_, vinfos) -> braceL (exprValueInfosL g vinfos) - | UnionCaseValue (ucr, vinfos) -> unionCaseRefL ucr ^^ bracketL (exprValueInfosL g vinfos) - | CurriedLambdaValue(_lambdaId, _arities, _bsize, expr', _ety) -> wordL (tagText "lam") ++ exprL expr' (* (sprintf "lam(size=%d)" bsize) *) - | ConstExprValue (_size, x) -> exprL x +let rec exprValueInfoL g exprVal = + match exprVal with + | ConstValue (x, ty) -> NicePrint.layoutConst g ty x + | UnknownValue -> wordL (tagText "?") + | SizeValue (_, vinfo) -> exprValueInfoL g vinfo + | ValValue (vr, vinfo) -> bracketL ((valRefL vr ^^ wordL (tagText "alias")) --- exprValueInfoL g vinfo) + | TupleValue vinfos -> bracketL (exprValueInfosL g vinfos) + | RecdValue (_, vinfos) -> braceL (exprValueInfosL g vinfos) + | UnionCaseValue (ucr, vinfos) -> unionCaseRefL ucr ^^ bracketL (exprValueInfosL g vinfos) + | CurriedLambdaValue(_lambdaId, _arities, _bsize, expr', _ety) -> wordL (tagText "lam") ++ exprL expr' (* (sprintf "lam(size=%d)" bsize) *) + | ConstExprValue (_size, x) -> exprL x + and exprValueInfosL g vinfos = commaListL (List.map (exprValueInfoL g) (Array.toList vinfos)) + and moduleInfoL g (x:LazyModuleInfo) = let x = x.Force() braceL ((wordL (tagText "Modules: ") @@ (x.ModuleOrNamespaceInfos |> namemapL (fun nm x -> wordL (tagText nm) ^^ moduleInfoL g x) ) ) @@ -1277,6 +1280,7 @@ and BindingHasEffect g bind = bind.Expr |> ExprHasEffect g and OpHasEffect g m op = match op with | TOp.Tuple _ -> false + | TOp.AnonRecd _ -> false | TOp.Recd (ctor, tcref) -> match ctor with | RecdExprIsObjInit -> true @@ -1291,7 +1295,8 @@ and OpHasEffect g m op = | 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.AnonRecdGet _ -> true // conservative + | 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 @@ -1966,7 +1971,12 @@ and OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu = | TOp.Tuple tupInfo -> let isStruct = evalTupInfoIsStruct tupInfo if isStruct then 0, valu - else 1, MakeValueInfoForTuple (Array.ofList argValues) + else 1,MakeValueInfoForTuple (Array.ofList argValues) + | TOp.AnonRecd anonInfo -> + let isStruct = evalAnonInfoIsStruct anonInfo + if isStruct then 0, valu + else 1, valu + | TOp.AnonRecdGet _ | TOp.ValFieldGet _ | TOp.TupleFieldGet _ | TOp.UnionCaseFieldGet _ @@ -3269,7 +3279,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, mexpr, hasExplicitEntryPoint, isScript)) = +and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile(qname, pragmas, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = let env, mexpr', minfo = match mexpr with // FSI: FSI compiles everything as if you're typing incrementally into one module @@ -3288,7 +3298,7 @@ and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile(qn let hidden = ComputeHidingInfoAtAssemblyBoundary mexpr.Type hidden let minfo = AbstractLazyModulInfoByHiding true hidden minfo - env, TImplFile(qname, pragmas, mexpr', hasExplicitEntryPoint, isScript), minfo, hidden + env, TImplFile(qname, pragmas, mexpr', hasExplicitEntryPoint, isScript, anonRecdTypes), minfo, hidden //------------------------------------------------------------------------- // Entry point diff --git a/src/fsharp/PostInferenceChecks.fs b/src/fsharp/PostInferenceChecks.fs index 5e2755dcaac..edd5f8ce1dd 100644 --- a/src/fsharp/PostInferenceChecks.fs +++ b/src/fsharp/PostInferenceChecks.fs @@ -198,6 +198,7 @@ type cenv = { boundVals: Dictionary // really a hash set limitVals: Dictionary mutable potentialUnboundUsesOfVals: StampMap + mutable anonRecdTypes: StampMap g: TcGlobals amap: Import.ImportMap /// For reading metadata @@ -301,7 +302,7 @@ let BindVals cenv env vs = List.iter (BindVal cenv env) vs // approx walk of type //-------------------------------------------------------------------------- -let rec CheckTypeDeep ((visitTy,visitTyconRefOpt,visitAppTyOpt,visitTraitSolutionOpt, visitTyarOpt) as f) g env isInner ty = +let rec CheckTypeDeep (cenv: cenv) ((visitTy,visitTyconRefOpt,visitAppTyOpt,visitTraitSolutionOpt, visitTyparOpt) 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 @@ -326,40 +327,44 @@ let rec CheckTypeDeep ((visitTy,visitTyconRefOpt,visitAppTyOpt,visitTraitSolutio match ty with | TType_forall (tps,body) -> let env = BindTypars g env tps - CheckTypeDeep f g env isInner body - tps |> List.iter (fun tp -> tp.Constraints |> List.iter (CheckTypeConstraintDeep f g env)) + CheckTypeDeep cenv f g env isInner body + tps |> List.iter (fun tp -> tp.Constraints |> List.iter (CheckTypeConstraintDeep cenv f g env)) | TType_measure _ -> () | TType_app (tcref,tinst) -> match visitTyconRefOpt with | Some visitTyconRef -> visitTyconRef isInner tcref | None -> () - CheckTypesDeep f g env tinst + CheckTypesDeep cenv f g env tinst match visitAppTyOpt with | Some visitAppTy -> visitAppTy (tcref, tinst) | None -> () - - | TType_ucase (_,tinst) -> CheckTypesDeep f g env tinst - | 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_anon (anonInfo,tys) -> + if not (cenv.anonRecdTypes.ContainsKey anonInfo.Stamp) then + cenv.anonRecdTypes <- cenv.anonRecdTypes.Add(anonInfo.Stamp, anonInfo) + CheckTypesDeep cenv f g env tys + + | TType_ucase (_,tinst) -> CheckTypesDeep cenv f g env tinst + | TType_tuple (_,tys) -> CheckTypesDeep cenv f g env tys + | TType_fun (s,t) -> CheckTypeDeep cenv f g env true s; CheckTypeDeep cenv f g env true t | TType_var tp -> if not tp.IsSolved then - match visitTyarOpt with + match visitTyparOpt with | None -> () | Some visitTyar -> visitTyar (env,tp) -and CheckTypesDeep f g env tys = - tys |> List.iter (CheckTypeDeep f g env true) +and CheckTypesDeep cenv f g env tys = + tys |> List.iter (CheckTypeDeep cenv f g env true) -and CheckTypeConstraintDeep f g env x = +and CheckTypeConstraintDeep cenv f g env x = match x with - | TyparConstraint.CoercesTo(ty,_) -> CheckTypeDeep f g env true ty - | TyparConstraint.MayResolveMember(traitInfo,_) -> CheckTraitInfoDeep f g env traitInfo - | TyparConstraint.DefaultsTo(_,ty,_) -> CheckTypeDeep f g env true ty - | TyparConstraint.SimpleChoice(tys,_) -> CheckTypesDeep f g env tys - | 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.CoercesTo(ty,_) -> CheckTypeDeep cenv f g env true ty + | TyparConstraint.MayResolveMember(traitInfo,_) -> CheckTraitInfoDeep cenv f g env traitInfo + | TyparConstraint.DefaultsTo(_,ty,_) -> CheckTypeDeep cenv f g env true ty + | TyparConstraint.SimpleChoice(tys,_) -> CheckTypesDeep cenv f g env tys + | TyparConstraint.IsEnum(uty,_) -> CheckTypeDeep cenv f g env true uty + | TyparConstraint.IsDelegate(aty,bty,_) -> CheckTypeDeep cenv f g env true aty; CheckTypeDeep cenv f g env true bty | TyparConstraint.SupportsComparison _ | TyparConstraint.SupportsEquality _ | TyparConstraint.SupportsNull _ @@ -368,21 +373,21 @@ and CheckTypeConstraintDeep f g env x = | TyparConstraint.IsReferenceType _ | TyparConstraint.RequiresDefaultConstructor _ -> () -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 true ) rty +and CheckTraitInfoDeep cenv ((_,_,_,visitTraitSolutionOpt,_) as f) g env (TTrait(tys,_,_,argtys,rty,soln)) = + CheckTypesDeep cenv f g env tys + CheckTypesDeep cenv f g env argtys + Option.iter (CheckTypeDeep cenv f g env true ) rty match visitTraitSolutionOpt, !soln with | Some visitTraitSolution, Some sln -> visitTraitSolution sln | _ -> () /// 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 + CheckTypeDeep cenv (ignore, Some (fun _deep tcref -> if isByrefLikeTyconRef cenv.g m tcref then check()), None, None, None) cenv.g env false ty /// 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 + CheckTypeDeep cenv (ignore, Some (fun _deep tcref -> if isByrefTyconRef cenv.g tcref then check()), None, None, None) cenv.g env false ty /// check captures under lambdas /// @@ -440,7 +445,7 @@ let AccessInternalsVisibleToAsInternal thisCompPath internalsVisibleToPaths acce let CheckTypeForAccess (cenv:cenv) env objName valAcc m ty = if cenv.reportErrors then - let visitTye ty = + let visitType 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 @@ -451,12 +456,12 @@ let CheckTypeForAccess (cenv:cenv) env objName valAcc m ty = if isLessAccessible tyconAcc valAcc then errorR(Error(FSComp.SR.chkTypeLessAccessibleThanType(tcref.DisplayName, (objName())), m)) - CheckTypeDeep (visitTye, None, None, None, None) cenv.g env false ty + CheckTypeDeep cenv (visitType, None, None, None, None) cenv.g env false ty let WarnOnWrongTypeForAccess (cenv:cenv) env objName valAcc m ty = if cenv.reportErrors then - let visitTye ty = + let visitType 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 @@ -469,7 +474,7 @@ let WarnOnWrongTypeForAccess (cenv:cenv) env objName valAcc m ty = let warningText = errorText + System.Environment.NewLine + FSComp.SR.tcTypeAbbreviationsCheckedAtCompileTime() warning(AttributeChecking.ObsoleteWarning(warningText, m)) - CheckTypeDeep (visitTye, None, None, None, None) cenv.g env false ty + CheckTypeDeep cenv (visitType, None, None, None, None) cenv.g env false ty /// Indicates whether a byref or byref-like type is permitted at a particular location [] @@ -576,13 +581,13 @@ let CheckType permitByRefLike (cenv:cenv) env m ty = // check if T contains byref types in case of byref let visitAppTy (tcref,tinst) = if isByrefLikeTyconRef cenv.g m tcref then - let visitTye ty0 = + let visitType ty0 = match tryDestAppTy cenv.g ty0 with | ValueNone -> () | ValueSome tcref2 -> if isByrefTyconRef cenv.g tcref2 then errorR(Error(FSComp.SR.chkNoByrefsOfByrefs(NicePrint.minimalStringOfType cenv.denv ty), m)) - CheckTypesDeep (visitTye, None, None, None, None) cenv.g env tinst + CheckTypesDeep cenv (visitType, None, None, None, None) cenv.g env tinst let visitTraitSolution info = match info with @@ -593,7 +598,7 @@ let CheckType permitByRefLike (cenv:cenv) env m ty = cenv.potentialUnboundUsesOfVals <- cenv.potentialUnboundUsesOfVals.Add(vref.Stamp,m) | _ -> () - CheckTypeDeep (ignore, Some visitTyconRef, Some visitAppTy, Some visitTraitSolution, Some visitTyar) cenv.g env false ty + CheckTypeDeep cenv (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. @@ -1176,6 +1181,7 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = errorR(Error(FSComp.SR.chkNoWriteToLimitedSpan(vref.DisplayName), m)) NoLimit + | TOp.AnonRecdGet _,_,[arg1] | TOp.TupleFieldGet _,_,[arg1] -> CheckTypeInstNoByrefs cenv env m tyargs CheckExprsPermitByRefLike cenv env [arg1] (* Compiled pattern matches on immutable value structs come through here. *) @@ -2074,14 +2080,14 @@ let CheckEntityDefn cenv env (tycon:Entity) = // Access checks let access = AdjustAccess (IsHiddenTycon env.sigToImplRemapInfo tycon) (fun () -> tycon.CompilationPath) tycon.Accessibility - let visitTye ty = CheckTypeForAccess cenv env (fun () -> tycon.DisplayNameWithStaticParametersAndUnderscoreTypars) access tycon.Range ty + let visitType ty = CheckTypeForAccess cenv env (fun () -> tycon.DisplayNameWithStaticParametersAndUnderscoreTypars) access tycon.Range ty - abstractSlotValsOfTycons [tycon] |> List.iter (typeOfVal >> visitTye) + abstractSlotValsOfTycons [tycon] |> List.iter (typeOfVal >> visitType) - superOfTycon g tycon |> visitTye + superOfTycon g tycon |> visitType // We do not have to check access of interface implementations. See FSharp 1.0 5042 - //implements_of_tycon g tycon |> List.iter visitTye + //implements_of_tycon g tycon |> List.iter visitType if tycon.IsFSharpDelegateTycon then match tycon.TypeReprInfo with | TFSharpObjectRepr r -> @@ -2089,8 +2095,8 @@ let CheckEntityDefn cenv env (tycon:Entity) = | TTyconDelegate ss -> //ss.ClassTypars //ss.MethodTypars - ss.FormalReturnType |> Option.iter visitTye - ss.FormalParams |> List.iterSquared (fun (TSlotParam(_,ty,_,_,_,_)) -> visitTye ty) + ss.FormalReturnType |> Option.iter visitType + ss.FormalParams |> List.iterSquared (fun (TSlotParam(_,ty,_,_,_,_)) -> visitType ty) | _ -> () | _ -> () @@ -2100,7 +2106,7 @@ let CheckEntityDefn cenv env (tycon:Entity) = |> List.filter (isInterfaceTy g) if tycon.IsFSharpInterfaceTycon then - List.iter visitTye interfaces // Check inherited interface is as accessible + List.iter visitType interfaces // Check inherited interface is as accessible if not (isRecdOrStructTyconRefAssumedImmutable g tcref) && isRecdOrStructTyconRefReadOnly g m tcref then errorR(Error(FSComp.SR.readOnlyAttributeOnStructWithMutableField(),m)) @@ -2187,6 +2193,7 @@ let CheckTopImpl (g,amap,reportErrors,infoReader,internalsVisibleToPaths,viewCcu boundVals= new Dictionary<_,_>(100, HashIdentity.Structural) limitVals= new Dictionary<_,_>(100, HashIdentity.Structural) potentialUnboundUsesOfVals=Map.empty + anonRecdTypes = StampMap.Empty usesQuotations=false infoReader=infoReader internalsVisibleToPaths=internalsVisibleToPaths @@ -2223,4 +2230,4 @@ let CheckTopImpl (g,amap,reportErrors,infoReader,internalsVisibleToPaths,viewCcu CheckAttribs cenv env extraAttribs if cenv.usesQuotations && QuotationTranslator.QuotationGenerationScope.ComputeQuotationFormat(g) = QuotationTranslator.QuotationSerializationFormat.FSharp_20_Plus then viewCcu.UsesFSharp20PlusQuotations <- true - cenv.entryPointGiven + cenv.entryPointGiven, cenv.anonRecdTypes diff --git a/src/fsharp/PostInferenceChecks.fsi b/src/fsharp/PostInferenceChecks.fsi index 970c1431551..62ad52d4495 100644 --- a/src/fsharp/PostInferenceChecks.fsi +++ b/src/fsharp/PostInferenceChecks.fsi @@ -11,4 +11,6 @@ open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.TcGlobals val testFlagMemberBody : bool ref -val CheckTopImpl : TcGlobals * ImportMap * bool * InfoReader * CompilationPath list * CcuThunk * DisplayEnv * ModuleOrNamespaceExprWithSig * Attribs * (bool * bool) * isInternalTestSpanStackReferring: bool -> bool + +/// Perform the checks on the TAST for a file after type inference is complete. +val CheckTopImpl : TcGlobals * ImportMap * bool * InfoReader * CompilationPath list * CcuThunk * DisplayEnv * ModuleOrNamespaceExprWithSig * Attribs * (bool * bool) * isInternalTestSpanStackReferring: bool -> bool * StampMap diff --git a/src/fsharp/QuotationTranslator.fs b/src/fsharp/QuotationTranslator.fs index d37be61d8d8..99fdf6c751a 100644 --- a/src/fsharp/QuotationTranslator.fs +++ b/src/fsharp/QuotationTranslator.fs @@ -424,6 +424,20 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. let argsR = ConvExprs cenv env args QP.mkRecdMk(rgtypR,tyargsR,argsR) + | TOp.AnonRecd anonInfo, _, _ -> + let tref = anonInfo.ILTypeRef + let rgtypR = ConvILTypeRef cenv tref + let tyargsR = ConvTypes cenv env m tyargs + let argsR = ConvExprs cenv env args + QP.mkRecdMk(rgtypR,tyargsR,argsR) + + | TOp.AnonRecdGet (anonInfo, n), _, _ -> + let tref = anonInfo.ILTypeRef + let rgtypR = ConvILTypeRef cenv tref + let tyargsR = ConvTypes cenv env m tyargs + let argsR = ConvExprs cenv env args + QP.mkRecdGet((rgtypR,anonInfo.SortedNames.[n]),tyargsR,argsR) + | TOp.UnionCaseFieldGet (ucref,n),tyargs,[e] -> ConvUnionFieldGet cenv env m ucref n tyargs e @@ -807,6 +821,10 @@ and ConvType cenv env m ty = | TType_fun(a,b) -> QP.mkFunTy(ConvType cenv env m a,ConvType cenv env m b) | TType_tuple(tupInfo,l) -> ConvType cenv env m (mkCompiledTupleTy cenv.g (evalTupInfoIsStruct tupInfo) l) + | TType_anon(anonInfo,tinst) -> + let tref = anonInfo.ILTypeRef + let tinstR = ConvTypes cenv env m tinst + QP.mkILNamedTy(ConvILTypeRefUnadjusted cenv m tref, tinstR) | TType_var(tp) -> QP.mkVarTy(ConvTyparRef cenv env m tp) | TType_forall(_spec,_ty) -> wfail(Error(FSComp.SR.crefNoInnerGenericsInQuotations(),m)) | _ -> wfail(Error (FSComp.SR.crefQuotationsCantContainThisType(),m)) diff --git a/src/fsharp/TastOps.fs b/src/fsharp/TastOps.fs index cfbb8e195ed..dfebdb9bae0 100644 --- a/src/fsharp/TastOps.fs +++ b/src/fsharp/TastOps.fs @@ -181,6 +181,12 @@ let rec remapTypeAux (tyenv : Remap) (ty:TType) = | Some tcr' -> TType_ucase (UCRef(tcr', n), remapTypesAux tyenv tinst) | None -> TType_ucase (UCRef(tcr, n), remapTypesAux tyenv tinst) + | TType_anon (anonInfo, l) as ty -> + let tupInfo' = remapTupInfoAux tyenv anonInfo.TupInfo + let l' = remapTypesAux tyenv l + if anonInfo.TupInfo === tupInfo' && l === l' then ty else + TType_anon (AnonRecdTypeInfo.Create(anonInfo.Assembly, tupInfo', anonInfo.SortedIds), l') + | TType_tuple (tupInfo, l) as ty -> let tupInfo' = remapTupInfoAux tyenv tupInfo let l' = remapTypesAux tyenv l @@ -263,6 +269,8 @@ and remapTraitAux tyenv (TTrait(tys, nm, mf, argtys, rty, slnCell)) = FSMethSln(remapTypeAux tyenv ty, remapValRef tyenv vref, remapTypesAux tyenv minst) | FSRecdFieldSln(tinst, rfref, isSet) -> FSRecdFieldSln(remapTypesAux tyenv tinst, remapRecdFieldRef tyenv.tyconRefRemap rfref, isSet) + | FSAnonRecdFieldSln(anonInfo, tinst, n) -> + FSAnonRecdFieldSln(anonInfo, remapTypesAux tyenv tinst, n) | BuiltInSln -> BuiltInSln | ClosedExprSln e -> @@ -667,7 +675,7 @@ let mkOuterCompiledTupleTy g isStruct tupElemTys = let marker = TType_app (mkCompiledTupleTyconRef g isStruct 1, [tyB]) TType_app (tcref, tysA@[marker]) | _ -> - TType_app (tcref, tysA@[TType_tuple (TupInfo.Const isStruct, tysB)]) + TType_app (tcref, tysA@[TType_tuple (mkTupInfo isStruct, tysB)]) //--------------------------------------------------------------------------- // Remove inference equations and abbreviations from types @@ -733,6 +741,9 @@ let evalTupInfoIsStruct aexpr = match aexpr with | TupInfo.Const b -> b +let evalAnonInfoIsStruct (anonInfo: AnonRecdTypeInfo) = + evalTupInfoIsStruct anonInfo.TupInfo + /// This erases outermost occurrences of inference equations, type abbreviations, non-generated provided types /// and measureable types (float<_>). /// It also optionally erases all "compilation representations", i.e. function and @@ -783,6 +794,8 @@ let isForallTy g ty = ty |> stripTyEqns g |> (function TType_forall _ -> tru let isAnyTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple _ -> true | _ -> false) let isRefTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, _) -> not (evalTupInfoIsStruct tupInfo) | _ -> false) let isStructTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, _) -> evalTupInfoIsStruct tupInfo | _ -> false) +let isAnonRecdTy g ty = ty |> stripTyEqns g |> (function TType_anon _ -> true | _ -> false) +let isStructAnonRecdTy g ty = ty |> stripTyEqns g |> (function TType_anon (anonInfo, _) -> evalAnonInfoIsStruct anonInfo | _ -> false) let isUnionTy g ty = ty |> stripTyEqns g |> (function TType_app(tcr, _) -> tcr.IsUnionTycon | _ -> false) let isReprHiddenTy g ty = ty |> stripTyEqns g |> (function TType_app(tcr, _) -> tcr.IsHiddenReprTycon | _ -> false) let isFSharpObjModelTy g ty = ty |> stripTyEqns g |> (function TType_app(tcr, _) -> tcr.IsFSharpObjectModelTycon | _ -> false) @@ -806,6 +819,7 @@ let argsOfAppTy g ty = ty |> stripTyEqns g |> (function TType_app(_, tinst) -> 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 tryDestAnonRecdTy g ty = ty |> stripTyEqns g |> (function TType_anon (anonInfo, tys) -> ValueSome (anonInfo, tys) | _ -> 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) @@ -966,6 +980,9 @@ and typeAEquivAux erasureFlag g aenv ty1 ty2 = typesAEquivAux erasureFlag g aenv b1 b2 | TType_tuple (s1, l1), TType_tuple (s2, l2) -> structnessAEquiv s1 s2 && typesAEquivAux erasureFlag g aenv l1 l2 + | TType_anon (anonInfo1, l1), TType_anon (anonInfo2, l2) -> + anonInfoEquiv anonInfo1 anonInfo2 && + typesAEquivAux erasureFlag g aenv l1 l2 | TType_fun (dtys1, rty1), TType_fun (dtys2, rty2) -> typeAEquivAux erasureFlag g aenv dtys1 dtys2 && typeAEquivAux erasureFlag g aenv rty1 rty2 | TType_measure m1, TType_measure m2 -> @@ -974,6 +991,12 @@ and typeAEquivAux erasureFlag g aenv ty1 ty2 = | _ -> true | _ -> false + +and anonInfoEquiv (anonInfo1: AnonRecdTypeInfo) (anonInfo2: AnonRecdTypeInfo) = + ccuEq anonInfo1.Assembly anonInfo2.Assembly && + structnessAEquiv anonInfo1.TupInfo anonInfo2.TupInfo && + anonInfo1.SortedNames = anonInfo2.SortedNames + and structnessAEquiv un1 un2 = match un1, un2 with | TupInfo.Const b1, TupInfo.Const b2 -> (b1 = b2) @@ -1020,7 +1043,7 @@ let rec getErasedTypes g ty = getErasedTypes g rty | TType_var tp -> if tp.IsErased then [ty] else [] - | TType_app (_, b) | TType_ucase(_, b) | TType_tuple (_, b) -> + | TType_app (_, b) | TType_ucase(_, b) | TType_anon (_, b) | TType_tuple (_, b) -> List.foldBack (fun ty tys -> getErasedTypes g ty @ tys) b [] | TType_fun (dty, rty) -> getErasedTypes g dty @ getErasedTypes g rty @@ -1279,6 +1302,7 @@ let mkAsmExpr(code, tinst, args, rettys, m) = Expr.Op (TOp.ILAsm let mkUnionCaseExpr(uc, tinst, args, m) = Expr.Op (TOp.UnionCase uc, tinst, args, m) let mkExnExpr(uc, args, m) = Expr.Op (TOp.ExnConstr uc, [], args, m) let mkTupleFieldGetViaExprAddr(tupInfo, e, tinst, i, m) = Expr.Op (TOp.TupleFieldGet(tupInfo, i), tinst, [e], m) +let mkAnonRecdFieldGetViaExprAddr(anonInfo, e, tinst, i, m) = Expr.Op (TOp.AnonRecdGet(anonInfo, i), tinst, [e], m) let mkRecdFieldGetViaExprAddr(e, fref, tinst, m) = Expr.Op (TOp.ValFieldGet(fref), tinst, [e], m) let mkRecdFieldGetAddrViaExprAddr(readonly, e, fref, tinst, m) = Expr.Op (TOp.ValFieldGetAddr(fref, readonly), tinst, [e], m) @@ -1736,7 +1760,8 @@ let isStructTy g ty = | ValueSome tcref -> let tycon = tcref.Deref tycon.IsStructRecordOrUnionTycon || tycon.IsStructOrEnumTycon - | _ -> isStructTupleTy g ty + | _ -> + isStructAnonRecdTy g ty || isStructTupleTy g ty let isRefTy g ty = not (isStructOrEnumTyconTy g ty) && @@ -2018,6 +2043,8 @@ and accFreeInTraitSln opts sln acc = accFreeInType opts ty (accFreeValRefInTraitSln opts vref (accFreeInTypes opts minst acc)) + | FSAnonRecdFieldSln(_anonInfo, tinst, _n) -> + accFreeInTypes opts tinst acc | FSRecdFieldSln(tinst, _rfref, _isSet) -> accFreeInTypes opts tinst acc | BuiltInSln -> acc @@ -2044,6 +2071,7 @@ and accFreeTyparRef opts (tp:Typar) acc = and accFreeInType opts ty acc = match stripTyparEqns ty with | TType_tuple (tupInfo, l) -> accFreeInTypes opts l (accFreeInTupInfo opts tupInfo acc) + | TType_anon (anonInfo, l) -> accFreeInTypes opts l (accFreeInTupInfo opts anonInfo.TupInfo acc) | TType_app (tc, tinst) -> let acc = accFreeTycon opts tc acc match tinst with @@ -2133,6 +2161,9 @@ and accFreeTyparRefLeftToRight g cxFlag thruFlag acc (tp:Typar) = and accFreeInTypeLeftToRight g cxFlag thruFlag acc ty = if verbose then dprintf "--> accFreeInTypeLeftToRight \n" match (if thruFlag then stripTyEqns g ty else stripTyparEqns ty) with + | TType_anon (anonInfo, l) -> + let acc = accFreeInTupInfoLeftToRight g cxFlag thruFlag acc anonInfo.TupInfo + accFreeInTypesLeftToRight g cxFlag thruFlag acc l | TType_tuple (tupInfo, l) -> let acc = accFreeInTupInfoLeftToRight g cxFlag thruFlag acc tupInfo accFreeInTypesLeftToRight g cxFlag thruFlag acc l @@ -2525,8 +2556,9 @@ module SimplifyTypes = 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_app (_, tys) + | TType_ucase (_, tys) + | TType_anon (_, tys) | TType_tuple (_, tys) -> List.fold (foldTypeButNotConstraints f) z tys | TType_fun (s, t) -> foldTypeButNotConstraints f (foldTypeButNotConstraints f z s) t | TType_var _ -> z @@ -3149,6 +3181,7 @@ module DebugPrint = begin let squareAngleL x = LeftL.leftBracketAngle ^^ x ^^ RightL.rightBracketAngle let angleL x = sepL Literals.leftAngle ^^ x ^^ rightL Literals.rightAngle let braceL x = leftL Literals.leftBrace ^^ x ^^ rightL Literals.rightBrace + let braceBarL x = leftL Literals.leftBraceBar ^^ x ^^ rightL Literals.rightBraceBar let boolL = function true -> WordL.keywordTrue | false -> WordL.keywordFalse let intL (n:int) = wordL (tagNumericLiteral (string n )) @@ -3210,6 +3243,7 @@ module DebugPrint = begin let prefix = tcref.IsPrefixDisplay let tcL = layoutTyconRef tcref auxTyparsL env tcL prefix tinst + | TType_anon (anonInfo, tys) -> braceBarL (sepListL (wordL (tagText ";")) (List.map2 (fun nm ty -> wordL (tagField nm) --- auxTypeAtomL env ty) (Array.toList anonInfo.SortedNames) tys)) | 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 @@ -3715,8 +3749,8 @@ module DebugPrint = begin let z = z --- sepL(tagText "`") --- (spaceListL (List.map atomL args)) z - and implFileL (TImplFile(_, _, e, _, _)) = - aboveListL [(wordL(tagText "top implementation ")) @@-- mexprL e] + and implFileL (TImplFile(_, _, mexpr, _, _, _)) = + aboveListL [(wordL(tagText "top implementation ")) @@-- mexprL mexpr] and mexprL x = match x with @@ -3807,7 +3841,7 @@ let wrapModuleOrNamespaceExprInNamespace (id :Ident) cpath mexpr = TMDefRec (false, [], [ModuleOrNamespaceBinding.Module(mspec, mexpr)], id.idRange) // cleanup: make this a property -let SigTypeOfImplFile (TImplFile(_, _, mexpr, _, _)) = mexpr.Type +let SigTypeOfImplFile (TImplFile(_, _, mexpr, _, _, _)) = mexpr.Type //-------------------------------------------------------------------------- @@ -4411,7 +4445,9 @@ and accFreeInOp opts op acc = | TOp.Goto _ | TOp.Label _ | TOp.Return | TOp.TupleFieldGet _ -> acc - | TOp.Tuple tupInfo -> accFreeTyvars opts accFreeInTupInfo tupInfo acc + | TOp.Tuple tupInfo -> accFreeTyvars opts accFreeInTupInfo tupInfo acc + | TOp.AnonRecd anonInfo + | TOp.AnonRecdGet (anonInfo, _) -> accFreeTyvars opts accFreeInTupInfo anonInfo.TupInfo acc | TOp.UnionCaseTagGet tr -> accUsedRecdOrUnionTyconRepr opts tr.Deref acc @@ -5388,6 +5424,9 @@ let mkAnyTupledTy (g:TcGlobals) tupInfo tys = | [h] -> h | _ -> TType_tuple(tupInfo, tys) +let mkAnyAnonRecdTy (_g:TcGlobals) anonInfo tys = + TType_anon(anonInfo, tys) + let mkRefTupledTy g tys = mkAnyTupledTy g tupInfoRef tys let mkRefTupledVarsTy g vs = mkRefTupledTy g (typesOfVals vs) @@ -5426,8 +5465,10 @@ let rec tyOfExpr g e = | TOp.ExnConstr _ -> g.exn_ty | TOp.Bytes _ -> mkByteArrayTy g | TOp.UInt16s _ -> mkArrayType g g.uint16_ty + | TOp.AnonRecdGet(_, i) -> List.item i tinst | TOp.TupleFieldGet(_, i) -> List.item i tinst | TOp.Tuple tupInfo -> mkAnyTupledTy g tupInfo tinst + | TOp.AnonRecd anonInfo -> mkAnyAnonRecdTy g anonInfo tinst | (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") @@ -5901,6 +5942,10 @@ let mkTupleFieldGet g (tupInfo, e, tinst, i, m) = let wrap, e', _readonly, _writeonly = mkExprAddrOfExpr g (evalTupInfoIsStruct tupInfo) false NeverMutates e None m wrap (mkTupleFieldGetViaExprAddr(tupInfo, e', tinst, i, m)) +let mkAnonRecdFieldGet g (anonInfo:AnonRecdTypeInfo, e, tinst, i, m) = + let wrap, e', _readonly, _writeonly = mkExprAddrOfExpr g (evalAnonInfoIsStruct anonInfo) false NeverMutates e None m + wrap (mkAnonRecdFieldGetViaExprAddr(anonInfo, e', tinst, i, m)) + let mkRecdFieldGet g (e, fref:RecdFieldRef, tinst, m) = assert (not (isByrefTy g (tyOfExpr g e))) let wrap, e', _readonly, _writeonly = mkExprAddrOfExpr g fref.Tycon.IsStructOrEnumTycon false NeverMutates e None m @@ -6212,6 +6257,9 @@ let mkRefTupled g m es tys = mkAnyTupled g m tupInfoRef es tys let mkRefTupledNoTypes g m args = mkRefTupled g m args (List.map (tyOfExpr g) args) let mkRefTupledVars g m vs = mkRefTupled g m (List.map (exprForVal m) vs) (typesOfVals vs) +let mkAnonRecd (_g:TcGlobals) m anonInfo es tys = Expr.Op (TOp.AnonRecd (anonInfo),tys,es,m) + + //-------------------------------------------------------------------------- // Permute expressions //-------------------------------------------------------------------------- @@ -6267,11 +6315,6 @@ let permuteExprList (sigma:int[]) (exprs: Expr list) (ty: TType list) (names:str let reorderedExprs = permute sigma (Array.ofList newExprs) binds, Array.toList reorderedExprs -//------------------------------------------------------------------------- -// Build record expressions... -//------------------------------------------------------------------------- - - /// Evaluate the expressions in the original order, but build a record with the results in field order /// Note some fields may be static. If this were not the case we could just use /// let sigma = Array.map #Index () @@ -7302,6 +7345,7 @@ let rec typeEnc g (gtpsType, gtpsMethod) ty = match stripped with | TType_forall _ -> "Microsoft.FSharp.Core.FSharpTypeFunc" + | _ when isArrayTy g ty -> let tcref, tinst = destAppTy g ty let arraySuffix = @@ -7317,6 +7361,7 @@ let rec typeEnc g (gtpsType, gtpsMethod) ty = | 4 -> "[0:, 0:, 0:, 0:]" | _ -> failwith "impossible: rankOfArrayTyconRef: unsupported array rank" 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 @@ -7334,15 +7379,22 @@ let rec typeEnc g (gtpsType, gtpsMethod) ty = textOfPath (List.map DemangleGenericTypeName path) | _ -> assert(false); failwith "impossible" tyName + tyargsEnc g (gtpsType, gtpsMethod) tinst + + | TType_anon (anonInfo, tinst) -> + sprintf "%s%s" anonInfo.ILTypeRef.FullName (tyargsEnc g (gtpsType, gtpsMethod) tinst) + | TType_tuple (tupInfo, tys) -> if evalTupInfoIsStruct tupInfo then sprintf "System.ValueTuple%s"(tyargsEnc g (gtpsType, gtpsMethod) tys) else 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 -> typarEnc g (gtpsType, gtpsMethod) typar + | TType_measure _ -> "?" and tyargsEnc g (gtpsType, gtpsMethod) args = @@ -7503,6 +7555,10 @@ let rec TypeHasDefaultValue g m ty = flds |> List.forall (actualTyOfRecdField (mkTyconRefInst tcref tinst) >> TypeHasDefaultValue g m) elif isStructTupleTy g ty then destStructTupleTy g ty |> List.forall (TypeHasDefaultValue g m) + elif isStructAnonRecdTy g ty then + match tryDestAnonRecdTy g ty with + | ValueNone -> true + | ValueSome (_, ptys) -> ptys |> List.forall (TypeHasDefaultValue g m) else // All struct types defined in other .NET languages have a DefaultValue regardless of their // instantiation @@ -7515,6 +7571,10 @@ let (|SpecialComparableHeadType|_|) g ty = if isAnyTupleTy g ty then let _tupInfo, elemTys = destAnyTupleTy g ty Some elemTys + elif isAnonRecdTy g ty then + match tryDestAnonRecdTy g ty with + | ValueNone -> Some [] + | ValueSome (_anonInfo, elemTys) -> Some elemTys else match tryAppTy g ty with | ValueSome (tcref, tinst) -> @@ -8281,12 +8341,12 @@ let rec mkCompiledTuple g isStruct (argtys, args, m) = ty8, arg8 | _ -> let ty8enc = TType_app((if isStruct then g.struct_tuple1_tcr else g.ref_tuple1_tcr), [ty8]) - let v8enc = Expr.Op (TOp.Tuple (TupInfo.Const isStruct), [ty8], [arg8], m) + let v8enc = Expr.Op (TOp.Tuple (mkTupInfo isStruct), [ty8], [arg8], m) ty8enc, v8enc | _ -> let a, b, c, d = mkCompiledTuple g isStruct (argtysB, argsB, m) let ty8plus = TType_app(a, b) - let v8plus = Expr.Op (TOp.Tuple(TupInfo.Const isStruct), b, c, d) + let v8plus = Expr.Op (TOp.Tuple(mkTupInfo isStruct), b, c, d) ty8plus, v8plus let argtysAB = argtysA @ [ty8] (mkCompiledTupleTyconRef g isStruct (List.length argtysAB), argtysAB, argsA @ [v8], m) diff --git a/src/fsharp/TastOps.fsi b/src/fsharp/TastOps.fsi index 6723cb84c2e..8856119d7be 100755 --- a/src/fsharp/TastOps.fsi +++ b/src/fsharp/TastOps.fsi @@ -202,6 +202,8 @@ val mkReraiseLibCall : TcGlobals -> TType -> range -> Expr //------------------------------------------------------------------------- val mkTupleFieldGet : TcGlobals -> TupInfo * Expr * TypeInst * int * range -> Expr +val mkAnonRecdFieldGet : TcGlobals -> AnonRecdTypeInfo * Expr * TypeInst * int * range -> Expr +val mkAnonRecdFieldGetViaExprAddr : AnonRecdTypeInfo * Expr * TypeInst * int * range -> Expr val mkRecdFieldGetViaExprAddr : Expr * RecdFieldRef * TypeInst * range -> Expr val mkRecdFieldGetAddrViaExprAddr : readonly: bool * Expr * RecdFieldRef * TypeInst * range -> Expr val mkStaticRecdFieldGet : RecdFieldRef * TypeInst * range -> Expr @@ -270,6 +272,7 @@ val mkGetTupleItemN : TcGlobals -> range -> int -> ILType -> bool -> Expr -> TTy /// 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 +val evalAnonInfoIsStruct : AnonRecdTypeInfo -> 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 @@ -475,6 +478,8 @@ val isForallTy : TcGlobals -> TType -> bool val isAnyTupleTy : TcGlobals -> TType -> bool val isRefTupleTy : TcGlobals -> TType -> bool val isStructTupleTy : TcGlobals -> TType -> bool +val isStructAnonRecdTy : TcGlobals -> TType -> bool +val isAnonRecdTy : TcGlobals -> TType -> bool val isUnionTy : TcGlobals -> TType -> bool val isReprHiddenTy : TcGlobals -> TType -> bool val isFSharpObjModelTy : TcGlobals -> TType -> bool @@ -499,6 +504,7 @@ val tcrefOfAppTy : TcGlobals -> TType -> TyconRef val tryDestAppTy : TcGlobals -> TType -> ValueOption val tryDestTyparTy : TcGlobals -> TType -> ValueOption val tryDestFunTy : TcGlobals -> TType -> ValueOption<(TType * TType)> +val tryDestAnonRecdTy : TcGlobals -> TType -> ValueOption val argsOfAppTy : TcGlobals -> TType -> TypeInst val mkInstForAppTy : TcGlobals -> TType -> TyparInst @@ -627,6 +633,7 @@ val returnTypesAEquivAux : Erasure -> TcGlobals -> TypeEquivEnv -> TType op val returnTypesAEquiv : TcGlobals -> TypeEquivEnv -> TType option -> TType option -> bool val tcrefAEquiv : TcGlobals -> TypeEquivEnv -> TyconRef -> TyconRef -> bool val valLinkageAEquiv : TcGlobals -> TypeEquivEnv -> Val -> Val -> bool +val anonInfoEquiv : AnonRecdTypeInfo -> AnonRecdTypeInfo -> bool //------------------------------------------------------------------------- // Erasure of types wrt units-of-measure and type providers @@ -1469,7 +1476,6 @@ val isRefTupleExpr : Expr -> bool val tryDestRefTupleExpr : Expr -> Exprs val mkAnyTupledTy : TcGlobals -> TupInfo -> TType list -> TType - val mkAnyTupled : TcGlobals -> range -> TupInfo -> Exprs -> TType list -> Expr val mkRefTupled : TcGlobals -> range -> Exprs -> TType list -> Expr val mkRefTupledNoTypes : TcGlobals -> range -> Exprs -> Expr @@ -1478,6 +1484,14 @@ val mkRefTupledVarsTy : TcGlobals -> Val list -> TType val mkRefTupledVars : TcGlobals -> range -> Val list -> Expr val mkMethodTy : TcGlobals -> TType list list -> TType -> TType + +//------------------------------------------------------------------------- +// Anonymous records +//------------------------------------------------------------------------- + +val mkAnyAnonRecdTy : TcGlobals -> AnonRecdTypeInfo -> TType list -> TType +val mkAnonRecd : TcGlobals -> range -> AnonRecdTypeInfo -> Exprs -> TType list -> Expr + //------------------------------------------------------------------------- // //------------------------------------------------------------------------- diff --git a/src/fsharp/TastPickle.fs b/src/fsharp/TastPickle.fs index 3f184165ad2..d86546b3699 100755 --- a/src/fsharp/TastPickle.fs +++ b/src/fsharp/TastPickle.fs @@ -113,9 +113,10 @@ type WriterState = { os: ByteBuffer oscope: CcuThunk occus: Table - otycons: NodeOutTable + oentities: NodeOutTable otypars: NodeOutTable ovals: NodeOutTable + oanoninfos: NodeOutTable ostrings: Table opubpaths: Table onlerefs: Table @@ -144,9 +145,10 @@ type ReaderState = { is: ByteStream iilscope: ILScopeRef iccus: InputTable - itycons: NodeInTable + ientities: NodeInTable itypars: NodeInTable ivals: NodeInTable + ianoninfos: NodeInTable istrings: InputTable ipubpaths: InputTable inlerefs: InputTable @@ -317,10 +319,13 @@ let u_used_space1 f st = let inline u_tup2 p1 p2 (st:ReaderState) = let a = p1 st in let b = p2 st in (a,b) + let inline u_tup3 p1 p2 p3 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in (a,b,c) + let inline u_tup4 p1 p2 p3 p4 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in (a,b,c,d) + let inline u_tup5 p1 p2 p3 p4 p5 (st:ReaderState) = let a = p1 st let b = p2 st @@ -328,32 +333,41 @@ let inline u_tup5 p1 p2 p3 p4 p5 (st:ReaderState) = let d = p4 st let e = p5 st (a,b,c,d,e) + let inline u_tup6 p1 p2 p3 p4 p5 p6 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in (a,b,c,d,e,f) + let inline u_tup7 p1 p2 p3 p4 p5 p6 p7 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in (a,b,c,d,e,f,x7) + let inline u_tup8 p1 p2 p3 p4 p5 p6 p7 p8 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in (a,b,c,d,e,f,x7,x8) + let inline u_tup9 p1 p2 p3 p4 p5 p6 p7 p8 p9 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in (a,b,c,d,e,f,x7,x8,x9) + let inline u_tup10 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in let x10 = p10 st in (a,b,c,d,e,f,x7,x8,x9,x10) + let inline u_tup11 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in (a,b,c,d,e,f,x7,x8,x9,x10,x11) + let inline u_tup12 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12) + let inline u_tup13 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in let x13 = p13 st in (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13) + let inline u_tup14 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in @@ -391,7 +405,7 @@ let inline u_tup17 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 (s // ctxt is for debugging let p_osgn_ref (_ctxt:string) (outMap : NodeOutTable<_,_>) x st = let idx = outMap.Table.FindOrAdd (outMap.NodeStamp x) - //if ((idx = 0) && outMap.Name = "otycons") then + //if ((idx = 0) && outMap.Name = "oentities") then // System.Diagnostics.Debug.Assert(false, sprintf "idx %d#%d in table %s has name '%s', was defined at '%s' and is referenced from context %s\n" idx (outMap.NodeStamp x) outMap.Name (outMap.NodeName x) (stringOfRange (outMap.GetRange x)) _ctxt) p_int idx st @@ -479,7 +493,7 @@ let private p_lazy_impl p v st = let fixupPos7 = st.os.Position prim_p_int32 0 st let idx1 = st.os.Position - let otyconsIdx1 = st.otycons.Size + let otyconsIdx1 = st.oentities.Size let otyparsIdx1 = st.otypars.Size let ovalsIdx1 = st.ovals.Size // Run the pickler @@ -488,7 +502,7 @@ let private p_lazy_impl p v st = let idx2 = st.os.Position st.os.FixupInt32 fixupPos1 (idx2-idx1) // Determine and fixup the ranges of OSGN nodes defined within the lazy portion - let otyconsIdx2 = st.otycons.Size + let otyconsIdx2 = st.oentities.Size let otyparsIdx2 = st.otypars.Size let ovalsIdx2 = st.ovals.Size st.os.FixupInt32 fixupPos2 otyconsIdx1 @@ -599,7 +613,7 @@ let u_lazy u st = lazy (let st = { st with is = st.is.CloneAndSeek idx1 } u st) /// Force the reading of the data as a "tripwire" for each of the OSGN thunks - for i = otyconsIdx1 to otyconsIdx2-1 do wire (st.itycons.Get(i)) res done + for i = otyconsIdx1 to otyconsIdx2-1 do wire (st.ientities.Get(i)) res done for i = ovalsIdx1 to ovalsIdx2-1 do wire (st.ivals.Get(i)) res done for i = otyparsIdx1 to otyparsIdx2-1 do wire (st.itypars.Get(i)) res done res @@ -692,21 +706,23 @@ let p_nleref x st = p_int (encode_nleref st.occus st.ostrings st.onlerefs st.osc let decode_simpletyp st _ccuTab _stringTab nlerefTab a = TType_app(ERefNonLocal (lookup_nleref st nlerefTab a),[]) let lookup_simpletyp st simpleTyTab x = lookup_uniq st simpleTyTab x let u_encoded_simpletyp st = u_int st +let u_encoded_anoninfo st = u_int st 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_encoded_anoninfo x st = p_int 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,simpleTyTab,phase1bytes = + let ccuNameTab,(ntycons, ntypars, nvals, nanoninfos),stringTab,pubpathTab,nlerefTab,simpleTyTab,phase1bytes = let st1 = { os = ByteBuffer.Create 100000 oscope=scope occus= Table<_>.Create "occus" - otycons=NodeOutTable<_,_>.Create((fun (tc:Tycon) -> tc.Stamp),(fun tc -> tc.LogicalName),(fun tc -> tc.Range),(fun osgn -> osgn),"otycons") + oentities=NodeOutTable<_,_>.Create((fun (tc:Tycon) -> tc.Stamp),(fun tc -> tc.LogicalName),(fun tc -> tc.Range),(fun osgn -> osgn),"otycons") otypars=NodeOutTable<_,_>.Create((fun (tp:Typar) -> tp.Stamp),(fun tp -> tp.DisplayName),(fun tp -> tp.Range),(fun osgn -> osgn),"otypars") ovals=NodeOutTable<_,_>.Create((fun (v:Val) -> v.Stamp),(fun v -> v.LogicalName),(fun v -> v.Range),(fun osgn -> osgn),"ovals") + oanoninfos=NodeOutTable<_,_>.Create((fun (v:AnonRecdTypeInfo) -> v.Stamp),(fun v -> string v.Stamp),(fun _ -> range0),id,"oanoninfos") ostrings=Table<_>.Create "ostrings" onlerefs=Table<_>.Create "onlerefs" opubpaths=Table<_>.Create "opubpaths" @@ -716,19 +732,21 @@ let pickleObjWithDanglingCcus inMem file g scope p x = oInMem=inMem } p x st1 let sizes = - st1.otycons.Size, + st1.oentities.Size, st1.otypars.Size, - st1.ovals.Size + st1.ovals.Size, + st1.oanoninfos.Size 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 oscope=scope occus= Table<_>.Create "occus (fake)" - otycons=NodeOutTable<_,_>.Create((fun (tc:Tycon) -> tc.Stamp),(fun tc -> tc.LogicalName),(fun tc -> tc.Range),(fun osgn -> osgn),"otycons") + oentities=NodeOutTable<_,_>.Create((fun (tc:Tycon) -> tc.Stamp),(fun tc -> tc.LogicalName),(fun tc -> tc.Range),(fun osgn -> osgn),"otycons") otypars=NodeOutTable<_,_>.Create((fun (tp:Typar) -> tp.Stamp),(fun tp -> tp.DisplayName),(fun tp -> tp.Range),(fun osgn -> osgn),"otypars") ovals=NodeOutTable<_,_>.Create((fun (v:Val) -> v.Stamp),(fun v -> v.LogicalName),(fun v -> v.Range),(fun osgn -> osgn),"ovals") + oanoninfos=NodeOutTable<_,_>.Create((fun (v:AnonRecdTypeInfo) -> v.Stamp),(fun v -> string v.Stamp),(fun _ -> range0),id,"oanoninfos") ostrings=Table<_>.Create "ostrings (fake)" opubpaths=Table<_>.Create "opubpaths (fake)" onlerefs=Table<_>.Create "onlerefs (fake)" @@ -736,15 +754,21 @@ let pickleObjWithDanglingCcus inMem file g scope p x = oglobals=g ofile=file oInMem=inMem } - p_tup7 - (p_array p_encoded_ccuref) - (p_tup3 p_int p_int p_int) - (p_array p_encoded_string) - (p_array p_encoded_pubpath) - (p_array p_encoded_nleref) - (p_array p_encoded_simpletyp) - p_bytes - phase2data st2 + p_array p_encoded_ccuref ccuNameTab.AsArray st2 + // Add a 4th integer indicated by a negative 1st integer + let z1 = if nanoninfos > 0 then -ntycons-1 else ntycons + p_int z1 st2 + p_tup2 p_int p_int (ntypars, nvals) st2 + if nanoninfos > 0 then + p_int nanoninfos st2 + p_tup5 + (p_array p_encoded_string) + (p_array p_encoded_pubpath) + (p_array p_encoded_nleref) + (p_array p_encoded_simpletyp) + p_bytes + (stringTab.AsArray,pubpathTab.AsArray,nlerefTab.AsArray,simpleTyTab.AsArray,phase1bytes) + st2 st2.os.Close() phase2bytes @@ -760,49 +784,52 @@ let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef option) u (p { is = ByteStream.FromBytes (phase2bytes,0,phase2bytes.Length) iilscope= ilscope iccus= new_itbl "iccus (fake)" [| |] - itycons= NodeInTable<_,_>.Create (Tycon.NewUnlinked, (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"itycons",0) + ientities= NodeInTable<_,_>.Create (Tycon.NewUnlinked, (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"itycons",0) itypars= NodeInTable<_,_>.Create (Typar.NewUnlinked, (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"itypars",0) ivals = NodeInTable<_,_>.Create (Val.NewUnlinked , (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"ivals",0) + ianoninfos=NodeInTable<_,_>.Create(AnonRecdTypeInfo.NewUnlinked, (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"ianoninfos",0); istrings = new_itbl "istrings (fake)" [| |] inlerefs = new_itbl "inlerefs (fake)" [| |] ipubpaths = new_itbl "ipubpaths (fake)" [| |] isimpletys = new_itbl "isimpletys (fake)" [| |] ifile=file iILModule = iILModule } - let phase2data = - u_tup7 - (u_array u_encoded_ccuref) - (u_tup3 u_int u_int u_int) - (u_array u_encoded_string) - (u_array u_encoded_pubpath) - (u_array u_encoded_nleref) - (u_array u_encoded_simpletyp) - u_bytes st2 - let ccuNameTab,sizes,stringTab,pubpathTab,nlerefTab,simpleTyTab,phase1bytes = phase2data + let ccuNameTab = u_array u_encoded_ccuref st2 + let z1 = u_int st2 + let ntycons = if z1 < 0 then -z1-1 else z1 + let ntypars, nvals = u_tup2 u_int u_int st2 + let nanoninfos = if z1 < 0 then u_int st2 else 0 + let stringTab,pubpathTab,nlerefTab,simpleTyTab,phase1bytes = + u_tup5 + (u_array u_encoded_string) + (u_array u_encoded_pubpath) + (u_array u_encoded_nleref) + (u_array u_encoded_simpletyp) + u_bytes + st2 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 simpleTyTab = new_itbl "isimpletys" (Array.map (decode_simpletyp st2 ccuTab stringTab nlerefTab) simpleTyTab) - let ((ntycons,ntypars,nvals) : sizes) = sizes + let simpletypTab = new_itbl "simpleTyTab" (Array.map (decode_simpletyp st2 ccuTab stringTab nlerefTab) simpleTyTab) let data = let st1 = { is = ByteStream.FromBytes (phase1bytes,0,phase1bytes.Length) iccus= ccuTab iilscope= ilscope - itycons= NodeInTable<_,_>.Create(Tycon.NewUnlinked,(fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"itycons",ntycons) + ientities= NodeInTable<_,_>.Create(Tycon.NewUnlinked,(fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"itycons",ntycons) itypars= NodeInTable<_,_>.Create(Typar.NewUnlinked,(fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"itypars",ntypars) ivals= NodeInTable<_,_>.Create(Val.NewUnlinked ,(fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"ivals",nvals) + ianoninfos=NodeInTable<_,_>.Create(AnonRecdTypeInfo.NewUnlinked, (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"ianoninfos",nanoninfos); istrings = stringTab ipubpaths = pubpathTab inlerefs = nlerefTab - isimpletys = simpleTyTab + isimpletys = simpletypTab ifile=file iILModule = iILModule } let res = u st1 -#if LAZY_UNPICKLE -#else - check ilscope st1.itycons +#if !LAZY_UNPICKLE + check ilscope st1.ientities check ilscope st1.ivals check ilscope st1.itypars #endif @@ -812,7 +839,7 @@ let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef option) u (p //========================================================================= -// PART II *) +// PART II //========================================================================= //--------------------------------------------------------------------------- @@ -823,7 +850,9 @@ let p_ILPublicKey x st = match x with | PublicKey b -> p_byte 0 st; p_bytes b st | PublicKeyToken b -> p_byte 1 st; p_bytes b st + let p_ILVersion x st = p_tup4 p_uint16 p_uint16 p_uint16 p_uint16 x st + let p_ILModuleRef (x:ILModuleRef) st = p_tup3 p_string p_bool (p_option p_bytes) (x.Name,x.HasMetadata,x.Hash) st @@ -947,8 +976,11 @@ let rec u_ILType st = | 7 -> u_uint16 st |> mkILTyvarTy | 8 -> u_tup3 u_bool u_ILTypeRef u_ILType st |> ILType.Modified | _ -> ufailwith st "u_ILType" + and u_ILTypes st = u_list u_ILType st + and u_ILCallSig = u_wrap (fun (a,b,c) -> {CallingConv=a; ArgTypes=b; ReturnType=c}) (u_tup3 u_ILCallConv u_ILTypes u_ILType) + and u_ILTypeSpec st = let a,b = u_tup2 u_ILTypeRef u_ILTypes st in ILTypeSpec.Create(a,b) @@ -1244,7 +1276,7 @@ let p_local_item_ref ctxt tab st = p_osgn_ref ctxt tab st let p_tcref ctxt (x:EntityRef) st = match x with - | ERefLocal x -> p_byte 0 st; p_local_item_ref ctxt st.otycons x st + | ERefLocal x -> p_byte 0 st; p_local_item_ref ctxt st.oentities x st | ERefNonLocal x -> p_byte 1 st; p_nleref x st let p_ucref (UCRef(a,b)) st = p_tup2 (p_tcref "ucref") p_string (a,b) st @@ -1256,7 +1288,7 @@ let u_local_item_ref tab st = u_osgn_ref tab st let u_tcref st = let tag = u_byte st match tag with - | 0 -> u_local_item_ref st.itycons st |> ERefLocal + | 0 -> u_local_item_ref st.ientities st |> ERefLocal | 1 -> u_nleref st |> ERefNonLocal | _ -> ufailwith st "u_item_ref" @@ -1374,6 +1406,12 @@ let u_MemberFlags st = let fill_u_Expr_hole,u_expr_fwd = u_hole() let fill_p_Expr_hole,p_expr_fwd = p_hole() +let p_anonInfo_data (anonInfo: AnonRecdTypeInfo) st = + p_tup3 p_ccuref p_bool (p_array p_ident) (anonInfo.Assembly, evalTupInfoIsStruct anonInfo.TupInfo, anonInfo.SortedIds) st + +let p_anonInfo x st = + p_osgn_decl st.oanoninfos p_anonInfo_data x st + let p_trait_sln sln st = match sln with | ILMethSln(a,b,c,d) -> @@ -1386,10 +1424,20 @@ let p_trait_sln sln st = p_byte 3 st; p_expr_fwd expr st | FSRecdFieldSln(a,b,c) -> p_byte 4 st; p_tup3 p_tys p_rfref p_bool (a,b,c) st + | FSAnonRecdFieldSln(a, b, c) -> + p_byte 5 st; p_tup3 p_anonInfo p_tys p_int (a,b,c) st + let p_trait (TTrait(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 +let u_anonInfo_data st = + let (ccu, info, nms) = u_tup3 u_ccuref u_bool (u_array u_ident) st + AnonRecdTypeInfo.Create (ccu, mkTupInfo info, nms) + +let u_anonInfo st = + u_osgn_decl st.ianoninfos u_anonInfo_data st + // We have to store trait solutions since they can occur in optimization data let u_trait_sln st = let tag = u_byte st @@ -1407,6 +1455,9 @@ let u_trait_sln st = | 4 -> let (a,b,c) = u_tup3 u_tys u_rfref u_bool st FSRecdFieldSln(a,b,c) + | 5 -> + let (a,b,c) = u_tup3 u_anonInfo u_tys u_int st + FSAnonRecdFieldSln(a, b, c) | _ -> ufailwith st "u_trait_sln" let u_trait st = @@ -1417,7 +1468,9 @@ let u_trait st = let p_rational q st = p_int32 (GetNumerator q) st; p_int32 (GetDenominator q) st let p_measure_con tcref st = p_byte 0 st; p_tcref "measure" tcref st + let p_measure_var v st = p_byte 3 st; p_tpref v st + let p_measure_one = p_byte 4 // Pickle a unit-of-measure variable or constructor @@ -1527,7 +1580,6 @@ let p_tyar_spec_data (x:Typar) st = p_int64 p_tyar_constraints p_xmldoc - (x.typar_id,x.Attribs,int64 x.typar_flags.PickledBits,x.Constraints,x.XmlDoc) st let p_tyar_spec (x:Typar) st = @@ -1585,7 +1637,12 @@ let _ = fill_p_ty2 (fun isStructThisArgPos ty 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_tys (uc,tinst) st) + | TType_ucase (uc,tinst) -> p_byte 7 st; p_tup2 p_ucref p_tys (uc,tinst) st + // p_byte 8 taken by TType_tuple above + | TType_anon (anonInfo, l) -> + p_byte 9 st + p_anonInfo anonInfo st + p_tys l st) let _ = fill_u_ty (fun st -> let tag = u_byte st @@ -1599,7 +1656,8 @@ let _ = fill_u_ty (fun st -> | 6 -> let unt = u_measure_expr st in TType_measure unt | 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") + | 9 -> let anonInfo = u_anonInfo st in let l = u_tys st in TType_anon (anonInfo, l) + | _ -> ufailwith st "u_typ") let fill_p_binds,p_binds = p_hole() @@ -1717,7 +1775,7 @@ and p_exnc_repr x st = | TExnFresh x -> p_byte 2 st; p_rfield_table x st | TExnNone -> p_byte 3 st -and p_exnc_spec x st = p_tycon_spec x st +and p_exnc_spec x st = p_entity_spec x st and p_access (TAccess n) st = p_list p_cpath n st @@ -1789,7 +1847,7 @@ and p_tcaug p st = p.tcaug_abstract, space) st -and p_tycon_spec x st = p_osgn_decl st.otycons p_entity_spec_data x st +and p_entity_spec x st = p_osgn_decl st.oentities p_entity_spec_data x st and p_parentref x st = match x with @@ -1873,7 +1931,7 @@ and p_modul_typ (x: ModuleOrNamespaceType) st = p_tup3 p_istype (p_qlist p_Val) - (p_qlist p_tycon_spec) + (p_qlist p_entity_spec) (x.ModuleOrNamespaceKind,x.AllValsAndMembers,x.AllEntities) st @@ -1958,7 +2016,7 @@ and u_exnc_repr st = | 3 -> TExnNone | _ -> ufailwith st "u_exnc_repr" -and u_exnc_spec st = u_tycon_spec st +and u_exnc_spec st = u_entity_spec st and u_access st = match u_list u_cpath st with @@ -2065,8 +2123,8 @@ and u_tcaug st = tcaug_closed=true tcaug_abstract=g} -and u_tycon_spec st = - u_osgn_decl st.itycons u_entity_spec_data st +and u_entity_spec st = + u_osgn_decl st.ientities u_entity_spec_data st and u_parentref st = let tag = u_byte st @@ -2184,7 +2242,7 @@ and u_modul_typ st = u_tup3 u_istype (u_qlist u_Val) - (u_qlist u_tycon_spec) st + (u_qlist u_entity_spec) st ModuleOrNamespaceType(x1,x3,x5) @@ -2340,6 +2398,10 @@ and p_op x 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 + (* 29: TOp.Tuple when evalTupInfoIsStruct tupInfo = true *) + (* 30: TOp.TupleFieldGet when evalTupInfoIsStruct tupInfo = true *) + | TOp.AnonRecd info -> p_byte 31 st; p_anonInfo info st + | TOp.AnonRecdGet (info, n) -> p_byte 32 st; p_anonInfo info st; p_int n st | TOp.Goto _ | TOp.Label _ | TOp.Return -> failwith "unexpected backend construct in pickled TAST" and u_op st = @@ -2406,6 +2468,11 @@ and u_op st = | 29 -> TOp.Tuple tupInfoStruct | 30 -> let a = u_int st TOp.TupleFieldGet (tupInfoStruct, a) + | 31 -> let info = u_anonInfo st + TOp.AnonRecd (info) + | 32 -> let info = u_anonInfo st + let n = u_int st + TOp.AnonRecdGet (info, n) | _ -> ufailwith st "u_op" and p_expr expr st = @@ -2559,11 +2626,12 @@ let _ = fill_u_Vals (u_list u_Val) // Pickle/unpickle F# interface data //--------------------------------------------------------------------------- -let pickleModuleOrNamespace mspec st = p_tycon_spec mspec st +let pickleModuleOrNamespace mspec st = p_entity_spec mspec 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 +let unpickleModuleOrNamespace st = u_entity_spec st let unpickleCcuInfo st = let a,b,c,_space = u_tup4 unpickleModuleOrNamespace u_string u_bool (u_space 3) st diff --git a/src/fsharp/TypeChecker.fs b/src/fsharp/TypeChecker.fs index a14ff8af5d4..06656279a1d 100755 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -707,18 +707,52 @@ let UnifyRefTupleType contextInfo cenv denv m ty ps = AddCxTypeEqualsType contextInfo denv cenv.css m ty (TType_tuple (tupInfoRef, ptys)) ptys -/// Optimized unification routine that avoids creating new inference -/// variables unnecessarily -let UnifyStructTupleType contextInfo cenv denv m ty ps = - let ptys = - if isStructTupleTy cenv.g ty then - let ptys = destStructTupleTy cenv.g ty - if List.length ps = List.length ptys then ptys - else NewInferenceTypes ps - else NewInferenceTypes ps - AddCxTypeEqualsType contextInfo denv cenv.css m ty (TType_tuple (tupInfoStruct, ptys)) +/// Allow the inference of structness from the known type, e.g. +/// let (x : struct (int * int)) = (3,4) +let UnifyTupleTypeAndInferCharacteristics contextInfo cenv denv m knownTy isExplicitStruct ps = + let tupInfo, ptys = + if isAnyTupleTy cenv.g knownTy then + let tupInfo, ptys = destAnyTupleTy cenv.g knownTy + let tupInfo = (if isExplicitStruct then tupInfoStruct else tupInfo) + let ptys = + if List.length ps = List.length ptys then ptys + else NewInferenceTypes ps + tupInfo, ptys + else + mkTupInfo isExplicitStruct, NewInferenceTypes ps + + let contextInfo = + match contextInfo with + | ContextInfo.RecordFields -> ContextInfo.TupleInRecordFields + | _ -> contextInfo + + let ty2 = TType_tuple (tupInfo, ptys) + AddCxTypeEqualsType contextInfo denv cenv.css m knownTy ty2 + tupInfo, ptys + +// Allow inference of assembly-affinity and structness from the known type - even from another assembly. This is a rule of +// the language design and allows effective cross-assembly use of anonymous types in some limited circumstances. +let UnifyAnonRecdTypeAndInferCharacteristics contextInfo cenv denv m ty isExplicitStruct unsortedNames = + let anonInfo, ptys = + match tryDestAnonRecdTy cenv.g ty with + | ValueSome (anonInfo, ptys) -> + // Note: use the assembly of the known type, not the current assembly + // Note: use the structness of the known type, unless explicit + // Note: use the names of our type, since they are always explicit + let tupInfo = (if isExplicitStruct then tupInfoStruct else anonInfo.TupInfo) + let anonInfo = AnonRecdTypeInfo.Create(anonInfo.Assembly, tupInfo, unsortedNames) + let ptys = + if List.length ptys = Array.length unsortedNames then ptys + else NewInferenceTypes (Array.toList anonInfo.SortedNames) + anonInfo, ptys + | ValueNone -> + // Note: no known anonymous record type - use our assembly + let anonInfo = AnonRecdTypeInfo.Create(cenv.topCcu, mkTupInfo isExplicitStruct, unsortedNames) + anonInfo, NewInferenceTypes (Array.toList anonInfo.SortedNames) + let ty2 = TType_anon (anonInfo, ptys) + AddCxTypeEqualsType contextInfo denv cenv.css m ty ty2 + anonInfo, ptys - ptys /// Optimized unification routine that avoids creating new inference /// variables unnecessarily @@ -3156,7 +3190,7 @@ let GetMethodArgs arg = let args = match arg with | SynExpr.Const (SynConst.Unit, _) -> [] - | SynExprParen(SynExpr.Tuple (args, _, _), _, _, _) | SynExpr.Tuple (args, _, _) -> args + | SynExprParen(SynExpr.Tuple (false, args, _, _), _, _, _) | SynExpr.Tuple (false, args, _, _) -> args | SynExprParen(arg, _, _, _) | arg -> [arg] let unnamedCallerArgs, namedCallerArgs = args |> List.takeUntil IsNamedArg @@ -3439,10 +3473,10 @@ let elimFastIntegerForLoop (spBind, id, start, dir, finish, innerExpr, m) = let (|ExprAsPat|_|) (f:SynExpr) = match f with | SingleIdent v1 | SynExprParen(SingleIdent v1, _, _, _) -> Some (mkSynPatVar None v1) - | SynExprParen(SynExpr.Tuple (elems, _, _), _, _, _) -> + | SynExprParen(SynExpr.Tuple (false, elems, _, _), _, _, _) -> let elems = elems |> List.map (|SingleIdent|_|) if elems |> List.forall (fun x -> x.IsSome) then - Some (SynPat.Tuple((elems |> List.map (fun x -> mkSynPatVar None x.Value)), f.Range)) + Some (SynPat.Tuple(false, (elems |> List.map (fun x -> mkSynPatVar None x.Value)), f.Range)) else None | _ -> None @@ -4581,21 +4615,34 @@ and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv:SyntacticUnscoped match ltyp with | AppTy cenv.g (tcref, tinst) -> let tcref = ResolveTypeLongIdentInTyconRef cenv.tcSink cenv.nameResolver env.eNameResEnv (TypeNameResolutionInfo.ResolveToTypeRefs (TypeNameResolutionStaticArgsInfo.FromTyArgs args.Length)) ad m tcref longId - TcTypeApp cenv newOk checkCxs occ env tpenv m tcref tinst args + TcTypeApp cenv newOk checkCxs occ env tpenv m tcref tinst args | _ -> error(Error(FSComp.SR.tcTypeHasNoNestedTypes(), m)) - | SynType.Tuple(args, m) -> - let isMeasure = match optKind with Some TyparKind.Measure -> true | None -> List.exists (fun (isquot, _) -> isquot) args | _ -> false - if isMeasure then - let ms, tpenv = TcMeasuresAsTuple cenv newOk checkCxs occ env tpenv args m - TType_measure ms, tpenv + | SynType.Tuple(isStruct, args, m) -> + let tupInfo = mkTupInfo isStruct + if isStruct then + let args',tpenv = TcTypesAsTuple cenv newOk checkCxs occ env tpenv args m + TType_tuple(tupInfo,args'),tpenv else - let args', tpenv = TcTypesAsTuple cenv newOk checkCxs occ env tpenv args m - TType_tuple(tupInfoRef, args'), tpenv - - | SynType.StructTuple(args, m) -> - let args', tpenv = TcTypesAsTuple cenv newOk checkCxs occ env tpenv args m - TType_tuple(tupInfoStruct, args'), tpenv + let isMeasure = match optKind with Some TyparKind.Measure -> true | None -> List.exists (fun (isquot,_) -> isquot) args | _ -> false + if isMeasure then + let ms,tpenv = TcMeasuresAsTuple cenv newOk checkCxs occ env tpenv args m + TType_measure ms,tpenv + else + let args',tpenv = TcTypesAsTuple cenv newOk checkCxs occ env tpenv args m + TType_tuple(tupInfo,args'),tpenv + + | SynType.AnonRecd(isStruct, args,m) -> + let tupInfo = mkTupInfo isStruct + let args',tpenv = TcTypesAsTuple cenv newOk checkCxs occ env tpenv (args |> List.map snd |> List.map (fun x -> (false,x))) m + let unsortedIds = args |> List.map fst |> List.toArray + let anonInfo = AnonRecdTypeInfo.Create(cenv.topCcu, tupInfo, unsortedIds) + // Sort into canonical order + let sortedArgTys, sortedCheckedArgTys = List.zip args args' |> List.indexed |> List.sortBy (fun (i,_) -> unsortedIds.[i].idText) |> List.map snd |> List.unzip + sortedArgTys |> List.iteri (fun i (x,_) -> + let item = Item.AnonRecdField(anonInfo, sortedCheckedArgTys, i, x.idRange) + CallNameResolutionSink cenv.tcSink (x.idRange,env.NameEnv,item,item,emptyTyparInst,ItemOccurence.UseInType,env.DisplayEnv,env.eAccessRights)) + TType_anon(anonInfo, sortedCheckedArgTys),tpenv | SynType.Fun(domainTy, resultTy, _) -> let domainTy', tpenv = TcTypeAndRecover cenv newOk checkCxs occ env tpenv domainTy @@ -5270,10 +5317,10 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p 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 - | SynPat.Tuple (args, m) -> SynExpr.Tuple(List.map convSynPatToSynExpr args, [], m) + | SynPat.Tuple (isStruct, args, m) -> SynExpr.Tuple(isStruct, List.map convSynPatToSynExpr args, [], m) | SynPat.Paren (p, _) -> convSynPatToSynExpr p - | SynPat.ArrayOrList (isArray, args, m) -> SynExpr.ArrayOrList(isArray, List.map convSynPatToSynExpr args, m) - | SynPat.QuoteExpr (e, _) -> e + | SynPat.ArrayOrList (isArray, args, m) -> SynExpr.ArrayOrList(isArray,List.map convSynPatToSynExpr args, m) + | SynPat.QuoteExpr (e,_) -> e | SynPat.Null m -> SynExpr.Null(m) | _ -> error(Error(FSComp.SR.tcInvalidArgForParameterizedPattern(), x.Range)) let activePatArgsAsSynExprs = List.map convSynPatToSynExpr activePatArgsAsSynPats @@ -5342,13 +5389,13 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p let args = List.ofArray result if result.Length = 1 then args - else [ SynPat.Tuple(args, m) ] + else [ SynPat.Tuple(false, args, m) ] let args = match args with | []-> [] // note: the next will always be parenthesized - | [SynPatErrorSkip(SynPat.Tuple (args, _)) | SynPatErrorSkip(SynPat.Paren(SynPatErrorSkip(SynPat.Tuple (args, _)), _))] when numArgTys > 1 -> args + | [SynPatErrorSkip(SynPat.Tuple (false, args, _)) | SynPatErrorSkip(SynPat.Paren(SynPatErrorSkip(SynPat.Tuple (false, 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 numArgTys e) @@ -5412,17 +5459,10 @@ 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)) + | SynPat.Tuple (isExplicitStruct, args, m) -> + let tupInfo, argTys = UnifyTupleTypeAndInferCharacteristics env.eContextInfo cenv env.DisplayEnv m ty isExplicitStruct args 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 + (fun values -> TPat_tuple(tupInfo, List.map (fun f -> f values) args', argTys, m)), acc | SynPat.Paren (p, _) -> TcPat warnOnUpper cenv env None vFlags (tpenv, names, takenNames) ty p @@ -5650,9 +5690,9 @@ and TcExprThen cenv overallTy env tpenv synExpr delayed = let expr, exprty, tpenv = TcExprUndelayedNoType cenv env tpenv synExpr PropagateThenTcDelayed cenv overallTy env tpenv synExpr.Range (MakeApplicableExprNoFlex cenv expr) exprty ExprAtomicFlag.NonAtomic 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) -> +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 false ty env tpenv e) and CheckSuperInit cenv objTy m = @@ -5792,20 +5832,16 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = 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 + | SynExpr.Tuple (isExplicitStruct, args, _, m) -> + let tupInfo, argTys = UnifyTupleTypeAndInferCharacteristics env.eContextInfo cenv env.DisplayEnv m overallTy isExplicitStruct args // No subsumption at tuple construction 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 + let expr = mkAnyTupled cenv.g m tupInfo args' argTys expr, tpenv - | SynExpr.StructTuple (args, _, m) -> - 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 + | SynExpr.AnonRecd (isStruct, optOrigExpr, unsortedArgs, mWholeExpr) -> + TcAnonRecdExpr cenv overallTy env tpenv (isStruct, optOrigExpr, unsortedArgs, mWholeExpr) | SynExpr.ArrayOrList (isArray, args, m) -> CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy, env.DisplayEnv, env.eAccessRights) @@ -6211,7 +6247,7 @@ and TcIndexerThen cenv env overallTy mWholeExpr mDot tpenv wholeExpr e1 indexArg match indexArgs with | [] -> failwith "unexpected empty index list" | [SynIndexerArg.One h] -> SynExpr.Paren(h, range0, None, idxRange) - | _ -> SynExpr.Paren(SynExpr.Tuple(GetIndexArgs indexArgs @ Option.toList vopt, [], idxRange), range0, None, idxRange) + | _ -> SynExpr.Paren(SynExpr.Tuple(false, GetIndexArgs indexArgs @ Option.toList vopt, [], idxRange), range0, None, idxRange) let attemptArrayString = if isArray || isString then @@ -6220,13 +6256,13 @@ and TcIndexerThen cenv env overallTy mWholeExpr mDot tpenv wholeExpr e1 indexArg let sliceOpPath = ["Microsoft";"FSharp";"Core";"Operators";"OperatorIntrinsics"] let info = match isString, isArray, wholeExpr with - | false, true, SynExpr.DotIndexedGet(_, [SynIndexerArg.One(SynExpr.Tuple ([_;_] as idxs, _, _))], _, _) -> Some (indexOpPath, "GetArray2D", idxs) - | false, true, SynExpr.DotIndexedGet(_, [SynIndexerArg.One(SynExpr.Tuple ([_;_;_] as idxs, _, _))], _, _) -> Some (indexOpPath, "GetArray3D", idxs) - | false, true, SynExpr.DotIndexedGet(_, [SynIndexerArg.One(SynExpr.Tuple ([_;_;_;_] as idxs, _, _))], _, _) -> Some (indexOpPath, "GetArray4D", idxs) + | false, true, SynExpr.DotIndexedGet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_] as idxs), _, _))], _, _) -> Some (indexOpPath, "GetArray2D", idxs) + | false, true, SynExpr.DotIndexedGet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_;_] as idxs), _, _))], _, _) -> Some (indexOpPath, "GetArray3D", idxs) + | false, true, SynExpr.DotIndexedGet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_;_;_] as idxs), _, _))], _, _) -> Some (indexOpPath, "GetArray4D", idxs) | false, true, SynExpr.DotIndexedGet(_, [SynIndexerArg.One idx], _, _) -> Some (indexOpPath, "GetArray", [idx]) - | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple ([_;_] as idxs, _, _))] , e3, _, _, _) -> Some (indexOpPath, "SetArray2D", (idxs @ [e3])) - | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple ([_;_;_] as idxs, _, _))] , e3, _, _, _) -> Some (indexOpPath, "SetArray3D", (idxs @ [e3])) - | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple ([_;_;_;_] as idxs, _, _))] , e3, _, _, _) -> Some (indexOpPath, "SetArray4D", (idxs @ [e3])) + | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_] as idxs), _, _))] , e3, _, _, _) -> Some (indexOpPath, "SetArray2D", (idxs @ [e3])) + | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_;_] as idxs), _, _))] , e3, _, _, _) -> Some (indexOpPath, "SetArray3D", (idxs @ [e3])) + | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_;_;_] as idxs), _, _))] , e3, _, _, _) -> Some (indexOpPath, "SetArray4D", (idxs @ [e3])) | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One _], e3, _, _, _) -> Some (indexOpPath, "SetArray", (GetIndexArgs indexArgs @ [e3])) | true, false, SynExpr.DotIndexedGet(_, [SynIndexerArg.Two _], _, _) -> Some (sliceOpPath, "GetStringSlice", GetIndexArgs indexArgs) | true, false, SynExpr.DotIndexedGet(_, [SynIndexerArg.One _], _, _) -> Some (indexOpPath, "GetString", GetIndexArgs indexArgs) @@ -6343,10 +6379,6 @@ and TcCtorCall isNaked cenv env tpenv overallTy objTy mObjTyOpt item superInit a error(Error(FSComp.SR.tcSyntaxCanOnlyBeUsedToCreateObjectTypes(if superInit then "inherit" else "new"), mWholeCall)) -//------------------------------------------------------------------------- -// TcRecordConstruction -//------------------------------------------------------------------------- - // Check a record construction expression and TcRecordConstruction cenv overallTy env tpenv optOrigExprInfo objTy fldsList m = let tcref, tinst = destAppTy cenv.g objTy @@ -6686,9 +6718,9 @@ and TcObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, if // record construction ? isRecordTy || // object construction? - (isFSharpObjModelTy cenv.g objTy && not (isInterfaceTy cenv.g objTy) && Option.isNone argopt) then + (isFSharpObjModelTy cenv.g objTy && not (isInterfaceTy cenv.g objTy) && argopt.IsNone) then - if Option.isSome argopt then error(Error(FSComp.SR.tcNoArgumentsForRecordValue(), mWholeExpr)) + if argopt.IsSome then error(Error(FSComp.SR.tcNoArgumentsForRecordValue(), mWholeExpr)) if not (isNil extraImpls) then error(Error(FSComp.SR.tcNoInterfaceImplementationForConstructionExpression(), mNewExpr)) if isFSharpObjModelTy cenv.g objTy && GetCtorShapeCounter env <> 1 then error(Error(FSComp.SR.tcObjectConstructionCanOnlyBeUsedInClassTypes(), mNewExpr)) @@ -6895,11 +6927,6 @@ and TcAssertExpr cenv overallTy env (m:range) tpenv x = TcExpr cenv overallTy env tpenv callDiagnosticsExpr - -//------------------------------------------------------------------------- -// TcRecdExpr -//------------------------------------------------------------------------- - and TcRecdExpr cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr) = let requiresCtor = (GetCtorShapeCounter env = 1) // Get special expression forms for constructors @@ -6986,9 +7013,104 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr expr, tpenv -//------------------------------------------------------------------------- -// TcForEachExpr -//------------------------------------------------------------------------- +// Check '{| .... |}' +and TcAnonRecdExpr cenv overallTy env tpenv (isStruct, optOrigExpr, unsortedArgs, mWholeExpr) = + + match optOrigExpr with + | None -> + let unsortedIds = unsortedArgs |> List.map fst |> List.toArray + let anonInfo, sortedArgTys = UnifyAnonRecdTypeAndInferCharacteristics env.eContextInfo cenv env.DisplayEnv mWholeExpr overallTy isStruct unsortedIds + + // Sort into canonical order + let sortedIndexedArgs = unsortedArgs |> List.indexed |> List.sortBy (fun (i,_) -> unsortedIds.[i].idText) + let sigma = List.map fst sortedIndexedArgs |> List.toArray + let sortedArgs = List.map snd sortedIndexedArgs + sortedArgs |> List.iteri (fun j (x, _) -> + let item = Item.AnonRecdField(anonInfo, sortedArgTys, j, x.idRange) + CallNameResolutionSink cenv.tcSink (x.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights)) + let unsortedArgTys = sortedArgTys |> List.indexed |> List.sortBy (fun (j, _) -> sigma.[j]) |> List.map snd + let flexes = unsortedArgTys |> List.map (fun _ -> true) + let unsortedCheckedArgs, tpenv = TcExprs cenv env mWholeExpr tpenv flexes unsortedArgTys (List.map snd unsortedArgs) + let sortedCheckedArgs = unsortedCheckedArgs |> List.indexed |> List.sortBy (fun (i,_) -> unsortedIds.[i].idText) |> List.map snd + + mkAnonRecd cenv.g mWholeExpr anonInfo sortedCheckedArgs sortedArgTys, tpenv + + | Some (origExpr, _) -> + // The fairly complex case '{| origExpr with X = 1; Y = 2 |}' + // The origExpr may be either a record or anonymous record. + // The origExpr may be either a struct or not. + // All the properties of origExpr are copied across except where they are overridden. + // The result is a field-sorted anonymous record. + // + // Unlike in the case of record type copy-and-update we do _not_ assume that the origExpr has the same type as the overall expression. + // Unlike in the case of record type copy-and-update {| a with X = 1 |} does not force a.X to exist or have had type 'int' + + let origExprTy = NewInferenceType() + let origExprChecked, tpenv = TcExpr cenv origExprTy env tpenv origExpr + let oldv, oldve = mkCompGenLocal mWholeExpr "inputRecord" origExprTy + let mOrigExpr = origExpr.Range + + if not (isAppTy cenv.g origExprTy || isAnonRecdTy cenv.g origExprTy) then + error (Error (FSComp.SR.tcCopyAndUpdateNeedsRecordType(), mOrigExpr)) + + let origExprIsStruct = + match tryDestAnonRecdTy cenv.g origExprTy with + | ValueSome (anonInfo, _) -> evalTupInfoIsStruct anonInfo.TupInfo + | ValueNone -> + let tcref, _ = destAppTy cenv.g origExprTy + tcref.IsStructOrEnumTycon + + let wrap, oldveaddr, _readonly, _writeonly = mkExprAddrOfExpr cenv.g origExprIsStruct false NeverMutates oldve None mOrigExpr + + // Put all the expressions in unsorted order. The new bindings come first. The origin of each is tracked using + /// - Choice1Of2 for a new binding + /// - Choice2Of2 for a binding coming from the original expression + let unsortedIdAndExprsAll = + [| for (id, e) in unsortedArgs do + yield (id, Choice1Of2 e) + match tryDestAnonRecdTy cenv.g origExprTy with + | ValueSome (anonInfo, tinst) -> + for (i, id) in Array.indexed anonInfo.SortedIds do + yield id, Choice2Of2 (mkAnonRecdFieldGetViaExprAddr (anonInfo, oldveaddr, tinst, i, mOrigExpr)) + | ValueNone -> + if isRecdTy cenv.g origExprTy then + let tcref, tinst = destAppTy cenv.g origExprTy + let fspecs = tcref.Deref.TrueInstanceFieldsAsList + for fspec in fspecs do + yield fspec.Id, Choice2Of2 (mkRecdFieldGetViaExprAddr (oldveaddr , tcref.MakeNestedRecdFieldRef fspec, tinst, mOrigExpr)) + else + error (Error (FSComp.SR.tcCopyAndUpdateNeedsRecordType(), mOrigExpr)) |] + |> Array.distinctBy (fst >> textOfId) + + let unsortedIdsAll = Array.map fst unsortedIdAndExprsAll + let anonInfo, sortedArgTysAll = UnifyAnonRecdTypeAndInferCharacteristics env.eContextInfo cenv env.DisplayEnv mWholeExpr overallTy isStruct unsortedIdsAll + let sortedIndexedArgsAll = unsortedIdAndExprsAll |> Array.indexed |> Array.sortBy (snd >> fst >> textOfId) + let sigma = Array.map fst sortedIndexedArgsAll // map from sorted indexes to unsorted indexes + let sortedArgsAll = Array.map snd sortedIndexedArgsAll + sortedArgsAll |> Array.iteri (fun j (x, expr) -> + match expr with + | Choice1Of2 _ -> + let item = Item.AnonRecdField(anonInfo, sortedArgTysAll, j, x.idRange) + CallNameResolutionSink cenv.tcSink (x.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) + | Choice2Of2 _ -> ()) + + let unsortedArgTysNew = sortedArgTysAll |> List.indexed |> List.sortBy (fun (j, _) -> sigma.[j]) |> List.take unsortedArgs.Length |> List.map snd + let flexes = unsortedArgTysNew |> List.map (fun _ -> true) + + let unsortedCheckedArgsNew, tpenv = TcExprs cenv env mWholeExpr tpenv flexes unsortedArgTysNew (List.map snd unsortedArgs) + let sortedArgTysAllArray = Array.ofList sortedArgTysAll + let unsortedCheckedArgsNewArray = unsortedCheckedArgsNew |> List.toArray + let sortedCheckedArgsAll = + sortedArgsAll |> Array.mapi (fun j (_, expr) -> + match expr with + | Choice1Of2 _ -> unsortedCheckedArgsNewArray.[sigma.[j]] + | Choice2Of2 subExpr -> UnifyTypes cenv env mOrigExpr (tyOfExpr cenv.g subExpr) sortedArgTysAllArray.[j]; subExpr) + + let expr = mkAnonRecd cenv.g mWholeExpr anonInfo (List.ofArray sortedCheckedArgsAll) sortedArgTysAll + let expr = wrap expr + let expr = mkCompGenLet mOrigExpr oldv origExprChecked expr + expr, tpenv + and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWholeExpr, spForLoop) = UnifyTypes cenv env mWholeExpr overallTy cenv.g.unit_ty @@ -7152,7 +7274,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv match args with | [] -> SynExpr.Const(SynConst.Unit, m) | [arg] -> SynExpr.Paren(SynExpr.Paren(arg, range0, None, m), range0, None, m) - | args -> SynExpr.Paren(SynExpr.Tuple(args, [], m), range0, None, m) + | args -> SynExpr.Paren(SynExpr.Tuple(false, args, [], m), range0, None, m) let builderVal = mkSynIdGet m builderValName mkSynApp1 (SynExpr.DotGet(builderVal, range0, LongIdentWithDots([mkSynId m nm], []), m)) args m @@ -7518,7 +7640,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv match patvs with | [] -> SynExpr.Const(SynConst.Unit, m) | [v] -> SynExpr.Ident v.Id - | vs -> SynExpr.Tuple((vs |> List.map (fun v -> SynExpr.Ident v.Id)), [], m) + | vs -> SynExpr.Tuple(false, (vs |> List.map (fun v -> SynExpr.Ident v.Id)), [], m) let mkSimplePatForVarSpace m (patvs: Val list) = let spats = @@ -7532,7 +7654,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv match patvs with | [] -> SynPat.Const (SynConst.Unit, m) | [v] -> mkSynPatVar None v.Id - | vs -> SynPat.Tuple((vs |> List.map (fun x -> mkSynPatVar None x.Id)), m) + | vs -> SynPat.Tuple(false, (vs |> List.map (fun x -> mkSynPatVar None x.Id)), m) let (|OptionalSequential|) e = match e with @@ -7549,7 +7671,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv let estimatedRangeOfIntendedLeftAndRightArguments = unionRanges (List.last args).Range arg2.Range errorR(Error(FSComp.SR.tcUnrecognizedQueryBinaryOperator(), estimatedRangeOfIntendedLeftAndRightArguments)) true - | SynExpr.Tuple( (StripApps(SingleIdent nm2, args) :: _), _, m) when + | SynExpr.Tuple(false, (StripApps(SingleIdent nm2, args) :: _), _, m) when expectedArgCountForCustomOperator nm2 > 0 && not (List.isEmpty args) -> let estimatedRangeOfIntendedLeftAndRightArguments = unionRanges (List.last args).Range m.EndRange @@ -8575,8 +8697,8 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del let (|FittedArgs|_|) arg = match arg with - | SynExprParen(SynExpr.Tuple(args, _, _), _, _, _) - | SynExpr.Tuple(args, _, _) when numArgTys > 1 -> Some args + | SynExprParen(SynExpr.Tuple(false, args, _, _), _, _, _) + | SynExpr.Tuple(false, args, _, _) when numArgTys > 1 -> Some args | SynExprParen(arg, _, _, _) | arg when numArgTys = 1 -> Some [arg] | _ -> None @@ -8870,14 +8992,14 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | SynExpr.Const _ | SynExpr.LongIdent _ -> true - | SynExpr.Tuple(synExprs, _, _) - | SynExpr.StructTuple(synExprs, _, _) + | SynExpr.Tuple(_, synExprs, _, _) | SynExpr.ArrayOrList(_, synExprs, _) -> synExprs |> List.forall isSimpleArgument | SynExpr.Record(_, copyOpt, fields, _) -> copyOpt |> Option.forall (fst >> isSimpleArgument) && fields |> List.forall (p23 >> Option.forall isSimpleArgument) | SynExpr.App (_, _, synExpr, synExpr2, _) -> isSimpleArgument synExpr && isSimpleArgument synExpr2 | SynExpr.IfThenElse(synExpr, synExpr2, synExprOpt, _, _, _, _) -> isSimpleArgument synExpr && isSimpleArgument synExpr2 && Option.forall isSimpleArgument synExprOpt | SynExpr.DotIndexedGet(synExpr, _, _, _) -> isSimpleArgument synExpr | SynExpr.ObjExpr _ + | SynExpr.AnonRecd _ | SynExpr.While _ | SynExpr.For _ | SynExpr.ForEach _ @@ -9244,6 +9366,18 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela let objExpr' = mkRecdFieldGet cenv.g (objExpr, rfinfo.RecdFieldRef, rfinfo.TypeInst, mExprAndItem) PropagateThenTcDelayed cenv overallTy env tpenv mExprAndItem (MakeApplicableExprWithFlex cenv env objExpr') fieldTy ExprAtomicFlag.Atomic delayed + | Item.AnonRecdField (anonInfo, tinst, n, _) -> + let tgty = TType_anon (anonInfo, tinst) + AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css mItem NoTrace tgty objExprTy + let fieldTy = List.item n tinst + match delayed with + | DelayedSet _ :: _otherDelayed -> + error(Error(FSComp.SR.tcInvalidAssignment(),mItem)) + | _ -> + // Instance F# Anonymous Record + let objExpr' = mkAnonRecdFieldGet cenv.g (anonInfo,objExpr,tinst,n,mExprAndItem) + PropagateThenTcDelayed cenv overallTy env tpenv mExprAndItem (MakeApplicableExprWithFlex cenv env objExpr') fieldTy ExprAtomicFlag.Atomic delayed + | Item.ILField finfo -> // Get or set instance IL field ILFieldInstanceChecks cenv.g cenv.amap ad mItem finfo @@ -15631,6 +15765,7 @@ module EstablishTypeDefinitionCores = let rec accInAbbrevType ty acc = match stripTyparEqns ty with + | TType_anon (_,l) | TType_tuple (_, l) -> accInAbbrevTypes l acc | TType_ucase (UCRef(tc, _), tinst) | TType_app (tc, tinst) -> @@ -17329,14 +17464,14 @@ let TypeCheckOneImplFile // We ALWAYS run the PostTypeCheckSemanticChecks phase, though we if we have already encountered some // errors we turn off error reporting. This is because it performs various fixups over the TAST, e.g. // assigning nice names for inference variables. - let hasExplicitEntryPoint = + let hasExplicitEntryPoint, anonRecdTypes = 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, isInternalTestSpanStackReferring) with e -> errorRecovery e m - false) + false, StampMap.Empty) // Warn on version attributes. topAttrs.assemblyAttrs |> List.iter (function @@ -17352,7 +17487,7 @@ let TypeCheckOneImplFile | _ -> () | _ -> ()) - let implFile = TImplFile(qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript) + let implFile = TImplFile(qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript, anonRecdTypes) return (topAttrs, implFile, implFileTypePriorToSig, envAtEnd, cenv.createsGeneratedProvidedTypes) } diff --git a/src/fsharp/ast.fs b/src/fsharp/ast.fs index 59dddd88122..f7fbbdd6491 100644 --- a/src/fsharp/ast.fs +++ b/src/fsharp/ast.fs @@ -162,22 +162,26 @@ type LongIdentWithDots = /// more freedom about typechecking these expressions. /// LongIdent can be empty list - it is used to denote that name of some AST element is absent (i.e. empty type name in inherit) | LongIdentWithDots of id:LongIdent * dotms:range list - with member this.Range = - match this with - | LongIdentWithDots([],_) -> failwith "rangeOfLidwd" - | LongIdentWithDots([id],[]) -> id.idRange - | LongIdentWithDots([id],[m]) -> unionRanges id.idRange m - | LongIdentWithDots(h::t,[]) -> unionRanges h.idRange (List.last t).idRange - | LongIdentWithDots(h::t,dotms) -> unionRanges h.idRange (List.last t).idRange |> unionRanges (List.last dotms) - member this.Lid = match this with LongIdentWithDots(lid,_) -> lid - member this.ThereIsAnExtraDotAtTheEnd = match this with LongIdentWithDots(lid,dots) -> lid.Length = dots.Length - member this.RangeSansAnyExtraDot = - match this with - | LongIdentWithDots([],_) -> failwith "rangeOfLidwd" - | LongIdentWithDots([id],_) -> id.idRange - | LongIdentWithDots(h::t,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) + + member this.Range = + match this with + | LongIdentWithDots([],_) -> failwith "rangeOfLidwd" + | LongIdentWithDots([id],[]) -> id.idRange + | LongIdentWithDots([id],[m]) -> unionRanges id.idRange m + | LongIdentWithDots(h::t,[]) -> unionRanges h.idRange (List.last t).idRange + | LongIdentWithDots(h::t,dotms) -> unionRanges h.idRange (List.last t).idRange |> unionRanges (List.last dotms) + + member this.Lid = match this with LongIdentWithDots(lid,_) -> lid + + member this.ThereIsAnExtraDotAtTheEnd = match this with LongIdentWithDots(lid,dots) -> lid.Length = dots.Length + + member this.RangeSansAnyExtraDot = + match this with + | LongIdentWithDots([],_) -> failwith "rangeOfLidwd" + | LongIdentWithDots([id],_) -> id.idRange + | LongIdentWithDots(h::t,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) //------------------------------------------------------------------------ // AST: the grammar of implicitly scoped type parameters @@ -428,44 +432,56 @@ and | LongIdentApp of typeName:SynType * longDotId:LongIdentWithDots * LESSRange:range option * typeArgs:SynType list * commaRanges:range list * GREATERrange:range option * range:range /// F# syntax : type * ... * type - // the bool is true if / rather than * follows the type - | Tuple of typeNames:(bool*SynType) list * range:range - /// F# syntax : struct (type * ... * type) // the bool is true if / rather than * follows the type - | StructTuple of typeNames:(bool*SynType) list * range:range + | Tuple of isStruct:bool * typeNames:(bool*SynType) list * range:range + + /// F# syntax : {| id: type; ...; id: type |} + /// F# syntax : struct {| id: type; ...; id: type |} + | AnonRecd of isStruct:bool * typeNames:(Ident * SynType) list * range:range /// F# syntax : type[] | Array of int * elementType:SynType * range:range + /// F# syntax : type -> type | Fun of argType:SynType * returnType:SynType * range:range + /// F# syntax : 'Var | Var of genericName:SynTypar * range:range + /// F# syntax : _ | Anon of range:range + /// F# syntax : typ with constraints | WithGlobalConstraints of typeName:SynType * constraints:SynTypeConstraint list * range:range + /// F# syntax : #type | HashConstraint of SynType * range:range + /// F# syntax : for units of measure e.g. m / s | MeasureDivide of dividendType:SynType * divisorType:SynType * range:range + /// F# syntax : for units of measure e.g. m^3, kg^1/2 | MeasurePower of measureType:SynType * SynRationalConst * range:range + /// F# syntax : 1, "abc" etc, used in parameters to type providers /// For the dimensionless units i.e. 1 , and static parameters to provided types | StaticConstant of constant:SynConst * range:range + /// F# syntax : const expr, used in static parameters to type providers | StaticConstantExpr of expr:SynExpr * range:range + /// F# syntax : ident=1 etc., used in static parameters to type providers | StaticConstantNamed of expr:SynType * SynType * range:range + /// Get the syntactic range of source code covered by this construct. member x.Range = match x with | SynType.App (range=m) | SynType.LongIdentApp (range=m) | SynType.Tuple (range=m) - | SynType.StructTuple (range=m) | SynType.Array (range=m) + | SynType.AnonRecd (range=m) | SynType.Fun (range=m) | SynType.Var (range=m) | SynType.Anon (range=m) @@ -504,10 +520,11 @@ and | Typed of expr:SynExpr * typeName:SynType * range:range /// F# syntax: e1, ..., eN - | Tuple of exprs:SynExpr list * commaRanges:range list * range:range // "range list" is for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them + | Tuple of isStruct: bool * exprs:SynExpr list * commaRanges:range list * range:range // "range list" is for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them - /// F# syntax: struct (e1, ..., eN) - | StructTuple of exprs:SynExpr list * commaRanges:range list * range:range // "range list" is for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them + /// F# syntax: {| id1=e1; ...; idN=eN |} + /// F# syntax: struct {| id1=e1; ...; idN=eN |} + | AnonRecd of isStruct: bool * copyInfo:(SynExpr * BlockSeparator) option * recordFields:(Ident * SynExpr) list * range:range /// F# syntax: [ e1; ...; en ], [| e1; ...; en |] | ArrayOrList of isList:bool * exprs:SynExpr list * range:range @@ -734,7 +751,7 @@ and | SynExpr.Const (range=m) | SynExpr.Typed (range=m) | SynExpr.Tuple (range=m) - | SynExpr.StructTuple (range=m) + | SynExpr.AnonRecd (range=m) | SynExpr.ArrayOrList (range=m) | SynExpr.Record (range=m) | SynExpr.New (range=m) @@ -799,8 +816,8 @@ and | SynExpr.Const (range=m) | SynExpr.Typed (range=m) | SynExpr.Tuple (range=m) - | SynExpr.StructTuple (range=m) | SynExpr.ArrayOrList (range=m) + | SynExpr.AnonRecd (range=m) | SynExpr.Record (range=m) | SynExpr.New (range=m) | SynExpr.ObjExpr (range=m) @@ -855,6 +872,7 @@ and | SynExpr.DiscardAfterMissingQualificationAfterDot (expr,_) -> expr.Range | SynExpr.Fixed (_,m) -> m | SynExpr.Ident id -> id.idRange + /// Attempt to get the range of the first token or initial portion only - this is extremely ad-hoc, just a cheap way to improve a certain 'query custom operation' error range member e.RangeOfFirstPortion = match e with @@ -863,8 +881,8 @@ and | SynExpr.Const (range=m) | SynExpr.Typed (range=m) | SynExpr.Tuple (range=m) - | SynExpr.StructTuple (range=m) | SynExpr.ArrayOrList (range=m) + | SynExpr.AnonRecd (range=m) | SynExpr.Record (range=m) | SynExpr.New (range=m) | SynExpr.ObjExpr (range=m) @@ -993,8 +1011,7 @@ and | Or of SynPat * SynPat * range:range | Ands of SynPat list * range:range | LongIdent of longDotId:LongIdentWithDots * (* holds additional ident for tooling *) Ident option * SynValTyparDecls option (* usually None: temporary used to parse "f<'a> x = x"*) * SynConstructorArgs * accessibility:SynAccess option * range:range - | Tuple of SynPat list * range:range - | StructTuple of SynPat list * range:range + | Tuple of isStruct: bool * SynPat list * range:range | Paren of SynPat * range:range | ArrayOrList of bool * SynPat list * range:range | Record of ((LongIdent * Ident) * SynPat) list * range:range @@ -1025,7 +1042,6 @@ and | SynPat.LongIdent (range=m) | SynPat.ArrayOrList (range=m) | SynPat.Tuple (range=m) - | SynPat.StructTuple (range=m) | SynPat.Typed (range=m) | SynPat.Attrib (range=m) | SynPat.Record (range=m) @@ -1714,8 +1730,8 @@ let rec SimplePatsOfPat synArgNameGenerator p = SynSimplePats.Typed(p2,ty,m), laterf // | SynPat.Paren (p,m) -> SimplePatsOfPat synArgNameGenerator p - | SynPat.Tuple (ps,m) - | SynPat.Paren(SynPat.Tuple (ps,m),_) -> + | SynPat.Tuple (false,ps,m) + | SynPat.Paren(SynPat.Tuple (false,ps,m),_) -> let ps2,laterf = List.foldBack (fun (p',rhsf) (ps',rhsf') -> @@ -1847,14 +1863,14 @@ let mkSynDotBrackSeqSliceGet m mDot arr (argslist:list) = | SynIndexerArg.One x -> yield x | _ -> () ] if notsliced.Length = argslist.Length then - SynExpr.DotIndexedGet(arr,[SynIndexerArg.One (SynExpr.Tuple(notsliced,[],unionRanges (List.head notsliced).Range (List.last notsliced).Range))],mDot,m) + SynExpr.DotIndexedGet(arr,[SynIndexerArg.One (SynExpr.Tuple(false,notsliced,[],unionRanges (List.head notsliced).Range (List.last notsliced).Range))],mDot,m) else SynExpr.DotIndexedGet(arr,argslist,mDot,m) let mkSynDotParenGet lhsm dotm a b = match b with - | SynExpr.Tuple ([_;_],_,_) -> errorR(Deprecated(FSComp.SR.astDeprecatedIndexerNotation(),lhsm)) ; SynExpr.Const(SynConst.Unit,lhsm) - | SynExpr.Tuple ([_;_;_],_,_) -> errorR(Deprecated(FSComp.SR.astDeprecatedIndexerNotation(),lhsm)) ; SynExpr.Const(SynConst.Unit,lhsm) + | SynExpr.Tuple (false,[_;_],_,_) -> errorR(Deprecated(FSComp.SR.astDeprecatedIndexerNotation(),lhsm)) ; SynExpr.Const(SynConst.Unit,lhsm) + | SynExpr.Tuple (false,[_;_;_],_,_) -> errorR(Deprecated(FSComp.SR.astDeprecatedIndexerNotation(),lhsm)) ; SynExpr.Const(SynConst.Unit,lhsm) | _ -> mkSynInfix dotm a parenGet b let mkSynUnit m = SynExpr.Const(SynConst.Unit,m) @@ -2382,11 +2398,15 @@ let rec synExprContainsError inpExpr = walkExpr e1 || walkExpr e2 | SynExpr.ArrayOrList (_,es,_) - | SynExpr.Tuple (es,_,_) - | SynExpr.StructTuple (es,_,_) -> + | SynExpr.Tuple (_,es,_,_) -> walkExprs es - | SynExpr.Record (_,_,fs,_) -> + | SynExpr.AnonRecd (_,origExpr,flds,_) -> + (match origExpr with Some (e,_) -> walkExpr e | None -> false) || + walkExprs (List.map snd flds) + + | SynExpr.Record (_,origExpr,fs,_) -> + (match origExpr with Some (e,_) -> walkExpr e | None -> false) || let flds = fs |> List.choose (fun (_, v, _) -> v) walkExprs (flds) diff --git a/src/fsharp/fsc.fs b/src/fsharp/fsc.fs index e418b1bb9b1..abcde1f3c5a 100644 --- a/src/fsharp/fsc.fs +++ b/src/fsharp/fsc.fs @@ -296,7 +296,7 @@ module InterfaceFileWriter = fprintfn os "#light" fprintfn os "" - for (TImplFile(_, _, mexpr, _, _)) in declaredImpls do + for (TImplFile(_, _, mexpr, _, _, _)) in declaredImpls do let denv = BuildInitialDisplayEnvForSigFileGeneration tcGlobals writeViaBufferWithEnvironmentNewLines os (fun os s -> Printf.bprintf os "%s\n\n" s) (NicePrint.layoutInferredSigOfModuleExpr true denv infoReader AccessibleFromSomewhere range0 mexpr |> Layout.squashTo 80 |> Layout.showL) @@ -1831,7 +1831,7 @@ let main1(Args (ctok, tcGlobals, tcImports: TcImports, frameworkTcImports, gener // it as the updated global error logger and never remove it let oldLogger = errorLogger let errorLogger = - let scopedPragmas = [ for (TImplFile(_, pragmas, _, _, _)) in typedImplFiles do yield! pragmas ] + let scopedPragmas = [ for (TImplFile(_, pragmas, _, _, _, _)) in typedImplFiles do yield! pragmas ] GetErrorLoggerFilteringByScopedPragmas(true, scopedPragmas, oldLogger) let _unwindEL_3 = PushErrorLoggerPhaseUntilUnwind(fun _ -> errorLogger) @@ -1999,13 +1999,10 @@ let main2b (tcImportsCapture,dynamicAssemblyCreator) (Args (ctok, tcConfig: TcCo let ilxGenerator = CreateIlxAssemblyGenerator (tcConfig, tcImports, tcGlobals, (LightweightTcValForUsingInBuildMethodCall tcGlobals), generatedCcu) 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 -> IsSecurityAttribute tcGlobals (tcImports.GetImportMap()) casApplied a rangeStartup) - - // remove any security attributes from the top-level assembly attribute list + let topAssemblyAttrs = codegenResults.topAssemblyAttrs let topAttrs = {topAttrs with assemblyAttrs=topAssemblyAttrs} - let permissionSets = ilxGenerator.CreatePermissionSets securityAttrs - let secDecls = if List.isEmpty securityAttrs then emptyILSecurityDecls else mkILSecurityDecls permissionSets + let permissionSets = codegenResults.permissionSets + let secDecls = mkILSecurityDecls permissionSets let ilxMainModule = MainModuleBuilder.CreateMainModule (ctok, tcConfig, tcGlobals, tcImports, pdbfile, assemblyName, outfile, topAttrs, idata, optDataResources, codegenResults, assemVerFromAttrib, metadataVersion, secDecls) diff --git a/src/fsharp/fsi/fsi.fs b/src/fsharp/fsi/fsi.fs index 5c797a06f57..b2df5102032 100644 --- a/src/fsharp/fsi/fsi.fs +++ b/src/fsharp/fsi/fsi.fs @@ -1116,7 +1116,7 @@ type internal FsiDynamicCompiler // 'Open' the path for the fragment we just compiled for any future printing. let denv = denv.AddOpenPath (pathOfLid prefixPath) - for (TImplFile(_qname,_,mexpr,_,_)) in declaredImpls do + for (TImplFile(_qname,_,mexpr,_,_,_)) in declaredImpls do let responseL = NicePrint.layoutInferredSigOfModuleExpr false denv infoReader AccessibleFromSomewhere rangeStdin mexpr if not (Layout.isEmptyL responseL) then let opts = valuePrinter.GetFsiPrintOptions() diff --git a/src/fsharp/infos.fs b/src/fsharp/infos.fs index 2a7d82d8afd..508d05003b1 100755 --- a/src/fsharp/infos.fs +++ b/src/fsharp/infos.fs @@ -87,6 +87,8 @@ let GetSuperTypeOfType g amap m ty = Some(g.system_Enum_ty) else Some (g.system_Value_ty) + elif isAnonRecdTy g ty then + Some g.obj_ty elif isRecdTy g ty || isUnionTy g ty then Some g.obj_ty else diff --git a/src/fsharp/layout.fs b/src/fsharp/layout.fs index 0a59e85582a..2ee543d9b1f 100644 --- a/src/fsharp/layout.fs +++ b/src/fsharp/layout.fs @@ -109,6 +109,8 @@ module TaggedTextOps = let rightBracket = Internal.Utilities.StructuredFormat.TaggedTextOps.Literals.rightBracket let leftBrace = Internal.Utilities.StructuredFormat.TaggedTextOps.Literals.leftBrace let rightBrace = Internal.Utilities.StructuredFormat.TaggedTextOps.Literals.rightBrace + let leftBraceBar = Internal.Utilities.StructuredFormat.TaggedTextOps.Literals.leftBraceBar + let rightBraceBar = Internal.Utilities.StructuredFormat.TaggedTextOps.Literals.rightBraceBar let equals = Internal.Utilities.StructuredFormat.TaggedTextOps.Literals.equals let arrow = Internal.Utilities.StructuredFormat.TaggedTextOps.Literals.arrow let questionMark = Internal.Utilities.StructuredFormat.TaggedTextOps.Literals.questionMark diff --git a/src/fsharp/layout.fsi b/src/fsharp/layout.fsi index e2d1bcc7a3b..a9ced6d9f2a 100644 --- a/src/fsharp/layout.fsi +++ b/src/fsharp/layout.fsi @@ -104,6 +104,8 @@ module TaggedTextOps = val rightBracket : TaggedText val leftBrace: TaggedText val rightBrace : TaggedText + val leftBraceBar: TaggedText + val rightBraceBar : TaggedText val leftAngle: TaggedText val rightAngle: TaggedText val equals : TaggedText diff --git a/src/fsharp/lex.fsl b/src/fsharp/lex.fsl index f3842f908e2..62fea65c296 100644 --- a/src/fsharp/lex.fsl +++ b/src/fsharp/lex.fsl @@ -562,11 +562,13 @@ rule token args skip = parse | "=" { EQUALS } | "[" { LBRACK } | "[|" { LBRACK_BAR } + | "{|" { LBRACE_BAR } | "<" { LESS false } | ">" { GREATER false } | "[<" { LBRACK_LESS } | "]" { RBRACK } | "|]" { BAR_RBRACK } + | "|}" { BAR_RBRACE } | ">]" { GREATER_RBRACK } | "{" { LBRACE } | "|" { BAR } diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index 9ca12c58e5f..9e75787d29f 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -197,8 +197,8 @@ let rangeOfLongIdent(lid:LongIdent) = %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 -%token SEMICOLON_SEMICOLON LARROW EQUALS LBRACK LBRACK_BAR LBRACK_LESS LBRACE -%token LBRACE_LESS BAR_RBRACK GREATER_RBRACE UNDERSCORE +%token SEMICOLON_SEMICOLON LARROW EQUALS LBRACK LBRACK_BAR LBRACE_BAR LBRACK_LESS LBRACE +%token BAR_RBRACK BAR_RBRACE UNDERSCORE %token BAR RBRACK RBRACE RBRACE_COMING_SOON RBRACE_IS_HERE MINUS DOLLAR %token GREATER_RBRACK STRUCT SIG %token STATIC MEMBER CLASS ABSTRACT OVERRIDE DEFAULT CONSTRUCTOR INHERIT @@ -1782,10 +1782,10 @@ memberCore: let args = if id.idText = "set" then match args with - | [SynPat.Paren(SynPat.Tuple (indexPats,_),indexPatRange);valuePat] when id.idText = "set" -> - [SynPat.Tuple(indexPats@[valuePat],unionRanges indexPatRange valuePat.Range)] + | [SynPat.Paren(SynPat.Tuple (false,indexPats,_),indexPatRange);valuePat] when id.idText = "set" -> + [SynPat.Tuple(false,indexPats@[valuePat],unionRanges indexPatRange valuePat.Range)] | [indexPat;valuePat] -> - [SynPat.Tuple(args,unionRanges indexPat.Range valuePat.Range)] + [SynPat.Tuple(false,args,unionRanges indexPat.Range valuePat.Range)] | [valuePat] -> [valuePat] | _ -> @@ -1945,11 +1945,11 @@ opt_classDefn: /* An 'inherits' definition in an object type definition */ inheritsDefn: - | INHERIT appTypeNonAtomicDeprecated optBaseSpec + | INHERIT atomTypeNonAtomicDeprecated optBaseSpec { let mDecl = unionRanges (rhs parseState 1) (($2): SynType).Range SynMemberDefn.Inherit($2,$3,mDecl) } - | INHERIT appTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType optBaseSpec + | INHERIT atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType optBaseSpec { let mDecl = unionRanges (rhs parseState 1) $4.Range SynMemberDefn.ImplicitInherit($2,$4,$5,mDecl) } @@ -2081,6 +2081,24 @@ braceFieldDeclList: | LBRACE error rbrace { [] } +anonRecdType: + | STRUCT braceBarFieldDeclListCore + { $2,true } + | braceBarFieldDeclListCore + { $1,false } + +/* The core of a record type definition */ +braceBarFieldDeclListCore: + | LBRACE_BAR recdFieldDeclList bar_rbrace + { $2 } + + | LBRACE_BAR recdFieldDeclList recover + { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBraceBar()) + $2 } + + | LBRACE_BAR error bar_rbrace + { [] } + inlineAssemblyTyconRepr: | HASH stringOrKeywordString HASH { libraryOnlyError (lhs parseState) @@ -2210,8 +2228,8 @@ typeConstraint: | nm -> raiseParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedIdentifier(nm)) } typarAlts: - | typarAlts OR appType { $3::$1 } - | appType { [$1] } + | typarAlts OR appType { $3::$1 } + | appType { [$1] } /* The core of a union type definition */ unionTypeRepr: @@ -2359,7 +2377,7 @@ openDecl: /*-------------------------------------------------------------------------*/ -/* F# Definitions and Expressions */ +/* F# Definitions, Types, Patterns and Expressions */ /* A 'let ...' or 'do ...' statement in the non-#light syntax */ defnBindings: @@ -2472,7 +2490,7 @@ cPrototype: SynExpr.Const(SynConst.String("extern was not given a DllImport attribute",rhs parseState 8),rhs parseState 8), mRhs) (fun attrs vis -> - let bindingId = SynPat.LongIdent (LongIdentWithDots([nm],[]), None, Some noInferredTypars, SynConstructorArgs.Pats [SynPat.Tuple(args,argsm)], vis, nmm) + let bindingId = SynPat.LongIdent (LongIdentWithDots([nm],[]), None, Some noInferredTypars, SynConstructorArgs.Pats [SynPat.Tuple(false,args,argsm)], vis, nmm) let binding = mkSynBinding (xmlDoc, bindingId) (vis, false, false, mBindLhs, NoSequencePointAtInvisibleBinding, Some rty ,rhsExpr, mRhs, [], attrs, None) @@ -2754,9 +2772,9 @@ headBindingPattern: | headBindingPattern BAR headBindingPattern { SynPat.Or($1,$3,rhs2 parseState 1 3) } | headBindingPattern COLON_COLON headBindingPattern - { SynPat.LongIdent (LongIdentWithDots(mkSynCaseName (rhs parseState 2) opNameCons,[]), None, None, SynConstructorArgs.Pats [SynPat.Tuple ([$1;$3],rhs2 parseState 1 3)],None,lhs parseState) } + { SynPat.LongIdent (LongIdentWithDots(mkSynCaseName (rhs parseState 2) opNameCons,[]), None, None, SynConstructorArgs.Pats [SynPat.Tuple (false,[$1;$3],rhs2 parseState 1 3)],None,lhs parseState) } | tuplePatternElements %prec pat_tuple - { SynPat.Tuple(List.rev $1, lhs parseState) } + { SynPat.Tuple(false,List.rev $1, lhs parseState) } | conjPatternElements %prec pat_conj { SynPat.Ands(List.rev $1, lhs parseState) } | constrPattern @@ -2790,7 +2808,7 @@ constrPattern: { let vis,lid = $1 in SynPat.LongIdent (lid,None,$2, $4,vis,lhs parseState) } | atomicPatternLongIdent opt_explicitValTyparDecls2 HIGH_PRECEDENCE_BRACK_APP atomicPatsOrNamePatPairs { let vis,lid = $1 in SynPat.LongIdent (lid,None,$2, $4,vis,lhs parseState) } - | COLON_QMARK atomType %prec pat_isinst + | COLON_QMARK atomTypeOrAnonRecdType %prec pat_isinst { SynPat.IsInst($2,lhs parseState) } | atomicPattern { $1 } @@ -2815,8 +2833,8 @@ atomicPattern: | quoteExpr { SynPat.QuoteExpr($1,lhs parseState) } | CHAR DOT_DOT CHAR { SynPat.DeprecatedCharRange ($1,$3,rhs2 parseState 1 3) } - | LBRACE recordPatternElements rbrace - { $2 } + | LBRACE recordPatternElementsAux rbrace + { let rs,m = $2 in SynPat.Record (rs,m) } | LBRACK listPatternElements RBRACK { SynPat.ArrayOrList(false,$2,lhs parseState) } | LBRACK_BAR listPatternElements BAR_RBRACK @@ -2850,10 +2868,10 @@ atomicPattern: { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) SynPat.Wild (lhs parseState)} | STRUCT LPAREN tupleParenPatternElements rparen - { SynPat.StructTuple(List.rev $3,lhs parseState) } + { SynPat.Tuple(true, List.rev $3,lhs parseState) } | STRUCT LPAREN tupleParenPatternElements recover { reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedParen()); - SynPat.StructTuple(List.rev $3,lhs parseState) } + SynPat.Tuple(true, List.rev $3,lhs parseState) } | STRUCT LPAREN error rparen { (* silent recovery *) SynPat.Wild (lhs parseState) } | STRUCT LPAREN recover @@ -2899,7 +2917,7 @@ parenPattern: | parenPattern BAR parenPattern { SynPat.Or($1,$3,rhs2 parseState 1 3) } | tupleParenPatternElements - { SynPat.Tuple(List.rev $1,lhs parseState) } + { SynPat.Tuple(false,List.rev $1,lhs parseState) } | conjParenPatternElements { SynPat.Ands(List.rev $1,rhs2 parseState 1 3) } | parenPattern COLON typeWithTypeConstraints %prec paren_pat_colon @@ -2909,7 +2927,7 @@ parenPattern: { let lhsm = lhs parseState SynPat.Attrib($2,$1,lhsm) } | parenPattern COLON_COLON parenPattern - { SynPat.LongIdent (LongIdentWithDots(mkSynCaseName (rhs parseState 2) opNameCons,[]), None, None, SynConstructorArgs.Pats [ SynPat.Tuple ([$1;$3],rhs2 parseState 1 3) ],None,lhs parseState) } + { SynPat.LongIdent (LongIdentWithDots(mkSynCaseName (rhs parseState 2) opNameCons,[]), None, None, SynConstructorArgs.Pats [ SynPat.Tuple (false,[$1;$3],rhs2 parseState 1 3) ],None,lhs parseState) } | constrPattern { $1 } tupleParenPatternElements: @@ -2924,9 +2942,6 @@ conjParenPatternElements: | parenPattern AMP parenPattern { $3 :: $1 :: [] } -recordPatternElements: - | recordPatternElementsAux { let rs,m = $1 in SynPat.Record (rs,m) } - recordPatternElementsAux: /* Fix 1190 */ | recordPatternElement opt_seps { [$1],lhs parseState } @@ -3340,7 +3355,7 @@ declExpr: | declExpr COLON_EQUALS declExpr { mkSynInfix (rhs parseState 2) $1 ":=" $3 } | minusExpr LARROW declExprBlock { mkSynAssign $1 $3 } /* | minusExpr LARROW recover { mkSynAssign $1 (arbExpr("assignRhs",rhs parseState 2)) } */ - | tupleExpr %prec expr_tuple { let exprs,commas = $1 in SynExpr.Tuple(List.rev exprs, List.rev commas, (commas.Head, exprs) ||> unionRangeWithListBy (fun e -> e.Range) ) } + | tupleExpr %prec expr_tuple { let exprs,commas = $1 in SynExpr.Tuple(false, List.rev exprs, List.rev commas, (commas.Head, exprs) ||> unionRangeWithListBy (fun e -> e.Range) ) } | declExpr JOIN_IN declExpr { SynExpr.JoinIn($1,rhs parseState 2,$3,unionRanges $1.Range $3.Range) } | declExpr BAR_BAR declExpr { mkSynInfix (rhs parseState 2) $1 "||" $3 } | declExpr INFIX_BAR_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } @@ -3357,7 +3372,7 @@ declExpr: | declExpr GREATER declExpr { mkSynInfix (rhs parseState 2) $1 ">" $3 } | declExpr INFIX_AT_HAT_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } | declExpr PERCENT_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } - | declExpr COLON_COLON declExpr { SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynIdGet (rhs parseState 2) opNameCons,SynExpr.Tuple ([$1;$3],[rhs parseState 2],unionRanges $1.Range $3.Range),unionRanges $1.Range $3.Range) } + | declExpr COLON_COLON declExpr { SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynIdGet (rhs parseState 2) opNameCons,SynExpr.Tuple (false,[$1;$3],[rhs parseState 2],unionRanges $1.Range $3.Range),unionRanges $1.Range $3.Range) } | declExpr PLUS_MINUS_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } | declExpr MINUS declExpr { mkSynInfix (rhs parseState 2) $1 "-" $3 } | declExpr STAR declExpr { mkSynInfix (rhs parseState 2) $1 "*" $3 } @@ -3393,7 +3408,7 @@ declExpr: | declExpr PERCENT_OP OBLOCKEND_COMING_SOON { reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression($2)) exprFromParseError(mkSynInfix (rhs parseState 2) $1 $2 (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) } | declExpr COLON_COLON OBLOCKEND_COMING_SOON { reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("::")) - SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynIdGet (rhs parseState 2) opNameCons,SynExpr.Tuple ([$1;(arbExpr("declExprInfix",(rhs parseState 3).StartRange))],[rhs parseState 2],unionRanges $1.Range (rhs parseState 3).StartRange),unionRanges $1.Range (rhs parseState 3).StartRange) } + SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynIdGet (rhs parseState 2) opNameCons,SynExpr.Tuple (false,[$1;(arbExpr("declExprInfix",(rhs parseState 3).StartRange))],[rhs parseState 2],unionRanges $1.Range (rhs parseState 3).StartRange),unionRanges $1.Range (rhs parseState 3).StartRange) } | declExpr PLUS_MINUS_OP OBLOCKEND_COMING_SOON { reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression($2)) exprFromParseError(mkSynInfix (rhs parseState 2) $1 $2 (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) } | declExpr MINUS OBLOCKEND_COMING_SOON { reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("-")) @@ -3558,10 +3573,10 @@ minusExpr: | AMP_AMP minusExpr { SynExpr.AddressOf(false,$2,rhs parseState 1, unionRanges (rhs parseState 1) $2.Range) } - | NEW appTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType + | NEW atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType { SynExpr.New(false,$2,$4,unionRanges (rhs parseState 1) $4.Range) } - | NEW appTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP error + | NEW atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP error { SynExpr.New(false,$2,arbExpr("minusExpr",(rhs parseState 4)),unionRanges (rhs parseState 1) ($2).Range) } | NEW error @@ -3656,11 +3671,11 @@ atomicExpr: 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 } + { let exprs,commas = $3 in SynExpr.Tuple(true, 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 } + let exprs,commas = $3 in SynExpr.Tuple(true, List.rev exprs, List.rev commas, (commas.Head, exprs) ||> unionRangeWithListBy (fun e -> e.Range) ), false } | atomicExprAfterType { $1,false } @@ -3748,6 +3763,8 @@ atomicExprAfterType: { $1 } | braceExpr { $1 } + | braceBarExpr + { $1 } | NULL { SynExpr.Null(lhs parseState) } | FALSE @@ -3974,6 +3991,10 @@ forLoopRange: | parenPattern EQUALS rangeSequenceExpr { raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedSymbolEqualsInsteadOfIn()) } +forLoopDirection: + | TO { true } + | DOWNTO { false } + inlineAssemblyExpr: | HASH stringOrKeywordString opt_inlineAssemblyTypeArg opt_curriedArgExprs opt_inlineAssemblyReturnTypes HASH { libraryOnlyWarning (lhs parseState) @@ -4009,7 +4030,7 @@ opt_inlineAssemblyReturnTypes: { [] } recdExpr: - | INHERIT appTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP opt_atomicExprAfterType recdExprBindings opt_seps_recd + | INHERIT atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP opt_atomicExprAfterType recdExprBindings opt_seps_recd { let arg = match $4 with None -> mkSynUnit (lhs parseState) | Some e -> e let l = List.rev $5 let dummyField = mkRecdField (LongIdentWithDots([], [])) // dummy identifier, it will be discarded @@ -4017,14 +4038,17 @@ recdExpr: let (_, _, inheritsSep) = List.head l let bindings = List.tail l (Some ($2,arg,rhs2 parseState 2 4, inheritsSep, rhs parseState 1), None, bindings) } + | recdExprCore + { let a,b = $1 in (None, a, b) } +recdExprCore: | appExpr EQUALS declExprBlock recdExprBindings opt_seps_recd { match $1 with | LongOrSingleIdent(false, (LongIdentWithDots(_,_) as f),None,m) -> let f = mkRecdField f let l = List.rev $4 let l = rebindRanges (f, Some $3) l $5 - (None, None, l) + (None, l) | _ -> raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsFieldBinding()) } /* @@ -4036,7 +4060,7 @@ recdExpr: reportParseErrorAt m (FSComp.SR.parsUnderscoreInvalidFieldName()) reportParseErrorAt m (FSComp.SR.parsFieldBinding()) let f = mkUnderscoreRecdField m - (None, None, [ f, None, None ]) } + (None, [ (f, None, None) ]) } | UNDERSCORE EQUALS { let m = rhs parseState 1 @@ -4045,29 +4069,28 @@ recdExpr: reportParseErrorAt (rhs2 parseState 1 2) (FSComp.SR.parsFieldBinding()) - (None, None, [f, None, None]) } + (None, [ (f, None, None) ]) } | UNDERSCORE EQUALS declExprBlock recdExprBindings opt_seps_recd { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnderscoreInvalidFieldName()) let f = mkUnderscoreRecdField (rhs parseState 1) - let l = List.rev $4 let l = rebindRanges (f, Some $3) l $5 - (None, None, l) } + (None, l) } /* handles case like {x with} */ | appExpr WITH recdBinding recdExprBindings opt_seps_recd { let l = List.rev $4 let l = rebindRanges $3 l $5 - (None,Some ($1, (rhs parseState 2, None)), l) } + (Some ($1, (rhs parseState 2, None)), l) } | appExpr OWITH opt_seps_recd OEND - { (None,Some ($1, (rhs parseState 2, None)), []) } + { (Some ($1, (rhs parseState 2, None)), []) } | appExpr OWITH recdBinding recdExprBindings opt_seps_recd OEND { let l = List.rev $4 let l = rebindRanges $3 l $5 - (None,Some ($1, (rhs parseState 2, None)), l) } + (Some ($1, (rhs parseState 2, None)), l) } opt_seps_recd: | seps_recd { Some $1 } @@ -4079,6 +4102,7 @@ seps_recd: | SEMICOLON OBLOCKSEP { (rhs2 parseState 1 2), Some (rhs parseState 1).End } | OBLOCKSEP SEMICOLON { (rhs2 parseState 1 2), Some (rhs parseState 2).End } + /* identifier can start from the underscore */ @@ -4131,19 +4155,19 @@ objExpr: let fullRange = match $3 with [] -> (rhs parseState 1) | _ -> (rhs2 parseState 1 3) fullRange, (fun m -> let (a,b) = $1 in SynExpr.ObjExpr(a,b,[],$3, mNewExpr, m)) } - | NEW appTypeNonAtomicDeprecated + | NEW atomTypeNonAtomicDeprecated { let mNewExpr = rhs parseState 1 (rhs2 parseState 1 2), (fun m -> let (a,b) = $2,None in SynExpr.ObjExpr(a,b,[],[], mNewExpr, m)) } objExprBaseCall: - | NEW appTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType baseSpec + | NEW atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType baseSpec { ($2, Some($4,Some($5))) } - | NEW appTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType + | NEW atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType { ($2, Some($4,None)) } - | NEW appTypeNonAtomicDeprecated + | NEW atomTypeNonAtomicDeprecated { $2,None } @@ -4187,9 +4211,47 @@ objExprInterface: | interfaceMember appType opt_objExprBindings opt_declEnd opt_OBLOCKSEP { InterfaceImpl($2, $3, lhs parseState) } -forLoopDirection: - | TO { true } - | DOWNTO { false } +braceBarExpr: + | STRUCT braceBarExprCore + { $2 true } + | braceBarExprCore + { $1 false } + +braceBarExprCore: + | LBRACE_BAR recdExprCore bar_rbrace + { let orig, flds = $2 + let flds = + flds |> List.choose (function + | ((LongIdentWithDots([id],_),_),Some e,_) -> Some (id,e) + | ((LongIdentWithDots([id],_),_),None,_) -> Some (id, arbExpr("anonField",id.idRange)) + | _ -> reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInvalidAnonRecdType()); None) + let m = rhs2 parseState 1 3 + (fun isStruct -> SynExpr.AnonRecd(isStruct,orig,flds,m)) } + + | LBRACE_BAR recdExprCore recover + { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBraceBar()) + let orig, flds = $2 + let flds = + flds |> List.choose (function + | ((LongIdentWithDots([id],_),_),Some e,_) -> Some (id,e) + | ((LongIdentWithDots([id],_),_),None,_) -> Some (id, arbExpr("anonField",id.idRange)) + | _ -> reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInvalidAnonRecdType()); None) + let m = rhs2 parseState 1 2 + (fun isStruct -> SynExpr.AnonRecd(isStruct,orig,flds,m)) } + + | LBRACE_BAR error bar_rbrace + { // silent recovery + let m = rhs2 parseState 1 3 + (fun _ -> arbExpr("braceBarExpr",m)) } + + | LBRACE_BAR recover + { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBraceBar()) + let m = rhs2 parseState 1 1 + (fun isStruct -> SynExpr.AnonRecd(isStruct,None,[],m)) } + + | LBRACE_BAR bar_rbrace + { let m = rhs2 parseState 1 2 + (fun isStruct -> SynExpr.AnonRecd(isStruct,None,[],m)) } anonLambdaExpr: | FUN atomicPatterns RARROW typedSeqExprBlock @@ -4273,7 +4335,7 @@ topType: topTupleType: | topAppType STAR topTupleTypeElements - { let ty,mdata = $1 in let tys,mdatas = List.unzip $3 in (SynType.Tuple(List.map (fun ty -> (false,ty)) (ty ::tys), lhs parseState)),(mdata :: mdatas) } + { let ty,mdata = $1 in let tys,mdatas = List.unzip $3 in (SynType.Tuple(false,List.map (fun ty -> (false,ty)) (ty ::tys), lhs parseState)),(mdata :: mdatas) } | topAppType { let ty,mdata = $1 in ty,[mdata] } @@ -4323,15 +4385,15 @@ typEOF: tupleType: | appType STAR tupleOrQuotTypeElements - { SynType.Tuple((false,$1) :: $3,lhs parseState) } + { SynType.Tuple(false,(false,$1) :: $3,lhs parseState) } | INFIX_STAR_DIV_MOD_OP tupleOrQuotTypeElements { if $1 <> "/" then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedInfixOperator()); - SynType.Tuple((true, SynType.StaticConstant (SynConst.Int32 1, lhs parseState)):: $2, lhs parseState) } + SynType.Tuple(false,(true, SynType.StaticConstant (SynConst.Int32 1, lhs parseState)):: $2, lhs parseState) } | appType INFIX_STAR_DIV_MOD_OP tupleOrQuotTypeElements { if $2 <> "/" then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedInfixOperator()); - SynType.Tuple((true,$1) :: $3, lhs parseState) } + SynType.Tuple(false,(true,$1) :: $3, lhs parseState) } | appType %prec prec_tuptyp_prefix { $1 } @@ -4347,13 +4409,6 @@ tupleOrQuotTypeElements: | appType %prec prec_tuptyptail_prefix { [(false,$1)] } -tupleTypeElements: - | appType STAR tupleTypeElements - { $1 :: $3 } - - | appType %prec prec_tuptyptail_prefix - { [$1] } - appTypeCon: | path %prec prec_atomtyp_path { SynType.LongIdent($1) } @@ -4427,57 +4482,37 @@ typeArgListElements: { [], [] } powerType: - | atomType + | atomTypeOrAnonRecdType { $1 } - | atomType INFIX_AT_HAT_OP atomicRationalConstant + | atomTypeOrAnonRecdType INFIX_AT_HAT_OP atomicRationalConstant { if $2 <> "^" && $2 <> "^-" then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedInfixOperator()); if $2 = "^-" then SynType.MeasurePower($1, SynRationalConst.Negate($3), lhs parseState) else SynType.MeasurePower($1, $3, lhs parseState) } -/* Like appType but gives a deprecation error when a non-atomic type is used */ -appTypeNonAtomicDeprecated: - | appType arrayTypeSuffix - { deprecatedWithError (FSComp.SR.parsNonAtomicType()) (lhs parseState); - SynType.Array($2,$1,lhs parseState) } - - | appType HIGH_PRECEDENCE_BRACK_APP arrayTypeSuffix /* only HPA for "name[]" allowed here */ - { deprecatedWithError (FSComp.SR.parsNonAtomicType()) (lhs parseState); - SynType.Array($3,$1,lhs parseState) } - - | appType appTypeConPower - { let mWhole = unionRanges (rhs parseState 1) $2.Range // note: use "rhs parseState 1" to deal with parens in "(int) list" - deprecatedWithError (FSComp.SR.parsNonAtomicType()) mWhole; - SynType.App($2, None, [$1], [], None, true, mWhole) } +/* Like appType but gives a deprecation error when a non-atomic type is used */ +/* Also, doesn't start with '{|' */ +atomTypeNonAtomicDeprecated: | LPAREN appTypePrefixArguments rparen appTypeConPower { let args, commas = $2 mlCompatWarning (FSComp.SR.parsMultiArgumentGenericTypeFormDeprecated()) (unionRanges (rhs parseState 1) $4.Range); SynType.App($4, None, args, commas, None, true, unionRanges (rhs parseState 1) $4.Range) } - | powerTypeNonAtomicDeprecated + | atomType { $1 } - | typar COLON_GREATER typ - { deprecatedWithError (FSComp.SR.parsNonAtomicType()) (lhs parseState); - let tp,typ = $1,$3 - let m = lhs parseState - SynType.WithGlobalConstraints(SynType.Var (tp, rhs parseState 1), [WhereTyparSubtypeOfType(tp,typ,m)],m) } - - | UNDERSCORE COLON_GREATER typ %prec COLON_GREATER - { deprecatedWithError (FSComp.SR.parsNonAtomicType()) (lhs parseState); - SynType.HashConstraint($3, lhs parseState) } - -/* Like powerType but gives a deprecation warning if a non-atomic type is used */ -powerTypeNonAtomicDeprecated: +atomTypeOrAnonRecdType: | atomType - { $1 } + { $1 } + | anonRecdType + { let flds,isStruct = $1 + let flds2 = + flds |> List.choose (function + | (Field([],false,Some id,ty,false,_xmldoc,None,_m)) -> Some (id,ty) + | _ -> reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInvalidAnonRecdType()); None) + SynType.AnonRecd (isStruct,flds2, rhs parseState 1) } - | atomType INFIX_AT_HAT_OP atomicRationalConstant - { if $2 <> "^" && $2 <> "^-" then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedInfixOperator()); - deprecatedWithError (FSComp.SR.parsNonAtomicType()) (lhs parseState); - if $2 = "^-" then SynType.MeasurePower($1, SynRationalConst.Negate($3), lhs parseState) - else SynType.MeasurePower($1, $3, lhs parseState) } /* Any tokens in this grammar must be added to the lex filter rule 'peekAdjacentTypars' */ @@ -4500,11 +4535,11 @@ atomType: $2 } | STRUCT LPAREN appType STAR tupleOrQuotTypeElements rparen - { SynType.StructTuple((false,$3) :: $5,lhs parseState) } + { SynType.Tuple(true, (false,$3) :: $5,lhs parseState) } | STRUCT LPAREN appType STAR tupleOrQuotTypeElements recover { reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedParen()) - SynType.StructTuple((false,$3) :: $5,lhs parseState) } + SynType.Tuple(true, (false,$3) :: $5,lhs parseState) } | STRUCT LPAREN appType STAR recover { reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedParen()) @@ -4976,6 +5011,9 @@ rbrace: | RBRACE_IS_HERE { } | RBRACE { } +bar_rbrace: + | BAR_RBRACE { } + rparen: | RPAREN_COMING_SOON rparen { } | RPAREN_IS_HERE { } diff --git a/src/fsharp/service/ServiceAssemblyContent.fs b/src/fsharp/service/ServiceAssemblyContent.fs index 673fe03e060..b85396c26e7 100644 --- a/src/fsharp/service/ServiceAssemblyContent.fs +++ b/src/fsharp/service/ServiceAssemblyContent.fs @@ -555,7 +555,7 @@ module ParsedInput = | SynTypeConstraint.WhereTyparSupportsMember (ts, sign, _) -> List.iter walkType ts; walkMemberSig sign and walkPat = function - | SynPat.Tuple (pats, _) + | SynPat.Tuple (_,pats, _) | SynPat.ArrayOrList (_, pats, _) | SynPat.Ands (pats, _) -> List.iter walkPat pats | SynPat.Named (pat, ident, _, _, _) -> @@ -603,7 +603,7 @@ module ParsedInput = | SynType.LongIdent ident -> addLongIdentWithDots ident | SynType.App (ty, _, types, _, _, _, _) -> walkType ty; List.iter walkType types | SynType.LongIdentApp (_, _, _, types, _, _, _) -> List.iter walkType types - | SynType.Tuple (ts, _) -> ts |> List.iter (fun (_, t) -> walkType t) + | SynType.Tuple (_, ts, _) -> ts |> List.iter (fun (_, t) -> walkType t) | SynType.WithGlobalConstraints (t, typeConstraints, _) -> walkType t; List.iter walkTypeConstraint typeConstraints | _ -> () @@ -641,7 +641,7 @@ module ParsedInput = | SynExpr.TypeTest (e, t, _) | SynExpr.Upcast (e, t, _) | SynExpr.Downcast (e, t, _) -> walkExpr e; walkType t - | SynExpr.Tuple (es, _, _) + | SynExpr.Tuple (_, es, _, _) | Sequentials es | SynExpr.ArrayOrList (_, es, _) -> List.iter walkExpr es | SynExpr.App (_, _, e1, e2, _) @@ -1035,4 +1035,4 @@ module ParsedInput = | _ -> // 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 + Pos = mkPos 1 0 } diff --git a/src/fsharp/service/ServiceDeclarationLists.fs b/src/fsharp/service/ServiceDeclarationLists.fs index fc87de946d1..6c4cf32ed75 100644 --- a/src/fsharp/service/ServiceDeclarationLists.fs +++ b/src/fsharp/service/ServiceDeclarationLists.fs @@ -283,6 +283,10 @@ module internal DescriptionListsImpl = let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] rfinfo.FieldType [], prettyRetTyL + | Item.AnonRecdField(_anonInfo,tys,i, _) -> + let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] tys.[i] + [], prettyRetTyL + | Item.ILField finfo -> let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] (finfo.FieldType(amap,m)) [], prettyRetTyL @@ -403,6 +407,7 @@ module internal DescriptionListsImpl = | Item.UnionCase _ | Item.ActivePatternCase _ -> FSharpGlyph.EnumMember | Item.ExnCase _ -> FSharpGlyph.Exception + | Item.AnonRecdField _ -> FSharpGlyph.Field | Item.RecdField _ -> FSharpGlyph.Field | Item.ILField _ -> FSharpGlyph.Field | Item.Event _ -> FSharpGlyph.Event diff --git a/src/fsharp/service/ServiceInterfaceStubGenerator.fs b/src/fsharp/service/ServiceInterfaceStubGenerator.fs index dccb9a91db9..90a8ae4d7b3 100644 --- a/src/fsharp/service/ServiceInterfaceStubGenerator.fs +++ b/src/fsharp/service/ServiceInterfaceStubGenerator.fs @@ -151,8 +151,8 @@ type internal InterfaceData = None | SynType.Anon _ -> Some "_" - | SynType.Tuple(ts, _) -> - Some (ts |> Seq.choose (snd >> (|TypeIdent|_|)) |> String.concat " * ") + | SynType.AnonRecd (_, ts, _) -> + Some (ts |> Seq.choose (snd >> (|TypeIdent|_|)) |> String.concat "; ") | SynType.Array(dimension, TypeIdent typeName, _) -> Some (sprintf "%s [%s]" typeName (new String(',', dimension-1))) | SynType.MeasurePower(TypeIdent typeName, RationalConst power, _) -> @@ -761,7 +761,7 @@ module internal InterfaceStubGenerator = | SynExpr.Typed(synExpr, _synType, _range) -> walkExpr synExpr - | SynExpr.Tuple(synExprList, _, _range) + | SynExpr.Tuple(_, synExprList, _, _range) | SynExpr.ArrayOrList(_, synExprList, _range) -> List.tryPick walkExpr synExprList diff --git a/src/fsharp/service/ServiceLexing.fs b/src/fsharp/service/ServiceLexing.fs index 6b266bf91ef..5eda7cb31dc 100755 --- a/src/fsharp/service/ServiceLexing.fs +++ b/src/fsharp/service/ServiceLexing.fs @@ -242,16 +242,16 @@ module internal TokenClassifications = | RPAREN | RPAREN_COMING_SOON | RPAREN_IS_HERE -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamEnd ||| FSharpTokenTriggerClass.MatchBraces) - | LBRACK_LESS | LBRACE_LESS + | LBRACK_LESS -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.None ) - | LQUOTE _ | LBRACK | LBRACE | LBRACK_BAR + | LQUOTE _ | LBRACK | LBRACE | LBRACK_BAR | LBRACE_BAR -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.MatchBraces ) - | GREATER_RBRACE | GREATER_RBRACK | GREATER_BAR_RBRACK + | GREATER_RBRACK | GREATER_BAR_RBRACK -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.None ) - | RQUOTE _ | RBRACK | RBRACE | RBRACE_COMING_SOON | RBRACE_IS_HERE | BAR_RBRACK + | RQUOTE _ | RBRACK | RBRACE | RBRACE_COMING_SOON | RBRACE_IS_HERE | BAR_RBRACK | BAR_RBRACE -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.MatchBraces ) | PUBLIC | PRIVATE | INTERNAL | BASE | GLOBAL diff --git a/src/fsharp/service/ServiceParamInfoLocations.fs b/src/fsharp/service/ServiceParamInfoLocations.fs index 23681498fb7..e0e9affd2d5 100755 --- a/src/fsharp/service/ServiceParamInfoLocations.fs +++ b/src/fsharp/service/ServiceParamInfoLocations.fs @@ -96,7 +96,7 @@ module internal NoteworthyParamInfoLocationsImpl = // see bug 345385. let rec searchSynArgExpr traverseSynExpr pos expr = match expr with - | SynExprParen((SynExpr.Tuple(synExprList, commaRanges, _tupleRange) as synExpr), _lpRange, rpRangeOpt, parenRange) -> // tuple argument + | SynExprParen((SynExpr.Tuple(false, synExprList, commaRanges, _tupleRange) as synExpr), _lpRange, rpRangeOpt, parenRange) -> // tuple argument let inner = traverseSynExpr synExpr match inner with | None -> @@ -108,7 +108,7 @@ module internal NoteworthyParamInfoLocationsImpl = NotFound, None | _ -> NotFound, None - | SynExprParen(SynExprParen(SynExpr.Tuple(_, _, _), _, _, _) as synExpr, _, rpRangeOpt, parenRange) -> // f((x, y)) is special, single tuple arg + | SynExprParen(SynExprParen(SynExpr.Tuple(false, _, _, _), _, _, _) as synExpr, _, rpRangeOpt, parenRange) -> // f((x, y)) is special, single tuple arg handleSingleArg traverseSynExpr (pos, synExpr, parenRange, rpRangeOpt) // dig into multiple parens diff --git a/src/fsharp/service/ServiceParseTreeWalk.fs b/src/fsharp/service/ServiceParseTreeWalk.fs index fbd173b1bd2..660528e03ee 100755 --- a/src/fsharp/service/ServiceParseTreeWalk.fs +++ b/src/fsharp/service/ServiceParseTreeWalk.fs @@ -49,48 +49,63 @@ module public AstTraversal = /// traverseSynExpr(subExpr) to recurse deeper on some particular sub-expression based on your own logic /// path helps to track AST nodes that were passed during traversal abstract VisitExpr : TraversePath * (SynExpr -> 'T option) * (SynExpr -> 'T option) * SynExpr -> 'T option + /// VisitTypeAbbrev(ty,m), defaults to ignoring this leaf of the AST abstract VisitTypeAbbrev : SynType * range -> 'T option default this.VisitTypeAbbrev(_ty,_m) = None + /// VisitImplicitInherit(defaultTraverse,ty,expr,m), defaults to just visiting expr abstract VisitImplicitInherit : (SynExpr -> 'T option) * SynType * SynExpr * range -> 'T option default this.VisitImplicitInherit(defaultTraverse, _ty, expr, _m) = defaultTraverse expr + /// VisitModuleDecl allows overriding module declaration behavior abstract VisitModuleDecl : (SynModuleDecl -> 'T option) * SynModuleDecl -> 'T option default this.VisitModuleDecl(defaultTraverse, decl) = defaultTraverse decl + /// VisitBinding allows overriding binding behavior (note: by default it would defaultTraverse expression) abstract VisitBinding : (SynBinding -> 'T option) * SynBinding -> 'T option default this.VisitBinding(defaultTraverse, binding) = defaultTraverse binding + /// VisitMatchClause allows overriding clause behavior (note: by default it would defaultTraverse expression) abstract VisitMatchClause : (SynMatchClause -> 'T option) * SynMatchClause -> 'T option default this.VisitMatchClause(defaultTraverse, mc) = defaultTraverse mc + /// VisitInheritSynMemberDefn allows overriding inherit behavior (by default do nothing) abstract VisitInheritSynMemberDefn : SynComponentInfo * SynTypeDefnKind * SynType * SynMemberDefns * range -> 'T option default this.VisitInheritSynMemberDefn(_componentInfo, _typeDefnKind, _synType, _members, _range) = None + /// VisitInterfaceSynMemberDefnType allows overriding behavior for visiting interface member in types (by default - do nothing) abstract VisitInterfaceSynMemberDefnType : SynType -> 'T option default this.VisitInterfaceSynMemberDefnType(_synType) = None + /// VisitRecordField allows overriding behavior when visiting l.h.s. of constructed record instances abstract VisitRecordField : TraversePath * SynExpr option * LongIdentWithDots option -> 'T option default this.VisitRecordField (_path, _copyOpt, _recordField) = None + /// VisitHashDirective allows overriding behavior when visiting hash directives in FSX scripts, like #r, #load and #I. abstract VisitHashDirective : range -> 'T option default this.VisitHashDirective (_) = None + /// VisitModuleOrNamespace allows overriding behavior when visiting module or namespaces abstract VisitModuleOrNamespace : SynModuleOrNamespace -> 'T option default this.VisitModuleOrNamespace (_) = None + /// VisitComponentInfo allows overriding behavior when visiting type component infos abstract VisitComponentInfo : SynComponentInfo -> 'T option default this.VisitComponentInfo (_) = None + /// VisitLetOrUse allows overriding behavior when visiting module or local let or use bindings 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 + /// VisitPat allows overriding behavior when visiting patterns abstract VisitPat : (SynPat -> 'T option) * SynPat -> 'T option default this.VisitPat (defaultTraverse, pat) = defaultTraverse pat + /// VisitType allows overriding behavior when visiting type hints (x: ..., etc.) abstract VisitType : (SynType -> 'T option) * SynType -> 'T option default this.VisitType (defaultTraverse, ty) = defaultTraverse ty @@ -191,9 +206,25 @@ module public AstTraversal = |> pick expr | SynExpr.Const(_synConst, _range) -> None | SynExpr.Typed(synExpr, synType, _range) -> [ traverseSynExpr synExpr; traverseSynType synType ] |> List.tryPick id - | SynExpr.Tuple(synExprList, _, _range) - | SynExpr.StructTuple(synExprList, _, _range) -> synExprList |> List.map (fun x -> dive x x.Range traverseSynExpr) |> pick expr + | SynExpr.Tuple(_, synExprList, _, _range) | SynExpr.ArrayOrList(_, synExprList, _range) -> synExprList |> List.map (fun x -> dive x x.Range traverseSynExpr) |> pick expr + + | SynExpr.AnonRecd(_isStruct, copyOpt, synExprList, _range) -> + [ match copyOpt with + | Some(expr, (withRange, _)) -> + yield dive expr expr.Range traverseSynExpr + yield dive () withRange (fun () -> + if posGeq pos withRange.End then + // special case: caret is after WITH + // { x with $ } + visitor.VisitRecordField (path, Some expr, None) + else + None + ) + | _ -> () + for (_,x) in synExprList do + yield dive x x.Range traverseSynExpr + ] |> pick expr | SynExpr.Record(inheritOpt,copyOpt,fields, _range) -> [ let diveIntoSeparator offsideColumn scPosOpt copyOpt = @@ -462,8 +493,7 @@ module public AstTraversal = | SynPat.Paren (p, _) -> traversePat p | SynPat.Or (p1, p2, _) -> [ p1; p2] |> List.tryPick traversePat | SynPat.Ands (ps, _) - | SynPat.Tuple (ps, _) - | SynPat.StructTuple (ps, _) + | SynPat.Tuple (_, ps, _) | SynPat.ArrayOrList (_, ps, _) -> ps |> List.tryPick traversePat | SynPat.Attrib (p, _, _) -> traversePat p | SynPat.LongIdent(_, _, _, args, _, _) -> @@ -492,8 +522,7 @@ module public AstTraversal = | SynType.Array (_, ty, _) -> traverseSynType ty | SynType.StaticConstantNamed (ty1, ty2, _) | SynType.MeasureDivide (ty1, ty2, _) -> [ty1; ty2] |> List.tryPick traverseSynType - | SynType.Tuple (tys, _) - | SynType.StructTuple (tys, _) -> tys |> List.map snd |> List.tryPick traverseSynType + | SynType.Tuple (_, tys, _) -> tys |> List.map snd |> List.tryPick traverseSynType | SynType.StaticConstantExpr (expr, _) -> traverseSynExpr [] expr | SynType.Anon _ -> None | _ -> None diff --git a/src/fsharp/service/ServiceStructure.fs b/src/fsharp/service/ServiceStructure.fs index 242c3e74dae..f225c87b6d0 100644 --- a/src/fsharp/service/ServiceStructure.fs +++ b/src/fsharp/service/ServiceStructure.fs @@ -378,8 +378,7 @@ module Structure = // subtract columns so the @@> or @> is not collapsed rcheck Scope.Quote Collapse.Same r (Range.modBoth (if isRaw then 3 else 2) (if isRaw then 3 else 2) r) parseExpr e - | SynExpr.Tuple (es,_,r) - | SynExpr.StructTuple(es,_,r) -> + | SynExpr.Tuple (_, es, _, r) -> rcheck Scope.Tuple Collapse.Same r r List.iter parseExpr es | SynExpr.Paren (e,_,_,_) -> @@ -856,4 +855,4 @@ module Structure = List.iter parseModuleOrNamespaceSigs moduleSigs getCommentRanges sourceLines - acc :> seq<_> \ No newline at end of file + acc :> seq<_> diff --git a/src/fsharp/service/ServiceUntypedParse.fs b/src/fsharp/service/ServiceUntypedParse.fs index e60364e4ddf..62c8892331f 100755 --- a/src/fsharp/service/ServiceUntypedParse.fs +++ b/src/fsharp/service/ServiceUntypedParse.fs @@ -219,15 +219,20 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op yield! walkExpr false e2 | SynExpr.ArrayOrList (_,es,_) - | SynExpr.Tuple (es,_,_) - | SynExpr.StructTuple (es,_,_) -> + | SynExpr.Tuple (_,es,_,_) -> yield! walkExprs es | SynExpr.Record (_,copyExprOpt,fs,_) -> match copyExprOpt with | Some (e,_) -> yield! walkExpr true e | None -> () - yield! walkExprs (List.map (fun (_, v, _) -> v) fs |> List.choose id) + yield! walkExprs (fs |> List.choose p23) + + | SynExpr.AnonRecd (_isStruct, copyExprOpt, fs, _) -> + match copyExprOpt with + | Some (e,_) -> yield! walkExpr true e + | None -> () + yield! walkExprs (fs |> List.map snd) | SynExpr.ObjExpr (_,args,bs,is,_,_) -> match args with @@ -758,7 +763,7 @@ module UntypedParseImpl = List.tryPick walkTyparDecl typars |> Option.orElse (List.tryPick walkTypeConstraint constraints))) |> Option.orElse (List.tryPick walkPat pats) - | SynPat.Tuple(pats, _) -> List.tryPick walkPat pats + | SynPat.Tuple(_,pats, _) -> List.tryPick walkPat pats | SynPat.Paren(pat, _) -> walkPat pat | SynPat.ArrayOrList(_, pats, _) -> List.tryPick walkPat pats | SynPat.IsInst(t, _) -> walkType t @@ -791,7 +796,7 @@ module UntypedParseImpl = | SynType.App(ty, _, types, _, _, _, _) -> walkType ty |> Option.orElse (List.tryPick walkType types) | SynType.LongIdentApp(_, _, _, types, _, _, _) -> List.tryPick walkType types - | SynType.Tuple(ts, _) -> ts |> List.tryPick (fun (_, t) -> walkType t) + | SynType.Tuple(_,ts, _) -> ts |> List.tryPick (fun (_, t) -> walkType t) | SynType.Array(_, t, _) -> walkType t | SynType.Fun(t1, t2, _) -> walkType t1 |> Option.orElse (walkType t2) | SynType.WithGlobalConstraints(t, _, _) -> walkType t @@ -819,7 +824,7 @@ module UntypedParseImpl = | SynExpr.Paren (e, _, _, _) -> walkExprWithKind parentKind e | SynExpr.Quote(_, _, e, _, _) -> walkExprWithKind parentKind e | SynExpr.Typed(e, _, _) -> walkExprWithKind parentKind e - | SynExpr.Tuple(es, _, _) -> List.tryPick (walkExprWithKind parentKind) es + | SynExpr.Tuple(_, es, _, _) -> List.tryPick (walkExprWithKind parentKind) es | SynExpr.ArrayOrList(_, es, _) -> List.tryPick (walkExprWithKind parentKind) es | SynExpr.Record(_, _, fields, r) -> ifPosInRange r (fun _ -> @@ -1093,7 +1098,7 @@ module UntypedParseImpl = let findSetters argList = match argList with - | SynExpr.Paren(SynExpr.Tuple(parameters, _, _), _, _, _) -> + | SynExpr.Paren(SynExpr.Tuple(false, parameters, _, _), _, _, _) -> let setters = HashSet() for p in parameters do match p with @@ -1154,7 +1159,7 @@ module UntypedParseImpl = match path with | TS.Expr(SynExpr.Paren _)::TS.Expr(NewObjectOrMethodCall(args))::_ -> if Option.isSome precedingArgument then None else Some args - | TS.Expr(SynExpr.Tuple (elements, commas, _))::TS.Expr(SynExpr.Paren _)::TS.Expr(NewObjectOrMethodCall(args))::_ -> + | TS.Expr(SynExpr.Tuple (false, elements, commas, _))::TS.Expr(SynExpr.Paren _)::TS.Expr(NewObjectOrMethodCall(args))::_ -> match precedingArgument with | None -> Some args | Some e -> @@ -1259,7 +1264,7 @@ module UntypedParseImpl = match pat with | SynPat.Paren(pat, _) -> match pat with - | SynPat.Tuple(pats, _) -> + | SynPat.Tuple(_, pats, _) -> pats |> List.tryPick visitParam | _ -> visitParam pat | SynPat.Wild(range) when rangeContainsPos range pos -> diff --git a/src/fsharp/service/ServiceXmlDocParser.fs b/src/fsharp/service/ServiceXmlDocParser.fs index 92535f0cecf..0cfd5ec6b7b 100644 --- a/src/fsharp/service/ServiceXmlDocParser.fs +++ b/src/fsharp/service/ServiceXmlDocParser.fs @@ -22,8 +22,7 @@ module XmlDocParsing = | SynPat.Attrib(pat,_attrs,_range) -> digNamesFrom pat | SynPat.LongIdent(_lid,_idOpt,_typDeclsOpt,ConstructorPats pats,_access,_range) -> pats |> List.collect digNamesFrom - | SynPat.Tuple(pats,_range) - | SynPat.StructTuple(pats,_range) -> pats |> List.collect digNamesFrom + | SynPat.Tuple(_,pats,_range) -> pats |> List.collect digNamesFrom | SynPat.Paren(pat,_range) -> digNamesFrom pat | SynPat.OptionalVal (id, _) -> [id.idText] | SynPat.Or _ // no one uses ors in fun decls diff --git a/src/fsharp/symbols/Exprs.fs b/src/fsharp/symbols/Exprs.fs index f6213ef2ff6..ce21f1708eb 100644 --- a/src/fsharp/symbols/Exprs.fs +++ b/src/fsharp/symbols/Exprs.fs @@ -1223,7 +1223,7 @@ and FSharpImplementationFileDeclaration = | InitAction of FSharpExpr and FSharpImplementationFileContents(cenv, mimpl) = - let (TImplFile(qname, _pragmas, ModuleOrNamespaceExprWithSig(_, mdef, _), hasExplicitEntryPoint, isScript)) = mimpl + let (TImplFile(qname, _pragmas, ModuleOrNamespaceExprWithSig(_, mdef, _), hasExplicitEntryPoint, isScript, _anonRecdTypes)) = mimpl let rec getDecls2 (ModuleOrNamespaceExprWithSig(_mty, def, _m)) = getDecls def and getBind (bind: Binding) = let v = bind.Var diff --git a/src/fsharp/symbols/SymbolHelpers.fs b/src/fsharp/symbols/SymbolHelpers.fs index aa3ecc7cab5..f4fb7c02383 100644 --- a/src/fsharp/symbols/SymbolHelpers.fs +++ b/src/fsharp/symbols/SymbolHelpers.fs @@ -361,6 +361,7 @@ module internal SymbolHelpers = | Item.UnionCase(ucinfo, _) -> Some (rangeOfUnionCaseInfo preferFlag ucinfo) | Item.ActivePatternCase apref -> Some (rangeOfValRef preferFlag apref.ActivePatternVal) | Item.ExnCase tcref -> Some tcref.Range + | Item.AnonRecdField (_,_,_,m) -> Some m | Item.RecdField rfinfo -> Some (rangeOfRecdFieldInfo preferFlag rfinfo) | Item.Event einfo -> rangeOfEventInfo preferFlag einfo | Item.ILField _ -> None @@ -427,6 +428,7 @@ module internal SymbolHelpers = | Item.UnqualifiedType(erefs) -> erefs |> List.tryPick computeCcuOfTyconRef | Item.SetterArg (_, item) -> ccuOfItem g item + | Item.AnonRecdField (info, _, _, _) -> Some info.Assembly | Item.TypeVar _ -> None | _ -> None @@ -756,6 +758,8 @@ module internal SymbolHelpers = List.zip pi1s pi2s |> List.forall(fun (pi1, pi2) -> PropInfo.PropInfosUseIdenticalDefinitions pi1 pi2) | Item.Event(evt1), Item.Event(evt2) -> EventInfo.EventInfosUseIdenticalDefintions evt1 evt2 + | Item.AnonRecdField(anon1, _, i1, _), Item.AnonRecdField(anon2, _, i2, _) -> + Tastops.anonInfoEquiv anon1 anon2 && i1 = i2 | Item.CtorGroup(_, meths1), Item.CtorGroup(_, meths2) -> List.zip meths1 meths2 |> List.forall (fun (minfo1, minfo2) -> MethInfo.MethInfosUseIdenticalDefinitions minfo1 minfo2) @@ -789,6 +793,7 @@ module internal SymbolHelpers = | Item.ExnCase(tcref) -> hash tcref.LogicalName | Item.UnionCase(UnionCaseInfo(_, UCRef(tcref, n)), _) -> hash(tcref.Stamp, n) | Item.RecdField(RecdFieldInfo(_, RFRef(tcref, n))) -> hash(tcref.Stamp, n) + | Item.AnonRecdField(anon, _, i, _) -> hash anon.SortedNames.[i] | Item.Event evt -> evt.ComputeHashCode() | Item.Property(_name, pis) -> hash (pis |> List.map (fun pi -> pi.ComputeHashCode())) | Item.UnqualifiedType(tcref :: _) -> hash tcref.LogicalName @@ -869,6 +874,7 @@ module internal SymbolHelpers = | Item.ActivePatternResult(apinfo, _ty, idx, _) -> apinfo.Names.[idx] | Item.ActivePatternCase apref -> FullNameOfItem g (Item.Value apref.ActivePatternVal) + "." + apref.Name | Item.ExnCase ecref -> fullDisplayTextOfExnRef ecref + | Item.AnonRecdField(anon, _argTys, i, _) -> anon.SortedNames.[i] | 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) @@ -1206,6 +1212,17 @@ module internal SymbolHelpers = else FSharpStructuredToolTipElement.Single (layout, xml) + | Item.AnonRecdField(anon, argTys, i, _) -> + let argTy = argTys.[i] + let nm = anon.SortedNames.[i] + let argTy, _ = PrettyTypes.PrettifyType g argTy + let layout = + wordL (tagText (FSComp.SR.typeInfoAnonRecdField())) ^^ + wordL (tagRecordField nm) ^^ + RightL.colon ^^ + NicePrint.layoutType denv argTy + FSharpStructuredToolTipElement.Single (layout, FSharpXmlDoc.None) + // Named parameters | Item.ArgName (id, argTy, _) -> let argTy, _ = PrettyTypes.PrettifyType g argTy @@ -1325,6 +1342,8 @@ module internal SymbolHelpers = | Item.RecdField rfi -> (rfi.TyconRef |> ticksAndArgCountTextOfTyconRef)+"."+rfi.Name |> Some + | Item.AnonRecdField _ -> None + | Item.ILField finfo -> match finfo with | ILFieldInfo(tinfo, fdef) -> diff --git a/src/fsharp/symbols/SymbolPatterns.fs b/src/fsharp/symbols/SymbolPatterns.fs index 74b9bcf60c6..eb12229f7c6 100644 --- a/src/fsharp/symbols/SymbolPatterns.fs +++ b/src/fsharp/symbols/SymbolPatterns.fs @@ -186,7 +186,9 @@ module Symbol = let (|RecordField|_|) (e: FSharpSymbol) = match e with | :? FSharpField as field -> - if field.DeclaringEntity.IsFSharpRecord then Some field else None + match field.DeclaringEntity with + | None -> None + | Some e -> if e.IsFSharpRecord then Some field else None | _ -> None let (|ActivePatternCase|_|) (symbol: FSharpSymbol) = diff --git a/src/fsharp/symbols/Symbols.fs b/src/fsharp/symbols/Symbols.fs index 0df99aa034a..ab4cc75a977 100644 --- a/src/fsharp/symbols/Symbols.fs +++ b/src/fsharp/symbols/Symbols.fs @@ -245,6 +245,8 @@ type FSharpSymbol(cenv: SymbolEnv, item: (unit -> Item), access: (FSharpSymbol - | Item.RecdField rfinfo -> FSharpField(cenv, RecdOrClass rfinfo.RecdFieldRef) :> _ | Item.ILField finfo -> FSharpField(cenv, ILField finfo) :> _ + + | Item.AnonRecdField (anonInfo, tinst, n, m) -> FSharpField(cenv, AnonField (anonInfo, tinst, n, m)) :> _ | Item.Event einfo -> FSharpMemberOrFunctionOrValue(cenv, E einfo, item) :> _ @@ -754,7 +756,7 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) = let isUnresolved() = - entityIsUnresolved v.TyconRef || ValueOption.isNone v.TryUnionCase + entityIsUnresolved v.TyconRef || ValueOption.isNone v.TryUnionCase let checkIsResolved() = checkEntityIsResolved v.TyconRef if ValueOption.isNone v.TryUnionCase then @@ -815,26 +817,43 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) = and FSharpFieldData = + | AnonField of AnonRecdTypeInfo * TTypes * int * range | 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 + | AnonField (anonInfo, tinst, n, m) -> (anonInfo, tinst, n, m) |> Choice3Of3 + | RecdOrClass v -> v.RecdField |> Choice1Of3 + | Union (v, n) -> v.FieldByIndex(n) |> Choice1Of3 + | ILField f -> f |> Choice2Of3 - member x.DeclaringTyconRef = + member x.TryDeclaringTyconRef = match x with - | RecdOrClass v -> v.TyconRef - | Union (v, _) -> v.TyconRef - | ILField f -> f.DeclaringTyconRef + | AnonField _ -> None + | RecdOrClass v -> Some v.TyconRef + | Union (v, _) -> Some v.TyconRef + | ILField f -> Some f.DeclaringTyconRef + +and FSharpAnonRecordTypeDetails(cenv: SymbolEnv, anonInfo: AnonRecdTypeInfo) = + member __.Assembly = FSharpAssembly (cenv, anonInfo.Assembly) + + /// Names of any enclosing types of the compiled form of the anonymous type (if the anonymous type was defined as a nested type) + member __.EnclosingCompiledTypeNames = anonInfo.ILTypeRef.Enclosing + + /// The name of the compiled form of the anonymous type + member __.CompiledName = anonInfo.ILTypeRef.Name + + /// The sorted labels of the anonymous type + member __.SortedFieldNames = anonInfo.SortedNames and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = inherit FSharpSymbol (cenv, (fun () -> match d with + | AnonField (anonInfo, tinst, n, m) -> + Item.AnonRecdField(anonInfo, tinst, n, m) | RecdOrClass v -> checkEntityIsResolved v.TyconRef Item.RecdField(RecdFieldInfo(generalizeTypars v.TyconRef.TyparsNoRange, v)) @@ -852,15 +871,17 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = ) let isUnresolved() = - entityIsUnresolved d.DeclaringTyconRef || + d.TryDeclaringTyconRef |> Option.exists entityIsUnresolved || match d with - | RecdOrClass v -> ValueOption.isNone v.TryRecdField - | Union (v, _) -> ValueOption.isNone v.TryUnionCase + | AnonField _ -> false + | RecdOrClass v -> ValueOption.isNone v.TryRecdField + | Union (v, _) -> ValueOption.isNone v.TryUnionCase | ILField _ -> false let checkIsResolved() = - checkEntityIsResolved d.DeclaringTyconRef + d.TryDeclaringTyconRef |> Option.iter checkEntityIsResolved match d with + | AnonField _ -> () | RecdOrClass v -> if ValueOption.isNone v.TryRecdField then invalidOp (sprintf "The record field '%s' could not be found in the target type" v.FieldName) @@ -874,7 +895,7 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = new (cenv, rfref) = FSharpField(cenv, FSharpFieldData.RecdOrClass(rfref)) member __.DeclaringEntity = - FSharpEntity(cenv, d.DeclaringTyconRef) + d.TryDeclaringTyconRef |> Option.map (fun tcref -> FSharpEntity(cenv, tcref)) member __.IsUnresolved = isUnresolved() @@ -882,32 +903,47 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = member __.IsMutable = if isUnresolved() then false else match d.TryRecdField with - | Choice1Of2 r -> r.IsMutable - | Choice2Of2 f -> not f.IsInitOnly && f.LiteralValue.IsNone + | Choice1Of3 r -> r.IsMutable + | Choice2Of3 f -> not f.IsInitOnly && f.LiteralValue.IsNone + | Choice3Of3 _ -> false member __.IsLiteral = if isUnresolved() then false else match d.TryRecdField with - | Choice1Of2 r -> r.LiteralValue.IsSome - | Choice2Of2 f -> f.LiteralValue.IsSome + | Choice1Of3 r -> r.LiteralValue.IsSome + | Choice2Of3 f -> f.LiteralValue.IsSome + | Choice3Of3 _ -> false member __.LiteralValue = if isUnresolved() then None else match d.TryRecdField with - | Choice1Of2 r -> getLiteralValue r.LiteralValue - | Choice2Of2 f -> f.LiteralValue |> Option.map AbstractIL.ILRuntimeWriter.convFieldInit + | Choice1Of3 r -> getLiteralValue r.LiteralValue + | Choice2Of3 f -> f.LiteralValue |> Option.map AbstractIL.ILRuntimeWriter.convFieldInit + | Choice3Of3 _ -> None member __.IsVolatile = if isUnresolved() then false else match d.TryRecdField with - | Choice1Of2 r -> r.IsVolatile - | Choice2Of2 _ -> false // F# doesn't actually respect "volatile" from other assemblies in any case + | Choice1Of3 r -> r.IsVolatile + | Choice2Of3 _ -> false // F# doesn't actually respect "volatile" from other assemblies in any case + | Choice3Of3 _ -> false member __.IsDefaultValue = if isUnresolved() then false else match d.TryRecdField with - | Choice1Of2 r -> r.IsZeroInit - | Choice2Of2 _ -> false + | Choice1Of3 r -> r.IsZeroInit + | Choice2Of3 _ -> false + | Choice3Of3 _ -> false + + member __.IsAnonRecordField = + match d with + | AnonField _ -> true + | _ -> false + + member __.AnonRecordFieldDetails = + match d with + | AnonField (anonInfo, types, n, _) -> FSharpAnonRecordTypeDetails(cenv, anonInfo), [| for ty in types -> FSharpType(cenv, ty) |], n + | _ -> invalidOp "not an anonymous record field" member __.XmlDocSig = checkIsResolved() @@ -921,6 +957,7 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = SymbolHelpers.GetXmlDocSigOfUnionCaseInfo unionCase | ILField f -> SymbolHelpers.GetXmlDocSigOfILFieldInfo cenv.infoReader range0 f + | AnonField _ -> None match xmlsig with | Some (_, docsig) -> docsig | _ -> "" @@ -928,68 +965,77 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = member __.XmlDoc = if isUnresolved() then XmlDoc.Empty |> makeXmlDoc else match d.TryRecdField with - | Choice1Of2 r -> r.XmlDoc - | Choice2Of2 _ -> XmlDoc.Empty + | Choice1Of3 r -> r.XmlDoc + | Choice2Of3 _ -> XmlDoc.Empty + | Choice3Of3 _ -> XmlDoc.Empty |> makeXmlDoc member __.FieldType = checkIsResolved() let fty = match d.TryRecdField with - | Choice1Of2 r -> r.FormalType - | Choice2Of2 f -> f.FieldType(cenv.amap, range0) + | Choice1Of3 r -> r.FormalType + | Choice2Of3 f -> f.FieldType(cenv.amap, range0) + | Choice3Of3 (_,tinst,n,_) -> tinst.[n] FSharpType(cenv, fty) member __.IsStatic = if isUnresolved() then false else match d.TryRecdField with - | Choice1Of2 r -> r.IsStatic - | Choice2Of2 f -> f.IsStatic + | Choice1Of3 r -> r.IsStatic + | Choice2Of3 f -> f.IsStatic + | Choice3Of3 _ -> false member __.Name = checkIsResolved() match d.TryRecdField with - | Choice1Of2 r -> r.Name - | Choice2Of2 f -> f.FieldName + | Choice1Of3 r -> r.Name + | Choice2Of3 f -> f.FieldName + | Choice3Of3 (anonInfo, _tinst, n, _) -> anonInfo.SortedNames.[n] member __.IsCompilerGenerated = if isUnresolved() then false else match d.TryRecdField with - | Choice1Of2 r -> r.IsCompilerGenerated - | Choice2Of2 _ -> false + | Choice1Of3 r -> r.IsCompilerGenerated + | Choice2Of3 _ -> false + | Choice3Of3 _ -> false member __.IsNameGenerated = if isUnresolved() then false else match d.TryRecdField with - | Choice1Of2 r -> r.rfield_name_generated + | Choice1Of3 r -> r.rfield_name_generated | _ -> false member __.DeclarationLocation = checkIsResolved() match d.TryRecdField with - | Choice1Of2 r -> r.Range - | Choice2Of2 _ -> range0 + | Choice1Of3 r -> r.Range + | Choice2Of3 _ -> range0 + | Choice3Of3 (_anonInfo, _tinst, _n, m) -> m member __.FieldAttributes = if isUnresolved() then makeReadOnlyCollection [] else match d.TryRecdField with - | Choice1Of2 r -> r.FieldAttribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) - | Choice2Of2 _ -> [] + | Choice1Of3 r -> r.FieldAttribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) + | Choice2Of3 _ -> [] + | Choice3Of3 _ -> [] |> makeReadOnlyCollection member __.PropertyAttributes = if isUnresolved() then makeReadOnlyCollection [] else match d.TryRecdField with - | Choice1Of2 r -> r.PropertyAttribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) - | Choice2Of2 _ -> [] + | Choice1Of3 r -> r.PropertyAttribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) + | Choice2Of3 _ -> [] + | Choice3Of3 _ -> [] |> makeReadOnlyCollection member __.Accessibility: FSharpAccessibility = if isUnresolved() then FSharpAccessibility(taccessPublic) else let access = match d.TryRecdField with - | Choice1Of2 r -> r.Accessibility - | Choice2Of2 _ -> taccessPublic + | Choice1Of3 r -> r.Accessibility + | Choice2Of3 _ -> taccessPublic + | Choice3Of3 _ -> taccessPublic FSharpAccessibility(access) member private x.V = d @@ -1001,6 +1047,7 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = match d, uc.V with | RecdOrClass r1, RecdOrClass r2 -> recdFieldRefOrder.Compare(r1, r2) = 0 | Union (u1, n1), Union (u2, n2) -> cenv.g.unionCaseRefEq u1 u2 && n1 = n2 + | AnonField (anonInfo1, _, _, _) , AnonField (anonInfo2, _, _, _) -> x.Name = uc.Name && anonInfoEquiv anonInfo1 anonInfo2 | _ -> false | _ -> false @@ -2032,6 +2079,7 @@ and FSharpType(cenv, ty:TType) = member __.GenericArguments = protect <| fun () -> match stripTyparEqns ty with + | TType_anon (_, tyargs) | 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 @@ -2063,6 +2111,19 @@ and FSharpType(cenv, ty:TType) = | TType_fun _ -> true | _ -> false + member __.IsAnonRecordType = + isResolved() && + protect <| fun () -> + match stripTyparEqns ty with + | TType_anon _ -> true + | _ -> false + + member __.AnonRecordTypeDetails = + protect <| fun () -> + match stripTyparEqns ty with + | TType_anon (anonInfo, _) -> FSharpAnonRecordTypeDetails(cenv, anonInfo) + | _ -> invalidOp "not an anonymous record type" + member __.IsGenericParameter = protect <| fun () -> match stripTyparEqns ty with @@ -2117,6 +2178,7 @@ and FSharpType(cenv, ty:TType) = | TType_tuple (_, l1) -> 10400 + List.sumBy hashType l1 | TType_fun (dty, rty) -> 10500 + hashType dty + hashType rty | TType_measure _ -> 10600 + | TType_anon (_,l1) -> 10800 + List.sumBy hashType l1 hashType ty member x.Format(denv: FSharpDisplayContext) = diff --git a/src/fsharp/symbols/Symbols.fsi b/src/fsharp/symbols/Symbols.fsi index 7b7f565fdcf..3f3a3f0e0eb 100644 --- a/src/fsharp/symbols/Symbols.fsi +++ b/src/fsharp/symbols/Symbols.fsi @@ -401,7 +401,20 @@ and [] public FSharpUnionCase = /// Indicates if the union case is for a type in an unresolved assembly member IsUnresolved : bool +/// A subtype of FSharpSymbol that represents a record or union case field as seen by the F# language +and [] public FSharpAnonRecordTypeDetails = + + /// The assembly where the compiled form of the anonymous type is defined + member Assembly : FSharpAssembly + + /// Names of any enclosing types of the compiled form of the anonymous type (if the anonymous type was defined as a nested type) + member EnclosingCompiledTypeNames : string list + + /// The name of the compiled form of the anonymous type + member CompiledName : string + /// The sorted labels of the anonymous type + member SortedFieldNames : string[] /// A subtype of FSharpSymbol that represents a record or union case field as seen by the F# language and [] public FSharpField = @@ -410,8 +423,14 @@ and [] public FSharpField = internal new : SymbolEnv * RecdFieldRef -> FSharpField internal new : SymbolEnv * UnionCaseRef * int -> FSharpField - /// Get the declaring entity of this field - member DeclaringEntity: FSharpEntity + /// Get the declaring entity of this field, if any. Fields from anonymous types do not have a declaring entity + member DeclaringEntity: FSharpEntity option + + /// Is this a field from an anonymous record type? + member IsAnonRecordField: bool + + /// If the field is from an anonymous record type then get the details of the field including the index in the sorted array of fields + member AnonRecordFieldDetails: FSharpAnonRecordTypeDetails * FSharpType[] * int /// Indicates if the field is declared 'static' member IsMutable: bool @@ -934,6 +953,12 @@ and [] public FSharpType = /// Indicates if the type is a function type. The GenericArguments property returns the domain and range of the function type. member IsFunctionType : bool + /// Indicates if the type is an anonymous record type. The GenericArguments property returns the type instantiation of the anonymous record type + member IsAnonRecordType: bool + + /// Get the details of the anonymous record type. + member AnonRecordTypeDetails: FSharpAnonRecordTypeDetails + /// Indicates if the type is a variable type, whether declared, generalized or an inference type parameter member IsGenericParameter : bool diff --git a/src/fsharp/tast.fs b/src/fsharp/tast.fs index d03c0114dc7..fc8354e3432 100644 --- a/src/fsharp/tast.fs +++ b/src/fsharp/tast.fs @@ -2396,6 +2396,9 @@ and /// isSetProp -- indicates if this is a set of a record field | FSRecdFieldSln of TypeInst * RecdFieldRef * bool + /// Indicates a trait is solved by an F# anonymous record field. + | FSAnonRecdFieldSln of AnonRecdTypeInfo * TypeInst * int + /// ILMethSln(ty, extOpt, ilMethodRef, minst) /// /// Indicates a trait is solved by a .NET method. @@ -3912,6 +3915,11 @@ and /// Indicates the type is built from a named type and a number of type arguments | TType_app of TyconRef * TypeInst + /// TType_anon + /// + /// Indicates the type is an anonymous record type whose compiled representation is located in the given assembly + | TType_anon of AnonRecdTypeInfo * TType list + /// TType_tuple(elementTypes). /// /// Indicates the type is a tuple type. elementTypes must be of length 2 or greater. @@ -3942,6 +3950,7 @@ and | TType_forall (_tps, ty) -> ty.GetAssemblyName() | TType_app (tcref, _tinst) -> tcref.CompilationPath.ILScopeRef.QualifiedName | TType_tuple (_tupInfo, _tinst) -> "" + | TType_anon (anonInfo, _tinst) -> defaultArg anonInfo.Assembly.QualifiedName "" | TType_fun (_d,_r) -> "" | TType_measure _ms -> "" | TType_var tp -> tp.Solution |> function Some sln -> sln.GetAssemblyName() | None -> "" @@ -3960,7 +3969,12 @@ and (match tupInfo with | TupInfo.Const false -> "" | TupInfo.Const true -> "struct ") - + String.concat "," (List.map string tinst) + ")" + + String.concat "," (List.map string tinst) + | TType_anon (anonInfo, tinst) -> + (match anonInfo.TupInfo with + | TupInfo.Const false -> "" + | TupInfo.Const true -> "struct ") + + "{|" + String.concat "," (Seq.map2 (fun nm ty -> nm + " " + string ty + ";") anonInfo.SortedNames 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 -> @@ -3972,7 +3986,50 @@ and and TypeInst = TType list and TTypes = TType list - +and [] AnonRecdTypeInfo = + // Mutability for pickling/unpickling only + { mutable Assembly: CcuThunk + mutable TupInfo: TupInfo + mutable SortedIds: Ident[] + mutable Stamp: Stamp + mutable SortedNames: string[] } + + /// Create an AnonRecdTypeInfo from the basic data + static member Create(ccu: CcuThunk, tupInfo, ids: Ident[]) = + let sortedIds = ids |> Array.sortBy (fun id -> id.idText) + // Hash all the data to form a unique stamp + let stamp = + sha1HashInt64 + [| for c in ccu.AssemblyName do yield byte c; yield byte (int32 c >>> 8); + match tupInfo with + | TupInfo.Const b -> yield (if b then 0uy else 1uy) + for id in sortedIds do + for c in id.idText do yield byte c; yield byte (int32 c >>> 8) |] + let sortedNames = Array.map textOfId sortedIds + { Assembly = ccu; TupInfo = tupInfo; SortedIds = sortedIds; Stamp = stamp; SortedNames = sortedNames } + + /// Get the ILTypeRef for the generated type implied by the anonymous type + member x.ILTypeRef = + let ilTypeName = sprintf "<>f__AnonymousType%s%u`%d'" (match x.TupInfo with TupInfo.Const b -> if b then "1000" else "") (uint32 x.Stamp) x.SortedIds.Length + mkILTyRef(x.Assembly.ILScopeRef,ilTypeName) + + static member NewUnlinked() : AnonRecdTypeInfo = + { Assembly = Unchecked.defaultof<_> + TupInfo = Unchecked.defaultof<_> + SortedIds = Unchecked.defaultof<_> + Stamp = Unchecked.defaultof<_> + SortedNames = Unchecked.defaultof<_> } + + member x.Link d = + let sortedNames = Array.map textOfId d.SortedIds + x.Assembly <- d.Assembly + x.TupInfo <- d.TupInfo + x.SortedIds <- d.SortedIds + x.Stamp <- d.Stamp + x.SortedNames <- sortedNames + + member x.IsLinked = (match x.SortedIds with null -> true | _ -> false) + and [] TupInfo = /// Some constant, e.g. true or false for tupInfo | Const of bool @@ -4651,6 +4708,12 @@ and /// An operation representing the creation of a tuple value | Tuple of TupInfo + /// An operation representing the creation of an anonymous record + | AnonRecd of AnonRecdTypeInfo + + /// An operation representing the get of a property from an anonymous record + | AnonRecdGet of AnonRecdTypeInfo * int + /// An operation representing the creation of an array value | Array @@ -4962,7 +5025,7 @@ and and [] TypedImplFile = - | TImplFile of QualifiedNameOfFile * ScopedPragma list * ModuleOrNamespaceExprWithSig * bool * bool + | TImplFile of QualifiedNameOfFile * ScopedPragma list * ModuleOrNamespaceExprWithSig * bool * bool * StampMap [] member x.DebugText = x.ToString() @@ -5136,6 +5199,7 @@ let arityOfVal (v:Val) = (match v.ValReprInfo with None -> ValReprInfo.emptyValD let tupInfoRef = TupInfo.Const false let tupInfoStruct = TupInfo.Const true +let mkTupInfo b = if b then tupInfoStruct else tupInfoRef let structnessDefault = false let mkRawRefTupleTy tys = TType_tuple (tupInfoRef, tys) let mkRawStructTupleTy tys = TType_tuple (tupInfoStruct, tys) @@ -5145,9 +5209,9 @@ let mkRawStructTupleTy tys = TType_tuple (tupInfoStruct, tys) // make up the entire compilation unit //--------------------------------------------------------------------------- -let mapTImplFile f (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript)) = TImplFile(fragName, pragmas,f moduleExpr,hasExplicitEntryPoint,isScript) -let mapAccImplFile f z (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript)) = let moduleExpr,z = f z moduleExpr in TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript), z -let foldTImplFile f z (TImplFile(_,_,moduleExpr,_,_)) = f z moduleExpr +let mapTImplFile f (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes)) = TImplFile(fragName, pragmas,f moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes) +let mapAccImplFile f z (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes)) = let moduleExpr,z = f z moduleExpr in TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes), z +let foldTImplFile f z (TImplFile(_,_,moduleExpr,_,_,_)) = f z moduleExpr //--------------------------------------------------------------------------- // Equality relations on locally defined things @@ -5775,3 +5839,4 @@ let FSharpOptimizationDataResourceName2 = "FSharpOptimizationInfo." let FSharpSignatureDataResourceName2 = "FSharpSignatureInfo." + diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index 1c840d2c66e..bbf74fa7f7f 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf index cd09b539e4b..30bea05033d 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.en.xlf b/src/fsharp/xlf/FSComp.txt.en.xlf index 69e90b775be..c3b0abe1083 100644 --- a/src/fsharp/xlf/FSComp.txt.en.xlf +++ b/src/fsharp/xlf/FSComp.txt.en.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index cab140a050a..511bc393eee 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index 0ef363d31e4..d7e6d08d667 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf index 5c224442175..841a52a18e4 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf index 168cd7d6efb..f2a04dc7f2d 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf index 3dd8fa16415..09b8d859eb3 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf index a2e4ad8a2b5..0c46c48b78e 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ 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 index b81572e3a73..a5b9ba593fc 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf index e3b2d9f4b51..7df731744aa 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf index 9c9f740dcb7..a686549f230 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ 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 index 180d2f95b6a..5f18ef30785 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ 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 index 6e0f7e50c20..2fafa064dfd 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -7082,6 +7082,41 @@ Active patterns do not have fields. This syntax is invalid. + + Unmatched '{{|' + Unmatched '{{|' + + + + anonymous record field + anonymous record field + + + + Two anonymous record types are from different assemblies '{0}' and '{1}' + Two anonymous record types are from different assemblies '{0}' and '{1}' + + + + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + Two anonymous record types have mismatched sets of field names '{0}' and '{1}' + + + + Invalid anonymous record expression + Invalid anonymous record expression + + + + Invalid anonymous record type + Invalid anonymous record type + + + + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.cs.xlf b/src/fsharp/xlf/FSStrings.cs.xlf index dd20d2c3294..bb6a3c60e9f 100644 --- a/src/fsharp/xlf/FSStrings.cs.xlf +++ b/src/fsharp/xlf/FSStrings.cs.xlf @@ -1617,6 +1617,16 @@ Vnitřní chyba: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.de.xlf b/src/fsharp/xlf/FSStrings.de.xlf index 11c588c25a1..00dd5b0fbfa 100644 --- a/src/fsharp/xlf/FSStrings.de.xlf +++ b/src/fsharp/xlf/FSStrings.de.xlf @@ -1617,6 +1617,16 @@ Interner Fehler: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.en.xlf b/src/fsharp/xlf/FSStrings.en.xlf index c7f55180a55..63b0d8034ca 100644 --- a/src/fsharp/xlf/FSStrings.en.xlf +++ b/src/fsharp/xlf/FSStrings.en.xlf @@ -1617,6 +1617,16 @@ internal error: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.es.xlf b/src/fsharp/xlf/FSStrings.es.xlf index a64fb622684..e1e4326b4a5 100644 --- a/src/fsharp/xlf/FSStrings.es.xlf +++ b/src/fsharp/xlf/FSStrings.es.xlf @@ -1617,6 +1617,16 @@ error interno: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.fr.xlf b/src/fsharp/xlf/FSStrings.fr.xlf index a56bd5baadd..569c0257acf 100644 --- a/src/fsharp/xlf/FSStrings.fr.xlf +++ b/src/fsharp/xlf/FSStrings.fr.xlf @@ -1617,6 +1617,16 @@ erreur interne : {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.it.xlf b/src/fsharp/xlf/FSStrings.it.xlf index b8a0c2aa385..4ef64128be9 100644 --- a/src/fsharp/xlf/FSStrings.it.xlf +++ b/src/fsharp/xlf/FSStrings.it.xlf @@ -1617,6 +1617,16 @@ errore interno: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.ja.xlf b/src/fsharp/xlf/FSStrings.ja.xlf index e2bc61160be..2740c123924 100644 --- a/src/fsharp/xlf/FSStrings.ja.xlf +++ b/src/fsharp/xlf/FSStrings.ja.xlf @@ -1617,6 +1617,16 @@ 内部エラー: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.ko.xlf b/src/fsharp/xlf/FSStrings.ko.xlf index 8f398f713c4..acb740ba27d 100644 --- a/src/fsharp/xlf/FSStrings.ko.xlf +++ b/src/fsharp/xlf/FSStrings.ko.xlf @@ -1617,6 +1617,16 @@ 내부 오류: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.pl.xlf b/src/fsharp/xlf/FSStrings.pl.xlf index b634fb8ab9d..da8dd7e73e3 100644 --- a/src/fsharp/xlf/FSStrings.pl.xlf +++ b/src/fsharp/xlf/FSStrings.pl.xlf @@ -1617,6 +1617,16 @@ błąd wewnętrzny: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.pt-BR.xlf b/src/fsharp/xlf/FSStrings.pt-BR.xlf index 0d185ea82f5..1cbd8517bc5 100644 --- a/src/fsharp/xlf/FSStrings.pt-BR.xlf +++ b/src/fsharp/xlf/FSStrings.pt-BR.xlf @@ -1617,6 +1617,16 @@ erro interno: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.ru.xlf b/src/fsharp/xlf/FSStrings.ru.xlf index ebae0bf0ec3..85e3a05681f 100644 --- a/src/fsharp/xlf/FSStrings.ru.xlf +++ b/src/fsharp/xlf/FSStrings.ru.xlf @@ -1617,6 +1617,16 @@ внутренняя ошибка: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.tr.xlf b/src/fsharp/xlf/FSStrings.tr.xlf index bc70825fa2c..47a73ef8981 100644 --- a/src/fsharp/xlf/FSStrings.tr.xlf +++ b/src/fsharp/xlf/FSStrings.tr.xlf @@ -1617,6 +1617,16 @@ iç hata: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.zh-Hans.xlf b/src/fsharp/xlf/FSStrings.zh-Hans.xlf index 12be2851596..06ec1cc49a1 100644 --- a/src/fsharp/xlf/FSStrings.zh-Hans.xlf +++ b/src/fsharp/xlf/FSStrings.zh-Hans.xlf @@ -1617,6 +1617,16 @@ 内部错误: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.zh-Hant.xlf b/src/fsharp/xlf/FSStrings.zh-Hant.xlf index 81cad28dd59..345e0a78942 100644 --- a/src/fsharp/xlf/FSStrings.zh-Hant.xlf +++ b/src/fsharp/xlf/FSStrings.zh-Hant.xlf @@ -1617,6 +1617,16 @@ 內部錯誤: {0} + + symbol '{|' + symbol '{|' + + + + symbol '|}' + symbol '|}' + + \ No newline at end of file diff --git a/src/utils/sformat.fs b/src/utils/sformat.fs index d2d35117771..7620a2c411c 100644 --- a/src/utils/sformat.fs +++ b/src/utils/sformat.fs @@ -199,6 +199,8 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl let rightBracket = tagPunctuation "]" let leftBrace= tagPunctuation "{" let rightBrace = tagPunctuation "}" + let leftBraceBar = tagPunctuation "{|" + let rightBraceBar = tagPunctuation "|}" let equals = tagOperator "=" let arrow = tagPunctuation "->" let questionMark = tagPunctuation "?" diff --git a/src/utils/sformat.fsi b/src/utils/sformat.fsi index fb768703e17..afdd931f900 100644 --- a/src/utils/sformat.fsi +++ b/src/utils/sformat.fsi @@ -148,6 +148,8 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl val rightBracket : TaggedText val leftBrace: TaggedText val rightBrace : TaggedText + val leftBraceBar: TaggedText + val rightBraceBar : TaggedText val equals : TaggedText val arrow : TaggedText val questionMark : TaggedText diff --git a/tests/fsharp/core/anon/lib.fs b/tests/fsharp/core/anon/lib.fs new file mode 100644 index 00000000000..abeb7711ab9 --- /dev/null +++ b/tests/fsharp/core/anon/lib.fs @@ -0,0 +1,249 @@ + +module AnonLib + + +let failures = ref [] + +let report_failure (s : string) = + stderr.Write" NO: " + stderr.WriteLine s + failures := !failures @ [s] + +let test (s : string) b = + stderr.Write(s) + if b then stderr.WriteLine " OK" + else report_failure (s) + +let check (s:string) x1 x2 = + stderr.Write(s) + if (x1 = x2) then stderr.WriteLine " OK" + else (stderr.WriteLine (sprintf "fail, expected %A, got %A" x2 x1); report_failure (s)) + +let inline getX (x: ^TX) : ^X = + (^TX : (member get_X : unit -> ^X) (x)) + + +let inline Y (x: ^TX) : ^X = + (^TX : (member get_Y : unit -> ^X) (x)) + + +module KindB1 = + + let data1 = {| X = 1 |} + + // Types can be written with the same syntax + let data2 : {| X : int |} = data1 + + // Access is as expected + let f1 (v : {| X : int |}) = v.X + + // Access can be nested + let f2 (v : {| X: {| X : int |} |}) = v.X.X + + // Access can be nested + let f3 (v : {| Y: {| X : int |} |}) = v.Y.X + + // Access can be nested + let f4 (v : {| Y: {| X : 'T |} |}) = v.Y.X + + check "coijoiwcnkc42c2" {| Y = 1; X = "1" |} {| X = "1"; Y = 1 |} + check "coijoiwcnkc42c3" {| Y = 1; X = "1"; Z = 2 |} {| Z = 2; X = "1"; Y = 1 |} + + check "coijoiwcnkwle1" {| a = 1 |} {| a = 1 |} + check "coijoiwcnkwle2" {| a = 2 |} {| a = 2 |} + + check "coijoiwcnkwle3" (sprintf "%A" {| X = 10 |}) "{X = 10;}" + check "coijoiwcnkwle4" (sprintf "%A" {| X = 10; Y = 1 |} |> fun s -> s.Replace("\n","").Replace("\r","")) ("{X = 10; Y = 1;}".Replace("\n","").Replace("\r","")) + check "clekoiew09" (f2 {| X = {| X = 10 |} |}) 10 + check "cewkew0oijew" (f2 {| X = {| X = 20 |} |}) 20 + + check "ceoijew90ewcw1" (FSharp.Reflection.FSharpType.IsRecord(typeof<{| X : int; Y: string |}>)) true + check "ceoijew90ewcw2" (FSharp.Reflection.FSharpType.GetRecordFields(typeof<{| X : int; Y: string |}>).Length) 2 + check "ceoijew90ewcw3" (FSharp.Reflection.FSharpValue.GetRecordFields({| X = 1; Y = "a" |}).Length) 2 + check "ceoijew90ewcw4" (FSharp.Reflection.FSharpType.IsRecord(typeof<{| X : int |}>)) true + check "ceoijew90ewcw5" (FSharp.Reflection.FSharpType.GetRecordFields(typeof<{| X : int |}>).Length) 1 + check "ceoijew90ewcw6" (FSharp.Reflection.FSharpValue.GetRecordFields({| X = 1 |}).Length) 1 + check "ceoijew90ewcw7" (FSharp.Reflection.FSharpValue.GetRecordFields({| X = 1 |}).[0]) (box 1) + + // Equality is possible + check "ceijoewwekcj" {| a = 1-1 |} {| a = Unchecked.defaultof<_> |} + + // Comparison is possible if structural elements are comparable + check "ceijowere9er" ({| a = 1+1 |} > {| a = 0 |}) true + + // Check we can alias these types + type recd1 = {| a : int |} + + // test a generic function + let test7<'T>(x:'T) = {| a = x |} + + // test a generic function + let test8<'T>(x:'T) = {| a = x; b = x |} + + // Properties may satisfy member constraints + // Access code may not be generic except through existing member constraints + + + // To speciy a struct representation use this: + let data3 = struct {| X = 1 |} + + // Types can be written with the same syntax + let data4 : struct {| X : int |} = data3 + + let testConstrainedAccess = getX {| X = 0 |}, getX data1, getX {| X = 2; Y = "2" |} + + check "testConstrainedAccess1" (sprintf "%A" testConstrainedAccess) "(0, 1, 2)" + + let testConstrainedAccess2 = getX (struct {| X = 0 |}), getX data3, getX (struct {| X = 2; Y = "2" |}) + + check "testConstrainedAccess2" (sprintf "%A" testConstrainedAccess2) "(0, 1, 2)" + +module TestInAttributes = + type FooAttribute(ty: System.Type) = + inherit System.Attribute() + member x.Type = ty + + [)>] + type C() = + member x.P = 1 + check "clkwweclk" ((typeof.GetCustomAttributes(typeof,true).[0] :?> FooAttribute).Type) (typeof<{| Field1: int; Field2 : string |}>) + +module KindB2 = + + // Gives object that has full C#-compatibe anonymous metadata. Compiles to an instantiation of a generic type in the declaring assembly with appropriate .NET + // metadata (property names). The types are CLIMutable to be C#-compatible. The identity of the types are implicitly assembly-qualified. + let data1 = {| X = 1 |} + + let data1b = {| Y = 1 |} + + let data1c = {| X = 1; Y = 2 |} + + let data1d = {| X = 1; Y = 3 |} + + // Types can be written with the same syntax + let data2 : {| X : int |} = data1 + + // Struct representations may be specified, though C# doesn't allow them + let data3 = struct {| X = 1; Y = 2 |} + + // Types can be written with the same syntax + let data4 : struct {| X : int; Y : int |} = data3 + + let testAccess = (data4.X, data4.Y, data1.X, data2.X, data3.X, data3.Y) + + printfn "{| X = 10 |} = %A" ({| X = 10 |} ) + printfn "{| X = 10 ; Y = \"abc\" |} = %A" ({| X = 10 ; Y = "abc"|} ) + + let testConstrainedAccess = getX ({| X = 0 |}), getX data1, getX ({| X = 2; Y = "2" |}) + + check "cew9cwoi" testConstrainedAccess (0, 1, 2) + + let testConstrainedAccess2 = getX (struct {| X = 0 |}), getX data3, getX (struct {| X = 2; Y = "2" |}) + + check "cew9cwo3" testConstrainedAccess2 (0, 1, 2) + +module CopyAndUpdateOfAnonRecord = + let data = {| X = 1 |} + let data2 = {| data with Y = "1" |} + let data3 = {| data with X = "3" |} + let data4 = {| data2 with X = "3" |} + check "fewjkvwno31" data.X 1 + check "fewjkvwno32" data2.X 1 + check "fewjkvwno33" data2.Y "1" + check "fewjkvwno34" data3.X "3" + check "fewjkvwno3443" data4.X "3" + check "fewjkvwno3443" data4.Y "1" + +module CopyAndUpdateOfAnonRecordStruct = + let data = struct {| X = 1 |} + let data2 = struct {| data with Y = "1" |} + let data3 = struct {| data with X = "3" |} + let data4 = struct {| data2 with X = "3" |} + check "fewjkvwno311" data.X 1 + check "fewjkvwno322" data2.X 1 + check "fewjkvwno333" data2.Y "1" + check "fewjkvwno344" data3.X "3" + check "fewjkvwno3444" data4.X "3" + check "fewjkvwno3442" data4.Y "1" + +module CopyAndUpdateOfAnonRecordFromRecord = + type Base = { X : int } + let data = { X = 1 } + let data2 = {| data with Y = "1" |} + let data3 = {| data with X = "3" |} + let data4 = {| data2 with X = "3" |} + check "fewjkvwno315" data.X 1 + check "fewjkvwno326" data2.X 1 + check "fewjkvwno337" data2.Y "1" + check "fewjkvwno348" data3.X "3" + check "fewjkvwno344y" data4.X "3" + check "fewjkvwno344b" data4.Y "1" + +module CopyAndUpdateOfAnonRecordFromStructRecord = + [] + type Base = { X : int } + let data = { X = 1 } + let data2 = {| data with Y = "1" |} + let data3 = {| data with X = "3" |} + check "fewjkvwno31q" data.X 1 + check "fewjkvwno32w" data2.X 1 + check "fewjkvwno33ej" data2.Y "1" + check "fewjkvwno34rs" data3.X "3" + +module QuotesNewRecord = + + open FSharp.Quotations + open FSharp.Quotations.Patterns + let ty, args = match <@ {| X = 1; Y = "two" |} @> with NewRecord(a,b) -> a,b + + check "gceoijew90ewcw1" (FSharp.Reflection.FSharpType.IsRecord(ty)) true + check "gceoijew90ewcw2" (FSharp.Reflection.FSharpType.GetRecordFields(ty).Length) 2 + check "gceoijew90ewcw2" ([ for p in FSharp.Reflection.FSharpType.GetRecordFields(ty) -> p.Name ]) [ "X"; "Y" ] + check "gceoijew90ewcw3" args [ <@@ 1 @@>; <@@ "two" @@> ] + +module QuotesNewRecord2 = + + open FSharp.Quotations + open FSharp.Quotations.Patterns + let ty, args = match <@ {| Y = "two"; X = 1 |} @> with NewRecord(a,b) -> a,b + + check "qgceoijew90ewcw1" (FSharp.Reflection.FSharpType.IsRecord(ty)) true + check "qgceoijew90ewcw2" (FSharp.Reflection.FSharpType.GetRecordFields(ty).Length) 2 + // Fields are sorted + check "qgceoijew90ewcw2" ([ for p in FSharp.Reflection.FSharpType.GetRecordFields(ty) -> p.Name ]) [ "X"; "Y" ] + check "qgceoijew90ewcw3" args [ <@@ 1 @@>; <@@ "two" @@> ] + +module QuotesPropertyGet = + + open FSharp.Quotations + open FSharp.Quotations.Patterns + let obj, prop = match <@ {| X = 1; Y = "two" |}.X @> with Patterns.PropertyGet(a,b,[]) -> a,b + + check "wgceoijew90ewcw1" prop.Name "X" + + +module SampleAPI = + + let SampleFunction (arg : {| A: int; B: string |}) = arg.A + arg.B.Length + let SampleFunctionAcceptingList (args : {| A: int; B: string |} list) = args |> List.map (fun arg -> arg.A + arg.B.Length) + let SampleFunctionReturningAnonRecd () = {| A=1; B = "abc" |} + +module SampleAPIStruct = + let SampleFunction (arg : (struct {| A: int; B: string |})) = arg.A + arg.B.Length + let SampleFunctionAcceptingList (args : (struct {| A: int; B: string |}) list) = args |> List.map (fun arg -> arg.A + arg.B.Length) + let SampleFunctionReturningAnonRecd () = struct {| A=1; B = "abc" |} + +module SampleAPITupleStruct = + let SampleFunction ((a,b) : (struct (int * string))) = a + b.Length + let SampleFunctionAcceptingList (args : (struct (int * string)) list) = args |> List.map (fun (struct (a,b)) -> a + b.Length) + let SampleFunctionReturningStructTuple () = struct (1, "abc") + +module SyntaxCornerCaseTests = + + let _ = id<{| X: int |}> {| X = 3 |} + // Check use as type argument + let _ = id<{| X: int |}> {| X = 3 |} + let _ = id<{| X: int; Y: int |}> {| X = 3; Y = 4 |} + let _ = id<{| X: int; Y: int |}> ({| X = 3; Y = 4 |}) + let _ = id (struct {| X = 3; Y = 44 |}) + let _ = id (struct {| X = 3; Y = 4 |}) \ No newline at end of file diff --git a/tests/fsharp/core/anon/test.fsx b/tests/fsharp/core/anon/test.fsx new file mode 100644 index 00000000000..331d522f071 --- /dev/null +++ b/tests/fsharp/core/anon/test.fsx @@ -0,0 +1,83 @@ +// #Regression #Conformance #Accessibility #SignatureFiles #Regression #Records +#if TESTS_AS_APP +module Core_anon +#endif + +open AnonLib +let failures = ref [] + +let report_failure (s : string) = + stderr.Write" NO: " + stderr.WriteLine s + failures := !failures @ [s] + +let test (s : string) b = + stderr.Write(s) + if b then stderr.WriteLine " OK" + else report_failure (s) + +let check (s:string) x1 x2 = + stderr.Write(s) + if (x1 = x2) then stderr.WriteLine " OK" + else (stderr.WriteLine (sprintf "fail, expected %A, got %A" x2 x1); report_failure (s)) + +module Test = + + let testAccess = (KindB1.data1.X, KindB1.data3.X) + + check "coijoiwcnkwle2" (sprintf "%A" KindB1.data1) "{X = 1;}" + +module Tests2 = + + let testAccess = (KindB2.data1.X, KindB2.data3.X, KindB2.data3.Y) + + check "coijoiwcnkwle3" (sprintf "%A" KindB2.data1) "{X = 1;}" + + let _ = (KindB2.data1 = KindB2.data1) + +module MoreTests = + + let testUseInFunctionSignatureOnly (x: {| X1 : int |}) = () + let testUseInReturnSignatureOnly () : {| X2 : int |} = Unchecked.defaultof<_> + let testUseInTypeOfOnly () = typeof<{| X3 : int |}> + + let (x : struct (int * int)) = (3, 4) + let () = match (struct (3,4)) with (a,b) -> () + +module CrossAssemblyTest = + let tests() = + check "vrknvio1" (SampleAPI.SampleFunction {| A=1; B = "abc" |}) 4 // note, this is creating an instance of an anonymous record from another assembly. + check "vrknvio2" (SampleAPI.SampleFunctionAcceptingList [ {| A=1; B = "abc" |}; {| A=2; B = "def" |} ]) [4; 5] // note, this is creating an instance of an anonymous record from another assembly. + check "vrknvio3" (let d = SampleAPI.SampleFunctionReturningAnonRecd() in d.A + d.B.Length) 4 + check "vrknvio4" (let d = SampleAPIStruct.SampleFunctionReturningAnonRecd() in d.ToString().Replace("\n","").Replace("\r","")) """{A = 1; B = "abc";}""" + tests() + +module CrossAssemblyTestStruct = + let tests() = + check "svrknvio1" (SampleAPIStruct.SampleFunction {| A=1; B = "abc" |}) 4 // note, this is creating an instance of an anonymous record from another assembly. The structness is inferred in this case. + check "svrknvio2" (SampleAPIStruct.SampleFunctionAcceptingList [ {| A=1; B = "abc" |}; {| A=2; B = "def" |} ]) [4; 5] // note, this is creating an instance of an anonymous record from another assembly. The structness is inferred in this case. + check "svrknvio3" (let d = SampleAPIStruct.SampleFunctionReturningAnonRecd() in d.A + d.B.Length) 4 + tests() + +module CrossAssemblyTestTupleStruct = + let tests() = + check "svrknvio1" (SampleAPITupleStruct.SampleFunction (1, "abc")) 4 // note, this is creating an instance of an anonymous record from another assembly. The structness is inferred in this case. + check "svrknvio2" (SampleAPITupleStruct.SampleFunctionAcceptingList [ (1, "abc"); (2, "def") ]) [4; 5] // note, this is creating an instance of an anonymous record from another assembly. The structness is inferred in this case. + check "svrknvio3" (match SampleAPITupleStruct.SampleFunctionReturningStructTuple() with (x,y) -> x + y.Length) 4 + check "svrknvio4" (let res = SampleAPITupleStruct.SampleFunctionReturningStructTuple() in match res with (x,y) -> x + y.Length) 4 + tests() + +#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/fsi-load/test.fsx b/tests/fsharp/core/fsi-load/test.fsx index ad2ef3bef5c..f81654365e7 100644 --- a/tests/fsharp/core/fsi-load/test.fsx +++ b/tests/fsharp/core/fsi-load/test.fsx @@ -11,6 +11,9 @@ module OtherModule = let foo () = [ for (k: KeyValuePair) in [] -> () ] + let testAnonRecordInFsi1 (x : {| X : int |}) = () + + let testAnonRecordInFsi2 () : {| X : int |} = failwith "ok" let _ = stdout.WriteLine "Test Passed" diff --git a/tests/fsharp/core/queriesOverIQueryable/test.fsx b/tests/fsharp/core/queriesOverIQueryable/test.fsx index 245c32bb463..472dac742f6 100644 --- a/tests/fsharp/core/queriesOverIQueryable/test.fsx +++ b/tests/fsharp/core/queriesOverIQueryable/test.fsx @@ -142,19 +142,29 @@ module QueryExecutionOverIQueryable = (query { let q = query { for i in db -> i.Name } in for v in q do yield v } ) "db.Select(_arg1 => _arg1.Name).Select(_arg2 => _arg2)" + open FSharp.Reflection + + let t = typeof< {| Name1: string; Name2: string |} > + check "wkcwe09" (FSharpType.IsRecord t) true + check "wkcwe09" (FSharpType.GetRecordFields t |> Array.forall (fun f -> f.CanWrite)) false + +// checkLinqQueryText "ltcjhnwec6" +// (query { for i in db -> {| Name1 = i.Name; Name2 = i.Name |} } ) +// "db.Select(_arg1 => _arg1.Name).Select(_arg2 => _arg2)" +// "System.Linq.Enumerable+WhereSelectEnumerableIterator`2[Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`2[System.String,System.String],<>f__AnonymousType3691853213`2'[System.String,System.String]].Select(_arg2 => _arg2)" + checkCommuteSeq "cnewnc03nested" (query { let q = query { for i in db -> i.Name } in for v in q do yield v } ) (seq { for i in db -> i.Name }) - //type R = { A : int; B : int } - //let db2 = [ { A = 1; B = 2 } ] - //let results = query { for (i: MutTup) in db2 -> (i,i) } - - //System.Linq.Queryable.GroupBy( checkCommuteSeq "cnewnc06y" (query { for i in db do for j in db do yield (i.Name,j.Name) }) (seq { for i in db do for j in db do yield (i.Name,j.Name) }) + checkCommuteSeq "cnewnc06y" + (query { for i in db do for j in db do yield {| Name1 = i.Name; Name2 = j.Name |} }) + (seq { for i in db do for j in db do yield {| Name1 = i.Name; Name2 = j.Name |} }) + checkCommuteSeq "cnewnc06ynested" (query { let q = query { for i in db do for j in db do yield (i.Name,j.Name) } in for v in q do yield v }) (seq { for i in db do for j in db do yield (i.Name,j.Name) }) @@ -286,44 +296,10 @@ module QueryExecutionOverIQueryable = take 2 }) ["Don"; "Peter"] - (* - checkCommuteSeq "cnewnc06ya3b" - (query { for i in db do - yield i.Name - distinct } |> Seq.toList) - ["Don"; "Peter"; "Freddy"; "Freddi"] - *) - -#if ZIP - checkCommuteSeq "cnewnc06ya3c" - (query { for i in [1;2;3;4] do - zip [4;3;2;1] into j - yield (i,j) } |> Seq.toList) - [(1, 4); (2, 3); (3, 2); (4, 1)] - - checkCommuteSeq "cnewnc06y43" - (query { for i in [1;2;3;4] do - zip [4;3;2;1;0] into j - yield (i,j) } |> Seq.toList) - [(1, 4); (2, 3); (3, 2); (4, 1)] - - checkCommuteSeq "cnewnc06y43b" - (query { for i in [1;2;3;4] do - zip [4;3;2] into j - yield (i,j) } |> Seq.toList) - [(1, 4); (2, 3); (3, 2)] - - checkCommuteSeq "cnewnc06y43c" - (query { for i in db do - zip db into j - yield (i.Name,j.Name.Length) } |> Seq.toList) - [("Don", 3); ("Peter", 5); ("Freddy", 6); ("Freddi", 6); ("Don", 3)] - -#endif - checkLinqQueryText "ltcjhnwecd" (query { for i in db do where true; take 3 }) "db.Where(i => True).Take(3)" + checkCommuteSeq "cnewnc06yb" (query { for i in db do groupBy i.Name } |> Seq.map (fun g -> (g.Key,Seq.toList g)) |> System.Linq.Queryable.AsQueryable) (seq { for i in db do yield i } |> Seq.groupBy (fun i -> i.Name) |> Seq.map (fun (key,g) -> (key, Seq.toList g))) @@ -894,8 +870,6 @@ module QueryExecutionOverIQueryable = (query { for i in db do groupValBy i i.Name }) "db.GroupBy(i => i.Name, i => i)" - - checkLinqQueryText "ltcnewnc06yb2x" (query { for i in db do for j in db do groupValBy j i.Name }) "db.SelectMany(_arg1 => db, (_arg1, _arg2) => new AnonymousObject`2(Item1 = _arg1, Item2 = _arg2)).GroupBy(tupledArg => tupledArg.Item1.Name, tupledArg => tupledArg.Item2)" @@ -980,9 +954,6 @@ module QueryExecutionOverIQueryable = yield (i.Cost + j.Cost) }) "db.Join(db, i => i.Quantity, j => j.Quantity, (i, j) => new AnonymousObject`2(Item1 = i, Item2 = j)).Select(_arg1 => (_arg1.Item1.Cost + _arg1.Item2.Cost))" - - - checkLinqQueryText "ltcnewnc06yh9Q5" (query { for i in db do groupJoin j in db on (i.Name = j.Name) into group @@ -996,8 +967,6 @@ module QueryExecutionOverIQueryable = yield group } ) "db.Select(_arg1 => new AnonymousObject`2(Item1 = _arg1, Item2 = _arg1.Name)).GroupJoin(db, tupledArg => tupledArg.Item2, j => j.Name, (tupledArg, group) => new AnonymousObject`3(Item1 = tupledArg.Item1, Item2 = tupledArg.Item2, Item3 = group)).Select(_arg2 => _arg2.Item3)" - - checkLinqQueryText "ltcnewnc06yh9Q6" (query { for i in db do groupJoin j in db on (i.Quantity ?= j.Quantity.GetValueOrDefault()) into group @@ -1027,8 +996,6 @@ module QueryExecutionOverIQueryable = yield group } ) "db.Select(_arg1 => new AnonymousObject`2(Item1 = _arg1, Item2 = _arg1.Name)).GroupJoin(db, tupledArg => tupledArg.Item2, j => j.Name, (tupledArg, group) => new AnonymousObject`3(Item1 = tupledArg.Item1, Item2 = tupledArg.Item2, Item3 = group.DefaultIfEmpty())).Select(_arg2 => _arg2.Item3)" - - check "cnewnc06yh9Q5" (query { for i in db do groupJoin j in db on (i.Name = j.Name) into group @@ -1052,10 +1019,6 @@ module QueryExecutionOverIQueryable = (query { for i in db do groupJoin j in db on (i.Quantity ?=? j.Quantity) into group; yield group |> Seq.map (fun x -> x.Name) |> Seq.toList } |> Seq.toList) [[]; ["Peter"]; []; ["Freddi"]; []] - - - - check "cnewnc06yh9Q5left1" (query { for i in db do leftOuterJoin j in db on (i.Name = j.Name) into group @@ -1068,9 +1031,6 @@ module QueryExecutionOverIQueryable = yield (i, group |> Seq.toList) } |> Seq.toList) [("1", ["1";"12"]); ("2", [null]) ] - - - // Smoke test for returning a tuple checkCommuteSeq "smcnewnc01a" (query { yield (1,1) } ) @@ -1162,8 +1122,6 @@ module QueryExecutionOverIQueryable = (query { for x in db do yield (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) }) (seq { for x in db do yield (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) }) - - // Smoke test for returning a tuple, nested for loops checkCommuteSeq "smcnewnc01xx" (query { for x in db do for y in db do yield (1,1) }) @@ -1194,12 +1152,10 @@ module QueryExecutionOverIQueryable = (query { for x in db do for y in db do yield (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) }) (seq { for x in db do for y in db do yield (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) }) - type R1 = { V1 : int } type R7 = { V1 : int; V2 : int; V3 : int; V4 : int; V5 : int; V6 : int; V7 : int } type R8 = { V1 : int; V2 : int; V3 : int; V4 : int; V5 : int; V6 : int; V7 : int; V8 : int } - // Smoke test for returning an immutable record object, size = 1 checkCommuteSeq "rsmcnewnc01" (query { yield { R1.V1=1 } } |> Seq.map (fun r -> r.V1) |> System.Linq.Queryable.AsQueryable) @@ -1262,7 +1218,6 @@ module QueryExecutionOverIQueryable = (query { yield { MR8.V1=1; MR8.V2=2; MR8.V3=3; MR8.V4=4; MR8.V5=5; MR8.V6=6; MR8.V7=7; MR8.V8=8 } } |> qmap (fun r -> r.V1, r.V2)) [1,2;] - // Smoke test for returning a mutable record object, size = 1 checkCommuteSeq "mrsmcnewnc01x" (query { for x in db do yield { MR1.V1=1 } } |> qmap (fun r -> r.V1)) @@ -1289,6 +1244,37 @@ module QueryExecutionOverIQueryable = (seq { for x in db do yield { MR8.V1=1; MR8.V2=2; MR8.V3=3; MR8.V4=4; MR8.V5=5; MR8.V6=6; MR8.V7=7; MR8.V8=8 } } |> Seq.map (fun r -> r.V1, r.V2)) + // Smoke test for returning an immutable anonymous record object, size = 1 + checkCommuteSeq "rsmcnewnc01" + (query { yield {| V1=1 |} } |> Seq.map (fun r -> r.V1) |> System.Linq.Queryable.AsQueryable) + [1;] + + // Smoke test for returning an immutable anonymous record object, size = 7 + checkCommuteSeq "rsmcnewnc07" + (query { yield {| V1=1; V2=2; V3=3; V4=4; V5=5; V6=6; V7=7 |} } |> qmap (fun r -> r.V1, r.V2) |> System.Linq.Queryable.AsQueryable) + [1,2;] + + // Smoke test for returning an immutable anonymous record object, size = 8 + checkCommuteSeq "rsmcnewnc08" + (query { yield {| V1=1; V2=2; V3=3; V4=4; V5=5; V6=6; V7=7; V8=8 |} } |> qmap (fun r -> r.V1, r.V2) |> System.Linq.Queryable.AsQueryable) + [1,2;] + + + // Smoke test for returning an immutable anonymous record object, size = 1 + checkCommuteSeq "rsmcnewnc01x" + (query { for x in db do yield {| V1=1 |} } |> qmap (fun r -> r.V1)) + (seq { for x in db do yield {| V1=1 |} } |> Seq.map (fun r -> r.V1)) + + // Smoke test for returning an immutable anonymous record object, size = 7 + checkCommuteSeq "rsmcnewnc07x" + (query { for x in db do yield {| V1=1; V2=2; V3=3; V4=4; V5=5; V6=6; V7=7 |} } |> qmap (fun r -> r.V1, r.V2) |> System.Linq.Queryable.AsQueryable) + (seq { for x in db do yield {| V1=1; V2=2; V3=3; V4=4; V5=5; V6=6; V7=7 |} } |> Seq.map (fun r -> r.V1, r.V2)) + + // Smoke test for returning an immutable anonymous record object, size = 8 + checkCommuteSeq "rsmcnewnc08x" + (query { for x in db do yield {| V1=1; V2=2; V3=3; V4=4; V5=5; V6=6; V7=7; V8=8 |} } |> qmap (fun r -> r.V1, r.V2)) + (seq { for x in db do yield {| V1=1; V2=2; V3=3; V4=4; V5=5; V6=6; V7=7; V8=8 |} } |> Seq.map (fun r -> r.V1, r.V2)) + // Smoke test for returning an object using property-set notation for member init, size = 8 type C1() = let mutable v1 = 0 @@ -1302,8 +1288,6 @@ module QueryExecutionOverIQueryable = (query { for x in db do yield C1(V1=1) } |> qmap (fun r -> r.V1)) (seq { for x in db do yield C1(V1=1) } |> Seq.map (fun r -> r.V1)) - //<@ C1(V1=1) @> - // Smoke test for returning an object using property-set notation for member init type C2() = let mutable v1 = 0 @@ -1351,8 +1335,6 @@ module QueryExecutionOverIQueryable = (query { for i in db -> (i, i) }) (seq { for i in db -> (i,i) }) - - checkCommuteSeq "smcnewnc022df1" (query { for p in db do groupBy p.Name into g @@ -1367,9 +1349,6 @@ module QueryExecutionOverIQueryable = select (g.Key, s) }) [("Don", 0s); ("Peter", 10s); ("Freddy", 0s); ("Freddi", 32s)] - - - module QueryExecutionOverIQueryableWhereDataIsRecord = open System open Microsoft.FSharp.Linq @@ -1390,7 +1369,6 @@ module QueryExecutionOverIQueryableWhereDataIsRecord = let dbEmpty = System.Linq.Queryable.AsQueryable([] |> List.toSeq) let dbOne = System.Linq.Queryable.AsQueryable([1] |> List.toSeq) - checkCommuteSeq "rrcnewnc01" (query { yield! db }) db diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs index d29f92e5e79..4dbb5242b59 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -31,6 +31,8 @@ module CoreTests = // These tests are enabled for .NET Framework and .NET Core [] let ``access-FSC_BASIC``() = singleTestBuildAndRun "core/access" FSC_BASIC + + // All tests below here are known to pass for .NET Core but not yet enabled due to CI problems [] let ``access-FSI_BASIC``() = singleTestBuildAndRun "core/access" FSI_BASIC @@ -322,6 +324,36 @@ module CoreTests = #if !FSHARP_SUITE_DRIVES_CORECLR_TESTS + // These tests are enabled for .NET Framework and .NET Core + [] + let ``anon-FSC_BASIC``() = + let cfg = testConfig "core/anon" + + fsc cfg "%s -a -o:lib.dll" cfg.fsc_flags ["lib.fs"] + + copy_y cfg (cfg.FSCBinPath ++ "System.ValueTuple.dll") ("." ++ "System.ValueTuple.dll") + peverify cfg "lib.dll" + + fsc cfg "%s -r:lib.dll" cfg.fsc_flags ["test.fsx"] + + peverify cfg "test.exe" + + begin + use testOkFile = fileguard cfg "test.ok" + + exec cfg ("." ++ "test.exe") "" + + testOkFile.CheckExists() + end + + begin + use testOkFile = fileguard cfg "test.ok" + + fsi cfg "-r:lib.dll" ["test.fsx"] + + testOkFile.CheckExists() + end + [] let events () = let cfg = testConfig "core/events" @@ -2410,6 +2442,18 @@ module TypecheckTests = [] let ``type check neg110`` () = singleNegTest (testConfig "typecheck/sigs") "neg110" + [] + let ``type check neg113`` () = singleNegTest (testConfig "typecheck/sigs") "neg113" + + [] + let ``type check neg114`` () = singleNegTest (testConfig "typecheck/sigs") "neg114" + + [] + let ``type check neg_anon_1`` () = singleNegTest (testConfig "typecheck/sigs") "neg_anon_1" + + [] + let ``type check neg_anon_2`` () = singleNegTest (testConfig "typecheck/sigs") "neg_anon_2" + [] let ``type check neg_issue_3752`` () = singleNegTest (testConfig "typecheck/sigs") "neg_issue_3752" diff --git a/tests/fsharp/typecheck/sigs/neg104.bsl b/tests/fsharp/typecheck/sigs/neg104.bsl index aa804860dfc..022a8e3e4b2 100644 --- a/tests/fsharp/typecheck/sigs/neg104.bsl +++ b/tests/fsharp/typecheck/sigs/neg104.bsl @@ -17,4 +17,4 @@ 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(36,1,36,1): 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 index ee35527a251..98c09fb1056 100644 --- a/tests/fsharp/typecheck/sigs/neg104.fs +++ b/tests/fsharp/typecheck/sigs/neg104.fs @@ -32,4 +32,4 @@ module C = let a (x: AT) = async { let! match! = x let! x = match! - return () } \ No newline at end of file + return () } diff --git a/tests/fsharp/typecheck/sigs/neg104.vsbsl b/tests/fsharp/typecheck/sigs/neg104.vsbsl index 1fe8b3683ef..e4e6e79397a 100644 --- a/tests/fsharp/typecheck/sigs/neg104.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg104.vsbsl @@ -17,7 +17,7 @@ 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(36,1,36,1): 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 diff --git a/tests/fsharp/typecheck/sigs/neg113.bsl b/tests/fsharp/typecheck/sigs/neg113.bsl new file mode 100644 index 00000000000..211ba670f91 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg113.bsl @@ -0,0 +1,24 @@ + +neg113.fs(5,50,5,61): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["a"; "b"]' and '["a"]' + +neg113.fs(7,41,7,52): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["b"]' and '["a"]' + +neg113.fs(10,27,10,55): typecheck error FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion + +neg113.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type + '{|b : int|}' +is not compatible with type + '{|a : int|}' + + +neg113.fs(13,27,13,62): typecheck error FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion + +neg113.fs(13,27,13,62): typecheck error FS0193: Type constraint mismatch. The type + '{|a : int ; b : int|}' +is not compatible with type + '{|a : int|}' + + +neg113.fs(18,34,18,36): typecheck error FS0001: The type '('a -> 'a)' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + +neg113.fs(20,42,20,44): typecheck error FS0001: The type '('a -> 'a)' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface diff --git a/tests/fsharp/typecheck/sigs/neg113.fs b/tests/fsharp/typecheck/sigs/neg113.fs new file mode 100644 index 00000000000..4979cea70bd --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg113.fs @@ -0,0 +1,20 @@ + +module M + + // Check we get compile-time errors + let negTypeTest1() = ({| a = 1+1; b = 2 |} = {| a = 2 |}) + + let negTypeTest2() = ({| b = 2 |} = {| a = 2 |} ) + + // no subsumption + let negTypeTest3() = ({| b = 2 |} :> {| a : int |} ) + + // no subsumption + let negTypeTest4() = ({| b = 2; a = 1 |} :> {| a : int |} ) + + let posgTypeTest5() = ({| b = 2; a = 1 |} = {| a = 1; b = 2 |} ) + + // Comparison is not possible if structural elements are comparable + let negTypeTest6() = ({| a = id |} > {| a = id |}) + + let negTypeTest7() = (compare {| a = id |} {| a = id |}) \ No newline at end of file diff --git a/tests/fsharp/typecheck/sigs/neg113.vsbsl b/tests/fsharp/typecheck/sigs/neg113.vsbsl new file mode 100644 index 00000000000..211ba670f91 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg113.vsbsl @@ -0,0 +1,24 @@ + +neg113.fs(5,50,5,61): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["a"; "b"]' and '["a"]' + +neg113.fs(7,41,7,52): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["b"]' and '["a"]' + +neg113.fs(10,27,10,55): typecheck error FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion + +neg113.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type + '{|b : int|}' +is not compatible with type + '{|a : int|}' + + +neg113.fs(13,27,13,62): typecheck error FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion + +neg113.fs(13,27,13,62): typecheck error FS0193: Type constraint mismatch. The type + '{|a : int ; b : int|}' +is not compatible with type + '{|a : int|}' + + +neg113.fs(18,34,18,36): typecheck error FS0001: The type '('a -> 'a)' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + +neg113.fs(20,42,20,44): typecheck error FS0001: The type '('a -> 'a)' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface diff --git a/tests/fsharp/typecheck/sigs/neg114.bsl b/tests/fsharp/typecheck/sigs/neg114.bsl new file mode 100644 index 00000000000..f69db960676 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg114.bsl @@ -0,0 +1,20 @@ + +neg114.fs(6,38,6,39): parse error FS0010: Unexpected symbol '}' in binding. Expected '|}' or other token. + +neg114.fs(6,29,6,31): parse error FS0605: Unmatched '{|' + +neg114.fs(8,5,8,8): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (6:29). Try indenting this token further or using standard formatting conventions. + +neg114.fs(10,5,10,9): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (8:5). Try indenting this token further or using standard formatting conventions. + +neg114.fs(10,5,10,9): parse error FS0010: Unexpected keyword 'type' in binding. Expected incomplete structured construct at or before this point or other token. + +neg114.fs(6,5,6,8): parse error FS3118: 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. + +neg114.fs(10,25,10,26): parse error FS0010: Unexpected symbol '}' in type definition. Expected '|}' or other token. + +neg114.fs(10,14,10,16): parse error FS0605: Unmatched '{|' + +neg114.fs(12,5,12,8): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (10:14). Try indenting this token further or using standard formatting conventions. + +neg114.fs(13,1,13,1): parse error FS0010: Incomplete structured construct at or before this point in implementation file diff --git a/tests/fsharp/typecheck/sigs/neg114.fs b/tests/fsharp/typecheck/sigs/neg114.fs new file mode 100644 index 00000000000..98c907e65d3 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg114.fs @@ -0,0 +1,12 @@ + +module M + + + // Check we get parsing error and decent recovery + let negParsingTest2() = {| b = 2 } + + let normalCode1() = () + // Check we get parsing error and decent recovery + type X = {| A : int } + + let normalCode2() = () diff --git a/tests/fsharp/typecheck/sigs/neg114.vsbsl b/tests/fsharp/typecheck/sigs/neg114.vsbsl new file mode 100644 index 00000000000..1573127e3b5 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg114.vsbsl @@ -0,0 +1,24 @@ + +neg114.fs(6,38,6,39): parse error FS0010: Unexpected symbol '}' in binding. Expected '|}' or other token. + +neg114.fs(6,29,6,31): parse error FS0605: Unmatched '{|' + +neg114.fs(8,5,8,8): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (6:29). Try indenting this token further or using standard formatting conventions. + +neg114.fs(10,5,10,9): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (8:5). Try indenting this token further or using standard formatting conventions. + +neg114.fs(10,5,10,9): parse error FS0010: Unexpected keyword 'type' in binding. Expected incomplete structured construct at or before this point or other token. + +neg114.fs(6,5,6,8): parse error FS3118: 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. + +neg114.fs(10,25,10,26): parse error FS0010: Unexpected symbol '}' in type definition. Expected '|}' or other token. + +neg114.fs(10,14,10,16): parse error FS0605: Unmatched '{|' + +neg114.fs(12,5,12,8): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (10:14). Try indenting this token further or using standard formatting conventions. + +neg114.fs(13,1,13,1): parse error FS0010: Incomplete structured construct at or before this point in implementation file + +neg114.fs(10,10,10,11): typecheck error FS0964: Type abbreviations cannot have augmentations + +neg114.fs(12,5,12,27): typecheck error FS0912: This declaration element is not permitted in an augmentation diff --git a/tests/fsharp/typecheck/sigs/neg_anon_1.bsl b/tests/fsharp/typecheck/sigs/neg_anon_1.bsl new file mode 100644 index 00000000000..d7aaaecd939 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg_anon_1.bsl @@ -0,0 +1,24 @@ + +neg_anon_1.fs(5,50,5,61): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["a"; "b"]' and '["a"]' + +neg_anon_1.fs(7,41,7,52): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["b"]' and '["a"]' + +neg_anon_1.fs(10,27,10,55): typecheck error FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion + +neg_anon_1.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type + '{|b : int|}' +is not compatible with type + '{|a : int|}' + + +neg_anon_1.fs(13,27,13,62): typecheck error FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion + +neg_anon_1.fs(13,27,13,62): typecheck error FS0193: Type constraint mismatch. The type + '{|a : int ; b : int|}' +is not compatible with type + '{|a : int|}' + + +neg_anon_1.fs(18,34,18,36): typecheck error FS0001: The type '('a -> 'a)' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + +neg_anon_1.fs(20,42,20,44): typecheck error FS0001: The type '('a -> 'a)' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface diff --git a/tests/fsharp/typecheck/sigs/neg_anon_1.fs b/tests/fsharp/typecheck/sigs/neg_anon_1.fs new file mode 100644 index 00000000000..660788f83e2 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg_anon_1.fs @@ -0,0 +1,20 @@ + +module M + + // Check we get compile-time errors + let negTypeTest1() = ({| a = 1+1; b = 2 |} = {| a = 2 |}) + + let negTypeTest2() = ({| b = 2 |} = {| a = 2 |} ) + + // no subsumption + let negTypeTest3() = ({| b = 2 |} :> {| a : int |} ) + + // no subsumption + let negTypeTest4() = ({| b = 2; a = 1 |} :> {| a : int |} ) + + let posgTypeTest5() = ({| b = 2; a = 1 |} = {| a = 1; b = 2 |} ) + + // Comparison is not possible if structural elements are comparable + let negTypeTest6() = ({| a = id |} > {| a = id |}) + + let negTypeTest7() = (compare {| a = id |} {| a = id |}) diff --git a/tests/fsharp/typecheck/sigs/neg_anon_2.bsl b/tests/fsharp/typecheck/sigs/neg_anon_2.bsl new file mode 100644 index 00000000000..2cd5b247a56 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg_anon_2.bsl @@ -0,0 +1,20 @@ + +neg_anon_2.fs(6,38,6,39): parse error FS0010: Unexpected symbol '}' in binding. Expected '|}' or other token. + +neg_anon_2.fs(6,29,6,31): parse error FS0605: Unmatched '{|' + +neg_anon_2.fs(8,5,8,8): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (6:29). Try indenting this token further or using standard formatting conventions. + +neg_anon_2.fs(10,5,10,9): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (8:5). Try indenting this token further or using standard formatting conventions. + +neg_anon_2.fs(10,5,10,9): parse error FS0010: Unexpected keyword 'type' in binding. Expected incomplete structured construct at or before this point or other token. + +neg_anon_2.fs(6,5,6,8): parse error FS3118: 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. + +neg_anon_2.fs(10,25,10,26): parse error FS0010: Unexpected symbol '}' in type definition. Expected '|}' or other token. + +neg_anon_2.fs(10,14,10,16): parse error FS0605: Unmatched '{|' + +neg_anon_2.fs(12,5,12,8): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (10:14). Try indenting this token further or using standard formatting conventions. + +neg_anon_2.fs(14,1,14,1): parse error FS0010: Incomplete structured construct at or before this point in implementation file diff --git a/tests/fsharp/typecheck/sigs/neg_anon_2.fs b/tests/fsharp/typecheck/sigs/neg_anon_2.fs new file mode 100644 index 00000000000..adbdc0fa986 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg_anon_2.fs @@ -0,0 +1,13 @@ + +module M + + + // Check we get parsing error and decent recovery + let negParsingTest2() = {| b = 2 } + + let normalCode1() = () + // Check we get parsing error and decent recovery + type X = {| A : int } + + let normalCode2() = () + diff --git a/tests/fsharp/typecheck/sigs/neg_anon_2.vsbsl b/tests/fsharp/typecheck/sigs/neg_anon_2.vsbsl new file mode 100644 index 00000000000..aa18d4d8d88 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg_anon_2.vsbsl @@ -0,0 +1,24 @@ + +neg_anon_2.fs(6,38,6,39): parse error FS0010: Unexpected symbol '}' in binding. Expected '|}' or other token. + +neg_anon_2.fs(6,29,6,31): parse error FS0605: Unmatched '{|' + +neg_anon_2.fs(8,5,8,8): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (6:29). Try indenting this token further or using standard formatting conventions. + +neg_anon_2.fs(10,5,10,9): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (8:5). Try indenting this token further or using standard formatting conventions. + +neg_anon_2.fs(10,5,10,9): parse error FS0010: Unexpected keyword 'type' in binding. Expected incomplete structured construct at or before this point or other token. + +neg_anon_2.fs(6,5,6,8): parse error FS3118: 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. + +neg_anon_2.fs(10,25,10,26): parse error FS0010: Unexpected symbol '}' in type definition. Expected '|}' or other token. + +neg_anon_2.fs(10,14,10,16): parse error FS0605: Unmatched '{|' + +neg_anon_2.fs(12,5,12,8): parse error FS0058: Possible incorrect indentation: this token is offside of context started at position (10:14). Try indenting this token further or using standard formatting conventions. + +neg_anon_2.fs(14,1,14,1): parse error FS0010: Incomplete structured construct at or before this point in implementation file + +neg_anon_2.fs(10,10,10,11): typecheck error FS0964: Type abbreviations cannot have augmentations + +neg_anon_2.fs(12,5,12,27): typecheck error FS0912: This declaration element is not permitted in an augmentation diff --git a/tests/fsharpqa/Source/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType01.fs b/tests/fsharpqa/Source/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType01.fs index 0d719d0fd45..3fe7bda3e32 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType01.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType01.fs @@ -1,7 +1,7 @@ // #Regression #Conformance #ApplicationExpressions // Regression test for FSHARP1.0:5525 // Deprecate postfix type application in "new" and "inherit" constructs -//This construct is deprecated: 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'$ +//Unexpected identifier in expression$ type T<'t> = System.Collections.Generic.List<'t> let o = new int T () diff --git a/tests/fsharpqa/Source/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType03.fs b/tests/fsharpqa/Source/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType03.fs index eed4e517a69..aedb265593a 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType03.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/ApplicationExpressions/BasicApplication/E_PostfixType03.fs @@ -1,7 +1,7 @@ // #Regression #Conformance #ApplicationExpressions // Regression test for FSHARP1.0:5525 // Deprecate postfix type application in "new" and "inherit" constructs -//This construct is deprecated: 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'$ +//Unexpected identifier in member definition$ #nowarn "0988" type T<'t> = System.Collections.Generic.List<'t> diff --git a/tests/fsharpqa/Source/OCamlCompat/MultiArgumentGenericType.fs b/tests/fsharpqa/Source/OCamlCompat/MultiArgumentGenericType.fs index 54b26ccc63d..a632b981da4 100644 --- a/tests/fsharpqa/Source/OCamlCompat/MultiArgumentGenericType.fs +++ b/tests/fsharpqa/Source/OCamlCompat/MultiArgumentGenericType.fs @@ -2,7 +2,7 @@ // Regressin Test for FSharp1.0:2098 - OCaml-compat warning for generics written like this: (string, int)Dictionary -//This construct is deprecated: 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'$ +//Unexpected identifier in expression$ open System.Collections.Generic diff --git a/tests/scripts/compiler-perf-results.txt b/tests/scripts/compiler-perf-results.txt index cf6e5b315ab..c10207ef164 100644 --- a/tests/scripts/compiler-perf-results.txt +++ b/tests/scripts/compiler-perf-results.txt @@ -132,17 +132,31 @@ https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-t https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-to-us 87dafbc17b494c438b6db9e59e064736bd8a44e2 458e6c29d7e059a5a8a7b4cd7858c7d633fb5906 MSRC-DON-OFFICE 224.75 11.20 31.09 46.96 63.08 53.08 https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-to-us 87dafbc17b494c438b6db9e59e064736bd8a44e2 7e1fd6ac330f86597f3167e8067cfd805a89eec9 MSRC-DON-OFFICE 235.48 10.83 33.47 47.17 65.56 52.50 -https://github.com/dsyme/visualfsharp.git weak1 58bd2bec78f01e57fecff604146a3cc55eec4966 221224e6d20bd835c2b9e01e0a52bf45e740a8d0 MSRC-3617253 260.05 10.97 30.78 47.15 58.04 59.77 -https://github.com/dsyme/visualfsharp.git weak2 35b7e2caed9b81e2ceb9de9f325ddeb550bf97d6 4df997507226caa272f2c7d4fbdc52eb71c8ead2 MSRC-3617253 257.26 11.24 30.62 48.03 57.80 57.60 - +https://github.com/dsyme/visualfsharp.git range1 e49ac8a2f21223e60d0d9597e52ea9e5f8705963 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 MSRC-3617253 259.69 11.98 32.23 47.16 56.83 58.14 +https://github.com/dsyme/visualfsharp.git range1 e49ac8a2f21223e60d0d9597e52ea9e5f8705963 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 MSRC-3617253 250.75 11.73 30.77 46.66 57.97 59.44 +https://github.com/dsyme/visualfsharp.git range1 e49ac8a2f21223e60d0d9597e52ea9e5f8705963 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 MSRC-3617253 252.83 11.66 31.05 47.17 58.80 58.59 https://github.com/dsyme/visualfsharp.git range1 e49ac8a2f21223e60d0d9597e52ea9e5f8705963 221224e6d20bd835c2b9e01e0a52bf45e740a8d0 MSRC-3617253 275.83 12.79 32.57 53.38 61.94 58.03 https://github.com/dsyme/visualfsharp.git range1 46be8bee06180324b63a3b808cf4a90492a5f095 ff078e94deff66e548efb668465fcdd601cc158d MSRC-3617253 265.13 10.57 35.61 48.73 59.07 59.03 +https://github.com/dsyme/visualfsharp.git range1 46be8bee06180324b63a3b808cf4a90492a5f095 284cb2ff115adb8ff5b1febe1c305a10c933172e MSRC-3617253 262.84 10.55 35.17 48.54 59.51 59.15 + +https://github.com/Microsoft/visualfsharp master ac9f2af4329d2ae1c4213bb1d22dc4450b319207 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 MSRC-3617253 250.78 11.70 30.18 46.84 57.18 58.49 +https://github.com/Microsoft/visualfsharp master ac9f2af4329d2ae1c4213bb1d22dc4450b319207 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 MSRC-3617253 251.89 11.89 30.30 46.67 58.00 59.09 +https://github.com/Microsoft/visualfsharp master ac9f2af4329d2ae1c4213bb1d22dc4450b319207 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 MSRC-3617253 250.48 11.44 30.93 46.09 57.41 58.86 +https://github.com/Microsoft/visualfsharp master 221224e6d20bd835c2b9e01e0a52bf45e740a8d0 221224e6d20bd835c2b9e01e0a52bf45e740a8d0 MSRC-3617253 273.00 12.46 32.80 51.38 60.93 58.66 +https://github.com/Microsoft/visualfsharp master 95348d0aafd168064d4c2282c59d62ac95bbebdf 95348d0aafd168064d4c2282c59d62ac95bbebdf MSRC-3617253 256.40 11.22 32.40 47.49 58.47 59.82 https://github.com/Microsoft/visualfsharp master 4df997507226caa272f2c7d4fbdc52eb71c8ead2 4df997507226caa272f2c7d4fbdc52eb71c8ead2 MSRC-3617253 254.53 11.55 31.80 46.58 57.03 58.89 https://github.com/Microsoft/visualfsharp master 65d87f0b2ee67e50503540aad5d4438fdde14fea 65d87f0b2ee67e50503540aad5d4438fdde14fea MSRC-3617253 257.92 10.44 32.62 45.45 56.68 58.53 https://github.com/Microsoft/visualfsharp master ff078e94deff66e548efb668465fcdd601cc158d ff078e94deff66e548efb668465fcdd601cc158d MSRC-3617253 262.60 10.60 34.99 47.73 59.08 58.46 +https://github.com/Microsoft/visualfsharp master 284cb2ff115adb8ff5b1febe1c305a10c933172e 284cb2ff115adb8ff5b1febe1c305a10c933172e MSRC-3617253 262.07 10.58 34.79 48.58 58.51 58.31 + +https://github.com/dsyme/visualfsharp.git weak1 58bd2bec78f01e57fecff604146a3cc55eec4966 221224e6d20bd835c2b9e01e0a52bf45e740a8d0 MSRC-3617253 260.05 10.97 30.78 47.15 58.04 59.77 +https://github.com/dsyme/visualfsharp.git weak1 6be11a0290c689f2331a03fb9762592b24bdacad 95348d0aafd168064d4c2282c59d62ac95bbebdf MSRC-3617253 308.27 10.79 31.51 47.44 58.70 59.71 + +https://github.com/dsyme/visualfsharp.git weak2 35b7e2caed9b81e2ceb9de9f325ddeb550bf97d6 4df997507226caa272f2c7d4fbdc52eb71c8ead2 MSRC-3617253 257.26 11.24 30.62 48.03 57.80 57.60 https://github.com/AviAvni/visualfsharp.git fcs-memory-3 d91dbc81ce304a88a4e3c07032781421c71e3bab ff078e94deff66e548efb668465fcdd601cc158d MSRC-3617253 263.83 10.70 35.24 47.30 59.09 59.14 +https://github.com/AviAvni/visualfsharp.git fcs-memory-3 d91dbc81ce304a88a4e3c07032781421c71e3bab 284cb2ff115adb8ff5b1febe1c305a10c933172e MSRC-3617253 263.53 10.34 35.19 48.32 58.79 59.08 https://github.com/AviAvni/visualfsharp.git fcs-memory-3 d91dbc81ce304a88a4e3c07032781421c71e3bab 284cb2ff115adb8ff5b1febe1c305a10c933172e MSRC-3617253 263.53 10.34 35.19 48.32 58.79 59.08 https://github.com/dsyme/visualfsharp.git range1 46be8bee06180324b63a3b808cf4a90492a5f095 284cb2ff115adb8ff5b1febe1c305a10c933172e MSRC-3617253 262.84 10.55 35.17 48.54 59.51 59.15 https://github.com/Microsoft/visualfsharp master 284cb2ff115adb8ff5b1febe1c305a10c933172e 284cb2ff115adb8ff5b1febe1c305a10c933172e MSRC-3617253 262.07 10.58 34.79 48.58 58.51 58.31 diff --git a/tests/service/Common.fs b/tests/service/Common.fs index d388a9ca783..081a24bbc33 100644 --- a/tests/service/Common.fs +++ b/tests/service/Common.fs @@ -231,6 +231,9 @@ let attribsOfSymbol (s:FSharpSymbol) = if v.IsVolatile then yield "volatile" if v.IsStatic then yield "static" if v.IsLiteral then yield sprintf "%A" v.LiteralValue.Value + if v.IsAnonRecordField then + let info, tys, i = v.AnonRecordFieldDetails + yield "anon(" + string i + ", [" + info.Assembly.QualifiedName + "/" + String.concat "+" info.EnclosingCompiledTypeNames + "/" + info.CompiledName + "]" + String.concat "," info.SortedFieldNames + ")" | :? FSharpEntity as v -> diff --git a/tests/service/ProjectAnalysisTests.fs b/tests/service/ProjectAnalysisTests.fs index 0bb8d28b9a8..5ea55a40505 100644 --- a/tests/service/ProjectAnalysisTests.fs +++ b/tests/service/ProjectAnalysisTests.fs @@ -5048,6 +5048,101 @@ let ``Test Project40 all symbols`` () = ("IsItAnAMethod", ((13, 25), (13, 40)), ["member"; "funky"]); ("g", ((13, 4), (13, 5)), ["val"]); ("M", ((2, 7), (2, 8)), ["module"])] +//-------------------------------------------- + +module internal Project41 = + open System.IO + + let fileName1 = Path.ChangeExtension(Path.GetTempFileName(), ".fs") + // We need to us a stable name to keep the hashes stable + let base2 = Path.Combine(Path.GetDirectoryName(Path.GetTempFileName()), "stabletmp.tmp") + let dllName = Path.ChangeExtension(base2, ".dll") + let projFileName = Path.ChangeExtension(base2, ".fsproj") + let fileSource1 = """ +module M + + let data1 = {| X = 1 |} + + // Types can be written with the same syntax + let data2 : {| X : int |} = data1 + + type D = {| X : int |} + + // Access is as expected + let f1 (v : {| X : int |}) = v.X + + // Access is as expected + let f2 (v : D) = v.X + + // Access can be nested + let f3 (v : {| X: {| X : int; Y : string |} |}) = v.X.X + + """ + File.WriteAllText(fileName1, fileSource1) + let fileNames = [fileName1] + let args = mkProjectCommandLineArgs (dllName, fileNames) + let options = checker.GetProjectOptionsFromCommandLineArgs (projFileName, args) + let cleanFileName a = if a = fileName1 then "file1" else "??" + +[] +let ``Test project41 all symbols`` () = + + let wholeProjectResults = checker.ParseAndCheckProject(Project41.options) |> Async.RunSynchronously + let allSymbolUses = wholeProjectResults.GetAllUsesOfAllSymbols() |> Async.RunSynchronously + let allSymbolUsesInfo = + [ for s in allSymbolUses do + let pos = + match s.Symbol.DeclarationLocation with + | Some r when r.FileName = Project41.fileName1 -> r.StartLine, r.StartColumn + | _ -> (0,0) + yield (s.Symbol.DisplayName, tups s.RangeAlternate, attribsOfSymbol s.Symbol, pos) ] + allSymbolUsesInfo |> shouldEqual + [("X", ((4, 19), (4, 20)), + ["field"; "anon(0, [//<>f__AnonymousType1416859829`1']X)"], (4, 19)); + ("data1", ((4, 8), (4, 13)), ["val"], (4, 8)); + ("int", ((7, 23), (7, 26)), ["abbrev"], (0, 0)); + ("X", ((7, 19), (7, 20)), + ["field"; "anon(0, [//<>f__AnonymousType1416859829`1']X)"], (7, 19)); + ("data1", ((7, 32), (7, 37)), ["val"], (4, 8)); + ("data2", ((7, 8), (7, 13)), ["val"], (7, 8)); + ("int", ((9, 20), (9, 23)), ["abbrev"], (0, 0)); + ("X", ((9, 16), (9, 17)), + ["field"; "anon(0, [//<>f__AnonymousType1416859829`1']X)"], (9, 16)); + ("int", ((9, 20), (9, 23)), ["abbrev"], (0, 0)); + ("X", ((9, 16), (9, 17)), + ["field"; "anon(0, [//<>f__AnonymousType1416859829`1']X)"], (9, 16)); + ("D", ((9, 9), (9, 10)), ["abbrev"], (9, 9)); + ("int", ((12, 23), (12, 26)), ["abbrev"], (0, 0)); + ("X", ((12, 19), (12, 20)), + ["field"; "anon(0, [//<>f__AnonymousType1416859829`1']X)"], (12, 19)); + ("v", ((12, 12), (12, 13)), [], (12, 12)); + ("v", ((12, 33), (12, 34)), [], (12, 12)); + ("X", ((12, 33), (12, 36)), + ["field"; "anon(0, [//<>f__AnonymousType1416859829`1']X)"], (12, 19)); + ("f1", ((12, 8), (12, 10)), ["val"], (12, 8)); + ("D", ((15, 16), (15, 17)), ["abbrev"], (9, 9)); + ("v", ((15, 12), (15, 13)), [], (15, 12)); + ("v", ((15, 21), (15, 22)), [], (15, 12)); + ("X", ((15, 21), (15, 24)), + ["field"; "anon(0, [//<>f__AnonymousType1416859829`1']X)"], (9, 16)); + ("f2", ((15, 8), (15, 10)), ["val"], (15, 8)); + ("int", ((18, 29), (18, 32)), ["abbrev"], (0, 0)); + ("string", ((18, 38), (18, 44)), ["abbrev"], (0, 0)); + ("X", ((18, 25), (18, 26)), + ["field"; "anon(0, [//<>f__AnonymousType4026451324`2']X,Y)"], (18, 25)); + ("Y", ((18, 34), (18, 35)), + ["field"; "anon(1, [//<>f__AnonymousType4026451324`2']X,Y)"], (18, 34)); + ("X", ((18, 19), (18, 20)), + ["field"; "anon(0, [//<>f__AnonymousType1416859829`1']X)"], (18, 19)); + ("v", ((18, 12), (18, 13)), [], (18, 12)); + ("v", ((18, 54), (18, 55)), [], (18, 12)); + ("X", ((18, 56), (18, 57)), + ["field"; "anon(0, [//<>f__AnonymousType1416859829`1']X)"], (18, 19)); + ("X", ((18, 54), (18, 59)), + ["field"; "anon(0, [//<>f__AnonymousType4026451324`2']X,Y)"], (18, 25)); + ("f3", ((18, 8), (18, 10)), ["val"], (18, 8)); + ("M", ((2, 7), (2, 8)), ["module"], (2, 7))] + module internal ProjectBig = open System.IO