From b952b7263a87de5366b30a315744fb2f78207fce Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 13 Mar 2018 18:35:17 +0000 Subject: [PATCH 01/24] anonymous record types implementation --- src/absil/il.fs | 4 + src/absil/il.fsi | 1 + .../FSharp.Compiler.Private/FSComp.fs | 1942 +++++++++-------- .../FSharp.Compiler.Private/FSComp.resx | 20 +- src/fsharp/CompileOps.fs | 6 +- src/fsharp/ConstraintSolver.fs | 92 +- src/fsharp/FSComp.txt | 8 +- src/fsharp/FSStrings.resx | 6 + src/fsharp/FindUnsolved.fs | 33 +- src/fsharp/IlxGen.fs | 1887 ++++++++-------- src/fsharp/IlxGen.fsi | 7 +- src/fsharp/InnerLambdasToTopLevelFuncs.fs | 4 +- src/fsharp/LexFilter.fs | 25 +- src/fsharp/NameResolution.fs | 62 +- src/fsharp/NameResolution.fsi | 6 + src/fsharp/NicePrint.fs | 9 + src/fsharp/Optimizer.fs | 36 +- src/fsharp/PostInferenceChecks.fs | 60 +- src/fsharp/PostInferenceChecks.fsi | 4 +- src/fsharp/QuotationTranslator.fs | 18 + src/fsharp/TastOps.fs | 77 +- src/fsharp/TastOps.fsi | 16 +- src/fsharp/TastPickle.fs | 172 +- src/fsharp/TypeChecker.fs | 199 +- src/fsharp/ast.fs | 92 +- src/fsharp/fsc.fs | 13 +- src/fsharp/fsi/fsi.fs | 2 +- src/fsharp/infos.fs | 2 + src/fsharp/layout.fs | 2 + src/fsharp/layout.fsi | 2 + src/fsharp/lex.fsl | 2 + src/fsharp/pars.fsy | 207 +- src/fsharp/service/ServiceAssemblyContent.fs | 8 +- src/fsharp/service/ServiceDeclarationLists.fs | 5 + .../service/ServiceInterfaceStubGenerator.fs | 6 +- src/fsharp/service/ServiceLexing.fs | 8 +- .../service/ServiceParamInfoLocations.fs | 4 +- src/fsharp/service/ServiceParseTreeWalk.fs | 11 +- src/fsharp/service/ServiceStructure.fs | 5 +- src/fsharp/service/ServiceUntypedParse.fs | 20 +- src/fsharp/service/ServiceXmlDocParser.fs | 3 +- src/fsharp/symbols/Exprs.fs | 2 +- src/fsharp/symbols/SymbolHelpers.fs | 19 + src/fsharp/symbols/SymbolPatterns.fs | 4 +- src/fsharp/symbols/Symbols.fs | 142 +- src/fsharp/symbols/Symbols.fsi | 29 +- src/fsharp/tast.fs | 76 +- src/fsharp/xlf/FSComp.txt.cs.xlf | 30 + src/fsharp/xlf/FSComp.txt.de.xlf | 30 + src/fsharp/xlf/FSComp.txt.en.xlf | 30 + src/fsharp/xlf/FSComp.txt.es.xlf | 30 + src/fsharp/xlf/FSComp.txt.fr.xlf | 30 + src/fsharp/xlf/FSComp.txt.it.xlf | 30 + src/fsharp/xlf/FSComp.txt.ja.xlf | 30 + src/fsharp/xlf/FSComp.txt.ko.xlf | 30 + src/fsharp/xlf/FSComp.txt.pl.xlf | 30 + src/fsharp/xlf/FSComp.txt.pt-BR.xlf | 30 + src/fsharp/xlf/FSComp.txt.ru.xlf | 30 + src/fsharp/xlf/FSComp.txt.tr.xlf | 30 + src/fsharp/xlf/FSComp.txt.zh-Hans.xlf | 30 + src/fsharp/xlf/FSComp.txt.zh-Hant.xlf | 30 + src/fsharp/xlf/FSStrings.cs.xlf | 10 + src/fsharp/xlf/FSStrings.de.xlf | 10 + src/fsharp/xlf/FSStrings.en.xlf | 10 + src/fsharp/xlf/FSStrings.es.xlf | 10 + src/fsharp/xlf/FSStrings.fr.xlf | 10 + src/fsharp/xlf/FSStrings.it.xlf | 10 + src/fsharp/xlf/FSStrings.ja.xlf | 10 + src/fsharp/xlf/FSStrings.ko.xlf | 10 + src/fsharp/xlf/FSStrings.pl.xlf | 10 + src/fsharp/xlf/FSStrings.pt-BR.xlf | 10 + src/fsharp/xlf/FSStrings.ru.xlf | 10 + src/fsharp/xlf/FSStrings.tr.xlf | 10 + src/fsharp/xlf/FSStrings.zh-Hans.xlf | 10 + src/fsharp/xlf/FSStrings.zh-Hant.xlf | 10 + src/utils/sformat.fs | 2 + src/utils/sformat.fsi | 2 + tests/fsharp/core/anon/lib.fs | 209 ++ tests/fsharp/core/anon/test.fsx | 83 + tests/fsharp/core/fsi-load/test.fsx | 3 + .../core/queriesOverIQueryable/test.fsx | 116 +- tests/fsharp/tests.fs | 38 + tests/fsharp/typecheck/sigs/neg103.bsl | 24 + tests/fsharp/typecheck/sigs/neg103.fs | 20 + tests/fsharp/typecheck/sigs/neg103.vsbsl | 24 + tests/fsharp/typecheck/sigs/neg104.bsl | 20 + tests/fsharp/typecheck/sigs/neg104.fs | 13 + tests/fsharp/typecheck/sigs/neg104.vsbsl | 24 + .../BasicApplication/E_PostfixType01.fs | 2 +- .../BasicApplication/E_PostfixType03.fs | 2 +- .../OCamlCompat/MultiArgumentGenericType.fs | 2 +- tests/scripts/compiler-perf-results.txt | 6 + tests/service/Common.fs | 3 + tests/service/ProjectAnalysisTests.fs | 82 + 94 files changed, 4247 insertions(+), 2346 deletions(-) create mode 100644 tests/fsharp/core/anon/lib.fs create mode 100644 tests/fsharp/core/anon/test.fsx create mode 100644 tests/fsharp/typecheck/sigs/neg103.bsl create mode 100644 tests/fsharp/typecheck/sigs/neg103.fs create mode 100644 tests/fsharp/typecheck/sigs/neg103.vsbsl create mode 100644 tests/fsharp/typecheck/sigs/neg104.bsl create mode 100644 tests/fsharp/typecheck/sigs/neg104.fs create mode 100644 tests/fsharp/typecheck/sigs/neg104.vsbsl diff --git a/src/absil/il.fs b/src/absil/il.fs index 3316f156e6e..abb71e0ce9e 100644 --- a/src/absil/il.fs +++ b/src/absil/il.fs @@ -293,8 +293,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 cb24a7180a9..02ef056daaf 100644 --- a/src/absil/il.fsi +++ b/src/absil/il.fsi @@ -1934,6 +1934,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 ac222406a21..a88526f0fe7 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs @@ -1429,2883 +1429,2901 @@ 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",",,,") ) /// Type parameters must be placed directly adjacent to the type name, e.g. \"type C<'T>\", not type \"C <'T>\" - /// (Originally from ..\FSComp.txt:1043) + /// (Originally from ..\FSComp.txt:1045) static member parsNonAdjacentTypars() = (1189, GetStringFunc("parsNonAdjacentTypars",",,,") ) /// Type arguments must be placed directly adjacent to the type name, e.g. \"C<'T>\", not \"C <'T>\" - /// (Originally from ..\FSComp.txt: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",",,,") ) /// An %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) /// Union case/exception '%s' does not have 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) /// Union case/exception field '%s' cannot be used more than once. - /// (Originally from ..\FSComp.txt:1297) + /// (Originally from ..\FSComp.txt:1299) static member tcUnionCaseFieldCannotBeUsedMoreThanOnce(a0 : System.String) = (3175, GetStringFunc("tcUnionCaseFieldCannotBeUsedMoreThanOnce",",,,%s,,,") a0) /// Named field '%s' is used more than once. - /// (Originally from ..\FSComp.txt:1298) + /// (Originally from ..\FSComp.txt:1300) 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:1299) + /// (Originally from ..\FSComp.txt:1301) 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:1300) + /// (Originally from ..\FSComp.txt:1302) static member tastConstantExpressionOverflow() = (3177, GetStringFunc("tastConstantExpressionOverflow",",,,") ) /// This is not valid literal expression. The [] attribute will be ignored. - /// (Originally from ..\FSComp.txt:1301) + /// (Originally from ..\FSComp.txt:1303) static member tcIllegalStructTypeForConstantExpression() = (3178, GetStringFunc("tcIllegalStructTypeForConstantExpression",",,,") ) /// System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. - /// (Originally from ..\FSComp.txt:1302) + /// (Originally from ..\FSComp.txt:1304) 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:1303) + /// (Originally from ..\FSComp.txt:1305) 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:1304) + /// (Originally from ..\FSComp.txt:1306) static member estApplyStaticArgumentsForMethodNotImplemented() = (GetStringFunc("estApplyStaticArgumentsForMethodNotImplemented",",,,") ) /// An error occured applying the static arguments to a provided method - /// (Originally from ..\FSComp.txt:1305) + /// (Originally from ..\FSComp.txt:1307) static member etErrorApplyingStaticArgumentsToMethod() = (3181, GetStringFunc("etErrorApplyingStaticArgumentsToMethod",",,,") ) /// Unexpected character '%s' in preprocessor expression - /// (Originally from ..\FSComp.txt:1306) + /// (Originally from ..\FSComp.txt:1308) static member pplexUnexpectedChar(a0 : System.String) = (3182, GetStringFunc("pplexUnexpectedChar",",,,%s,,,") a0) /// Unexpected token '%s' in preprocessor expression - /// (Originally from ..\FSComp.txt:1307) + /// (Originally from ..\FSComp.txt:1309) static member ppparsUnexpectedToken(a0 : System.String) = (3183, GetStringFunc("ppparsUnexpectedToken",",,,%s,,,") a0) /// Incomplete preprocessor expression - /// (Originally from ..\FSComp.txt:1308) + /// (Originally from ..\FSComp.txt:1310) static member ppparsIncompleteExpression() = (3184, GetStringFunc("ppparsIncompleteExpression",",,,") ) /// Missing token '%s' in preprocessor expression - /// (Originally from ..\FSComp.txt:1309) + /// (Originally from ..\FSComp.txt:1311) 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:1310) + /// (Originally from ..\FSComp.txt:1312) 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:1311) + /// (Originally from ..\FSComp.txt:1313) 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:1312) + /// (Originally from ..\FSComp.txt:1314) static member checkNotSufficientlyGenericBecauseOfScopeAnon() = (3188, GetStringFunc("checkNotSufficientlyGenericBecauseOfScopeAnon",",,,") ) /// Redundant arguments are being ignored in function '%s'. Expected %d but got %d arguments. - /// (Originally from ..\FSComp.txt:1313) + /// (Originally from ..\FSComp.txt:1315) 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:1314) + /// (Originally from ..\FSComp.txt:1316) static member checkLowercaseLiteralBindingInPattern(a0 : System.String) = (3190, GetStringFunc("checkLowercaseLiteralBindingInPattern",",,,%s,,,") a0) /// This literal pattern does not take arguments - /// (Originally from ..\FSComp.txt:1315) + /// (Originally from ..\FSComp.txt:1317) 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:1316) + /// (Originally from ..\FSComp.txt:1318) static member tcConstructorsIllegalInAugmentation() = (3192, GetStringFunc("tcConstructorsIllegalInAugmentation",",,,") ) /// Invalid response file '%s' ( '%s' ) - /// (Originally from ..\FSComp.txt:1317) + /// (Originally from ..\FSComp.txt:1319) 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:1318) + /// (Originally from ..\FSComp.txt:1320) 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:1319) + /// (Originally from ..\FSComp.txt:1321) static member optsResponseFileNameInvalid(a0 : System.String) = (3195, GetStringFunc("optsResponseFileNameInvalid",",,,%s,,,") a0) /// Cannot find FSharp.Core.dll in compiler's directory - /// (Originally from ..\FSComp.txt:1320) + /// (Originally from ..\FSComp.txt:1322) static member fsharpCoreNotFoundToBeCopied() = (3196, GetStringFunc("fsharpCoreNotFoundToBeCopied",",,,") ) /// One tuple type is a struct tuple, the other is a reference tuple - /// (Originally from ..\FSComp.txt:1321) + /// (Originally from ..\FSComp.txt:1323) static member tcTupleStructMismatch() = (GetStringFunc("tcTupleStructMismatch",",,,") ) /// This provided method requires static parameters - /// (Originally from ..\FSComp.txt:1322) + /// (Originally from ..\FSComp.txt:1324) 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:1323) + /// (Originally from ..\FSComp.txt:1325) 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:1324) + /// (Originally from ..\FSComp.txt:1326) 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:1325) + /// (Originally from ..\FSComp.txt:1327) static member tcRecImplied() = (3199, GetStringFunc("tcRecImplied",",,,") ) /// In a recursive declaration group, 'open' declarations must come first in each module - /// (Originally from ..\FSComp.txt:1326) + /// (Originally from ..\FSComp.txt:1328) 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:1327) + /// (Originally from ..\FSComp.txt:1329) static member tcModuleAbbrevFirstInMutRec() = (3201, GetStringFunc("tcModuleAbbrevFirstInMutRec",",,,") ) /// This declaration is not supported in recursive declaration groups - /// (Originally from ..\FSComp.txt:1328) + /// (Originally from ..\FSComp.txt:1330) static member tcUnsupportedMutRecDecl() = (3202, GetStringFunc("tcUnsupportedMutRecDecl",",,,") ) /// Invalid use of 'rec' keyword - /// (Originally from ..\FSComp.txt:1329) + /// (Originally from ..\FSComp.txt:1331) 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:1330) + /// (Originally from ..\FSComp.txt:1332) 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:1331) + /// (Originally from ..\FSComp.txt:1333) 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:1332) + /// (Originally from ..\FSComp.txt:1334) static member tcFixedNotAllowed() = (3207, GetStringFunc("tcFixedNotAllowed",",,,") ) /// Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. - /// (Originally from ..\FSComp.txt:1333) + /// (Originally from ..\FSComp.txt:1335) static member tcCouldNotFindOffsetToStringData() = (3208, GetStringFunc("tcCouldNotFindOffsetToStringData",",,,") ) /// The address of the variable '%s' cannot be used at this point. A method or function may not return the address of this local value. - /// (Originally from ..\FSComp.txt:1334) + /// (Originally from ..\FSComp.txt:1336) static member chkNoByrefReturnOfLocal(a0 : System.String) = (3209, GetStringFunc("chkNoByrefReturnOfLocal",",,,%s,,,") a0) /// %s is an active pattern and cannot be treated as a discriminated union case with named fields. - /// (Originally from ..\FSComp.txt:1335) + /// (Originally from ..\FSComp.txt:1337) 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:1336) + /// (Originally from ..\FSComp.txt:1338) static member DefaultParameterValueNotAppropriateForArgument() = (3211, GetStringFunc("DefaultParameterValueNotAppropriateForArgument",",,,") ) /// The system type '%s' was required but no referenced system DLL contained this type - /// (Originally from ..\FSComp.txt:1337) + /// (Originally from ..\FSComp.txt:1339) 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:1338) + /// (Originally from ..\FSComp.txt:1340) 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:1339) + /// (Originally from ..\FSComp.txt:1341) 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:1340) + /// (Originally from ..\FSComp.txt:1342) static member parsUnexpectedSymbolEqualsInsteadOfIn() = (3215, GetStringFunc("parsUnexpectedSymbolEqualsInsteadOfIn",",,,") ) + /// Two anonymous record types are from different assemblies '%s' and '%s' + /// (Originally from ..\FSComp.txt:1343) + static member tcAnonRecdCcuMismatch(a0 : System.String, a1 : System.String) = (GetStringFunc("tcAnonRecdCcuMismatch",",,,%s,,,%s,,,") a0 a1) + /// One anonymous record type is assembly-bound to '%s' (syntax 'new {| ... |}'), the other is assembly-neutral (syntax '{| ... |}') + /// (Originally from ..\FSComp.txt:1344) + 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:1341) + /// (Originally from ..\FSComp.txt:1346) static member keywordDescriptionAbstract() = (GetStringFunc("keywordDescriptionAbstract",",,,") ) /// Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. - /// (Originally from ..\FSComp.txt:1342) + /// (Originally from ..\FSComp.txt:1347) 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:1343) + /// (Originally from ..\FSComp.txt:1348) static member keywordDescriptionAs() = (GetStringFunc("keywordDescriptionAs",",,,") ) /// Used to verify code during debugging. - /// (Originally from ..\FSComp.txt:1344) + /// (Originally from ..\FSComp.txt:1349) static member keywordDescriptionAssert() = (GetStringFunc("keywordDescriptionAssert",",,,") ) /// Used as the name of the base class object. - /// (Originally from ..\FSComp.txt:1345) + /// (Originally from ..\FSComp.txt:1350) static member keywordDescriptionBase() = (GetStringFunc("keywordDescriptionBase",",,,") ) /// In verbose syntax, indicates the start of a code block. - /// (Originally from ..\FSComp.txt:1346) + /// (Originally from ..\FSComp.txt:1351) static member keywordDescriptionBegin() = (GetStringFunc("keywordDescriptionBegin",",,,") ) /// In verbose syntax, indicates the start of a class definition. - /// (Originally from ..\FSComp.txt:1347) + /// (Originally from ..\FSComp.txt:1352) 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:1348) + /// (Originally from ..\FSComp.txt:1353) static member keywordDescriptionDefault() = (GetStringFunc("keywordDescriptionDefault",",,,") ) /// Used to declare a delegate. - /// (Originally from ..\FSComp.txt:1349) + /// (Originally from ..\FSComp.txt:1354) static member keywordDescriptionDelegate() = (GetStringFunc("keywordDescriptionDelegate",",,,") ) /// Used in looping constructs or to execute imperative code. - /// (Originally from ..\FSComp.txt:1350) + /// (Originally from ..\FSComp.txt:1355) static member keywordDescriptionDo() = (GetStringFunc("keywordDescriptionDo",",,,") ) /// In verbose syntax, indicates the end of a block of code in a looping expression. - /// (Originally from ..\FSComp.txt:1351) + /// (Originally from ..\FSComp.txt:1356) static member keywordDescriptionDone() = (GetStringFunc("keywordDescriptionDone",",,,") ) /// Used to convert to a type that is lower in the inheritance chain. - /// (Originally from ..\FSComp.txt:1352) + /// (Originally from ..\FSComp.txt:1357) static member keywordDescriptionDowncast() = (GetStringFunc("keywordDescriptionDowncast",",,,") ) /// In a for expression, used when counting in reverse. - /// (Originally from ..\FSComp.txt:1353) + /// (Originally from ..\FSComp.txt:1358) static member keywordDescriptionDownto() = (GetStringFunc("keywordDescriptionDownto",",,,") ) /// Used in conditional branching. A short form of else if. - /// (Originally from ..\FSComp.txt:1354) + /// (Originally from ..\FSComp.txt:1359) static member keywordDescriptionElif() = (GetStringFunc("keywordDescriptionElif",",,,") ) /// Used in conditional branching. - /// (Originally from ..\FSComp.txt:1355) + /// (Originally from ..\FSComp.txt:1360) 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:1356) + /// (Originally from ..\FSComp.txt:1361) static member keywordDescriptionEnd() = (GetStringFunc("keywordDescriptionEnd",",,,") ) /// Used to declare an exception type. - /// (Originally from ..\FSComp.txt:1357) + /// (Originally from ..\FSComp.txt:1362) static member keywordDescriptionException() = (GetStringFunc("keywordDescriptionException",",,,") ) /// Indicates that a declared program element is defined in another binary or assembly. - /// (Originally from ..\FSComp.txt:1358) + /// (Originally from ..\FSComp.txt:1363) static member keywordDescriptionExtern() = (GetStringFunc("keywordDescriptionExtern",",,,") ) /// Used as a Boolean literal. - /// (Originally from ..\FSComp.txt:1359) + /// (Originally from ..\FSComp.txt:1364) 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:1360) + /// (Originally from ..\FSComp.txt:1365) static member keywordDescriptionFinally() = (GetStringFunc("keywordDescriptionFinally",",,,") ) /// Used in looping constructs. - /// (Originally from ..\FSComp.txt:1361) + /// (Originally from ..\FSComp.txt:1366) static member keywordDescriptionFor() = (GetStringFunc("keywordDescriptionFor",",,,") ) /// Used in lambda expressions, also known as anonymous functions. - /// (Originally from ..\FSComp.txt:1362) + /// (Originally from ..\FSComp.txt:1367) 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:1363) + /// (Originally from ..\FSComp.txt:1368) static member keywordDescriptionFunction() = (GetStringFunc("keywordDescriptionFunction",",,,") ) /// Used to reference the top-level .NET namespace. - /// (Originally from ..\FSComp.txt:1364) + /// (Originally from ..\FSComp.txt:1369) static member keywordDescriptionGlobal() = (GetStringFunc("keywordDescriptionGlobal",",,,") ) /// Used in conditional branching constructs. - /// (Originally from ..\FSComp.txt:1365) + /// (Originally from ..\FSComp.txt:1370) static member keywordDescriptionIf() = (GetStringFunc("keywordDescriptionIf",",,,") ) /// Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. - /// (Originally from ..\FSComp.txt:1366) + /// (Originally from ..\FSComp.txt:1371) static member keywordDescriptionIn() = (GetStringFunc("keywordDescriptionIn",",,,") ) /// Used to specify a base class or base interface. - /// (Originally from ..\FSComp.txt:1367) + /// (Originally from ..\FSComp.txt:1372) static member keywordDescriptionInherit() = (GetStringFunc("keywordDescriptionInherit",",,,") ) /// Used to indicate a function that should be integrated directly into the caller's code. - /// (Originally from ..\FSComp.txt:1368) + /// (Originally from ..\FSComp.txt:1373) static member keywordDescriptionInline() = (GetStringFunc("keywordDescriptionInline",",,,") ) /// Used to declare and implement interfaces. - /// (Originally from ..\FSComp.txt:1369) + /// (Originally from ..\FSComp.txt:1374) static member keywordDescriptionInterface() = (GetStringFunc("keywordDescriptionInterface",",,,") ) /// Used to specify that a member is visible inside an assembly but not outside it. - /// (Originally from ..\FSComp.txt:1370) + /// (Originally from ..\FSComp.txt:1375) 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:1371) + /// (Originally from ..\FSComp.txt:1376) static member keywordDescriptionLazy() = (GetStringFunc("keywordDescriptionLazy",",,,") ) /// Used to associate, or bind, a name to a value or function. - /// (Originally from ..\FSComp.txt:1372) + /// (Originally from ..\FSComp.txt:1377) static member keywordDescriptionLet() = (GetStringFunc("keywordDescriptionLet",",,,") ) /// Used in asynchronous workflows to bind a name to the result of an asynchronous computation, or, in other computation expressions, used to bind a name to a result, which is of the computation type. - /// (Originally from ..\FSComp.txt:1373) + /// (Originally from ..\FSComp.txt:1378) static member keywordDescriptionLetBang() = (GetStringFunc("keywordDescriptionLetBang",",,,") ) /// Used to branch by comparing a value to a pattern. - /// (Originally from ..\FSComp.txt:1374) + /// (Originally from ..\FSComp.txt:1379) static member keywordDescriptionMatch() = (GetStringFunc("keywordDescriptionMatch",",,,") ) /// Used to declare a property or method in an object type. - /// (Originally from ..\FSComp.txt:1375) + /// (Originally from ..\FSComp.txt:1380) 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:1376) + /// (Originally from ..\FSComp.txt:1381) static member keywordDescriptionModule() = (GetStringFunc("keywordDescriptionModule",",,,") ) /// Used to declare a variable, that is, a value that can be changed. - /// (Originally from ..\FSComp.txt:1377) + /// (Originally from ..\FSComp.txt:1382) 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:1378) + /// (Originally from ..\FSComp.txt:1383) 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:1379) + /// (Originally from ..\FSComp.txt:1384) 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:1380) + /// (Originally from ..\FSComp.txt:1385) static member keywordDescriptionNot() = (GetStringFunc("keywordDescriptionNot",",,,") ) /// Indicates the absence of an object. Also used in generic parameter constraints. - /// (Originally from ..\FSComp.txt:1381) + /// (Originally from ..\FSComp.txt:1386) 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:1382) + /// (Originally from ..\FSComp.txt:1387) static member keywordDescriptionOf() = (GetStringFunc("keywordDescriptionOf",",,,") ) /// Used to make the contents of a namespace or module available without qualification. - /// (Originally from ..\FSComp.txt:1383) + /// (Originally from ..\FSComp.txt:1388) 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:1384) + /// (Originally from ..\FSComp.txt:1389) 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:1385) + /// (Originally from ..\FSComp.txt:1390) static member keywordDescriptionOverride() = (GetStringFunc("keywordDescriptionOverride",",,,") ) /// Restricts access to a member to code in the same type or module. - /// (Originally from ..\FSComp.txt:1386) + /// (Originally from ..\FSComp.txt:1391) static member keywordDescriptionPrivate() = (GetStringFunc("keywordDescriptionPrivate",",,,") ) /// Allows access to a member from outside the type. - /// (Originally from ..\FSComp.txt:1387) + /// (Originally from ..\FSComp.txt:1392) static member keywordDescriptionPublic() = (GetStringFunc("keywordDescriptionPublic",",,,") ) /// Used to indicate that a function is recursive. - /// (Originally from ..\FSComp.txt:1388) + /// (Originally from ..\FSComp.txt:1393) static member keywordDescriptionRec() = (GetStringFunc("keywordDescriptionRec",",,,") ) /// Used to indicate a value to provide as the result of a computation expression. - /// (Originally from ..\FSComp.txt:1389) + /// (Originally from ..\FSComp.txt:1394) static member keywordDescriptionReturn() = (GetStringFunc("keywordDescriptionReturn",",,,") ) /// Used to indicate a computation expression that, when evaluated, provides the result of the containing computation expression. - /// (Originally from ..\FSComp.txt:1390) + /// (Originally from ..\FSComp.txt:1395) 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:1391) + /// (Originally from ..\FSComp.txt:1396) 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:1392) + /// (Originally from ..\FSComp.txt:1397) 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:1393) + /// (Originally from ..\FSComp.txt:1398) static member keywordDescriptionStruct() = (GetStringFunc("keywordDescriptionStruct",",,,") ) /// Used in conditional expressions. Also used to perform side effects after object construction. - /// (Originally from ..\FSComp.txt:1394) + /// (Originally from ..\FSComp.txt:1399) static member keywordDescriptionThen() = (GetStringFunc("keywordDescriptionThen",",,,") ) /// Used in for loops to indicate a range. - /// (Originally from ..\FSComp.txt:1395) + /// (Originally from ..\FSComp.txt:1400) 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:1396) + /// (Originally from ..\FSComp.txt:1401) 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:1397) + /// (Originally from ..\FSComp.txt:1402) static member keywordDescriptionType() = (GetStringFunc("keywordDescriptionType",",,,") ) /// Used to convert to a type that is higher in the inheritance chain. - /// (Originally from ..\FSComp.txt:1398) + /// (Originally from ..\FSComp.txt:1403) static member keywordDescriptionUpcast() = (GetStringFunc("keywordDescriptionUpcast",",,,") ) /// Used instead of let for values that require Dispose to be called to free resources. - /// (Originally from ..\FSComp.txt:1399) + /// (Originally from ..\FSComp.txt:1404) static member keywordDescriptionUse() = (GetStringFunc("keywordDescriptionUse",",,,") ) /// Used instead of let! in asynchronous workflows and other computation expressions for values that require Dispose to be called to free resources. - /// (Originally from ..\FSComp.txt:1400) + /// (Originally from ..\FSComp.txt:1405) 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:1401) + /// (Originally from ..\FSComp.txt:1406) static member keywordDescriptionVal() = (GetStringFunc("keywordDescriptionVal",",,,") ) /// Indicates the .NET void type. Used when interoperating with other .NET languages. - /// (Originally from ..\FSComp.txt:1402) + /// (Originally from ..\FSComp.txt:1407) 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:1403) + /// (Originally from ..\FSComp.txt:1408) static member keywordDescriptionWhen() = (GetStringFunc("keywordDescriptionWhen",",,,") ) /// Introduces a looping construct. - /// (Originally from ..\FSComp.txt:1404) + /// (Originally from ..\FSComp.txt:1409) 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:1405) + /// (Originally from ..\FSComp.txt:1410) static member keywordDescriptionWith() = (GetStringFunc("keywordDescriptionWith",",,,") ) /// Used in a sequence expression to produce a value for a sequence. - /// (Originally from ..\FSComp.txt:1406) + /// (Originally from ..\FSComp.txt:1411) 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:1407) + /// (Originally from ..\FSComp.txt:1412) 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:1408) + /// (Originally from ..\FSComp.txt:1413) static member keywordDescriptionRightArrow() = (GetStringFunc("keywordDescriptionRightArrow",",,,") ) /// Assigns a value to a variable. - /// (Originally from ..\FSComp.txt:1409) + /// (Originally from ..\FSComp.txt:1414) static member keywordDescriptionLeftArrow() = (GetStringFunc("keywordDescriptionLeftArrow",",,,") ) /// Converts a type to type that is higher in the hierarchy. - /// (Originally from ..\FSComp.txt:1410) + /// (Originally from ..\FSComp.txt:1415) static member keywordDescriptionCast() = (GetStringFunc("keywordDescriptionCast",",,,") ) /// Converts a type to a type that is lower in the hierarchy. - /// (Originally from ..\FSComp.txt:1411) + /// (Originally from ..\FSComp.txt:1416) static member keywordDescriptionDynamicCast() = (GetStringFunc("keywordDescriptionDynamicCast",",,,") ) /// Delimits a typed code quotation. - /// (Originally from ..\FSComp.txt:1412) + /// (Originally from ..\FSComp.txt:1417) static member keywordDescriptionTypedQuotation() = (GetStringFunc("keywordDescriptionTypedQuotation",",,,") ) /// Delimits a untyped code quotation. - /// (Originally from ..\FSComp.txt:1413) + /// (Originally from ..\FSComp.txt:1418) 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:1414) + /// (Originally from ..\FSComp.txt:1419) 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:1415) + /// (Originally from ..\FSComp.txt:1420) 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:1416) + /// (Originally from ..\FSComp.txt:1421) static member descriptionWordIs() = (GetStringFunc("descriptionWordIs",",,,") ) /// This value is not a function and cannot be applied. - /// (Originally from ..\FSComp.txt:1417) + /// (Originally from ..\FSComp.txt:1422) 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:1418) + /// (Originally from ..\FSComp.txt:1423) 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:1419) + /// (Originally from ..\FSComp.txt:1424) static member notAFunctionButMaybeIndexer() = (GetStringFunc("notAFunctionButMaybeIndexer",",,,") ) /// - /// (Originally from ..\FSComp.txt:1420) + /// (Originally from ..\FSComp.txt:1425) 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:1421) + /// (Originally from ..\FSComp.txt:1426) 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:1422) + /// (Originally from ..\FSComp.txt:1427) 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:1423) + /// (Originally from ..\FSComp.txt:1428) 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:1424) + /// (Originally from ..\FSComp.txt:1429) 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:1425) + /// (Originally from ..\FSComp.txt:1430) 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:1426) + /// (Originally from ..\FSComp.txt:1431) static member implicitlyDiscardedSequenceInSequenceExpression(a0 : System.String) = (3222, GetStringFunc("implicitlyDiscardedSequenceInSequenceExpression",",,,%s,,,") a0) + /// Invalid anonymous record expression + /// (Originally from ..\FSComp.txt:1432) + static member parsInvalidAnonRecdExpr() = (3223, GetStringFunc("parsInvalidAnonRecdExpr",",,,") ) + /// Invalid anonymous record type + /// (Originally from ..\FSComp.txt:1433) + static member parsInvalidAnonRecdType() = (3224, GetStringFunc("parsInvalidAnonRecdType",",,,") ) /// Call this method once to validate that all known resources are valid; throws if not static member RunStartupValidation() = @@ -4747,6 +4765,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")) @@ -5219,6 +5238,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")) @@ -5620,6 +5640,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")) @@ -5706,4 +5728,6 @@ type internal SR private() = ignore(GetString("tcTupleMemberNotNormallyUsed")) ignore(GetString("implicitlyDiscardedInSequenceExpression")) ignore(GetString("implicitlyDiscardedSequenceInSequenceExpression")) + ignore(GetString("parsInvalidAnonRecdExpr")) + ignore(GetString("parsInvalidAnonRecdType")) () diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx index 98d1c657bae..2e1d0938ce4 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx @@ -1117,7 +1117,7 @@ The member or object constructor '{0}' is not {1} - The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from within inner lambda expressions, object expressions or computation expressions (such as async { }). If {0} is a protected member, consider creating a member in this type that calls it. + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. {0} is not a static method @@ -1431,6 +1431,9 @@ Unmatched '{{' + + Unmatched '{{|' + Field bindings must have the form 'id = expr;' @@ -2847,6 +2850,9 @@ argument + + anonymous record field + patvar @@ -4050,6 +4056,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. @@ -4309,4 +4321,10 @@ This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + + Invalid anonymous record expression + + + Invalid anonymous record type + \ No newline at end of file diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index 069dba4859e..86789db080e 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -959,12 +959,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") @@ -1094,7 +1094,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 b1b690c6a85..ca16d3465bc 100644 --- a/src/fsharp/ConstraintSolver.fs +++ b/src/fsharp/ConstraintSolver.fs @@ -221,6 +221,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 @@ -293,6 +294,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" @@ -557,6 +559,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] @@ -594,6 +597,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) @@ -757,6 +761,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 SolveTypEqualsTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) (cxsln:(TraitConstraintInfo * TraitConstraintSln) option) ty1 ty2 = @@ -797,6 +809,9 @@ and SolveTypEqualsTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace | TType_tuple (tupInfo1, l1) , TType_tuple (tupInfo2, l2) -> if evalTupInfoIsStruct tupInfo1 <> evalTupInfoIsStruct tupInfo2 then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m, m2)) else SolveTypEqualsTypEqns csenv ndeep m2 trace None l1 l2 + | TType_anon (anonInfo1, l1),TType_anon (anonInfo2, l2) -> + SolveAnonInfoEqualsAnonInfo csenv m2 anonInfo1 anonInfo2 ++ (fun () -> + SolveTypEqualsTypEqns csenv ndeep m2 trace None l1 l2) | TType_fun (d1, r1) , TType_fun (d2, r2) -> SolveFunTypEqn csenv ndeep m2 trace None d1 d2 r1 r2 | TType_measure ms1 , TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2 | TType_forall(tps1, rty1), TType_forall(tps2, rty2) -> @@ -859,6 +874,9 @@ and SolveTypSubsumesTyp (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 SolveTypEqualsTypEqns 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 () -> + SolveTypEqualsTypEqns csenv ndeep m2 trace cxsln l1 l2) (* nb. can unify since no variance *) | TType_fun (d1, r1) , TType_fun (d2, r2) -> SolveFunTypEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 (* nb. can unify since no variance *) | TType_measure ms1, TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2 @@ -1232,9 +1250,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 ErrorD (ConstraintSolverError(FSComp.SR.csExpectTypeWithOperatorButGivenFunction(DecompileOpName nm), m, m2)) elif tys |> List.exists (isAnyTupleTy g) then @@ -1276,13 +1309,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 + SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty rty2 ++ (fun () -> + ResultD (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 SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty rty2 ++ (fun () -> ResultD (TTraitSolvedRecdProp(rfinfo, isSetProp))) - | None, Some (calledMeth:CalledMeth<_>) -> + + | None, None, Some (calledMeth:CalledMeth<_>) -> // OK, the constraint is solved. let minfo = calledMeth.Method @@ -1329,8 +1369,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 @@ -1375,9 +1420,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 @@ -2606,7 +2648,7 @@ let CodegenWitnessThatTypSupportsTraitConstraint tcVal g amap m (traitInfo:Trait SolveMemberConstraint csenv true true 0 m NoTrace traitInfo ++ (fun _res -> let sln = match traitInfo.Solution with - | None -> Choice4Of4() + | None -> Choice5Of5() | Some sln -> match sln with | ILMethSln(origTy, extOpt, mref, minst) -> @@ -2619,17 +2661,19 @@ let CodegenWitnessThatTypSupportsTraitConstraint tcVal g amap m (traitInfo:Trait | Some ilActualTypeRef -> let actualTyconRef = Import.ImportILTypeRef amap m ilActualTypeRef MethInfo.CreateILExtensionMeth(amap, m, origTy, actualTyconRef, None, mdef) - Choice1Of4 (ilMethInfo, minst) + Choice1Of5 (ilMethInfo, minst) | FSMethSln(typ, vref, minst) -> - Choice1Of4 (FSMeth(g, typ, vref, None), minst) + Choice1Of5 (FSMeth(g, typ, 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 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 @@ -2660,7 +2704,7 @@ let CodegenWitnessThatTypSupportsTraitConstraint tcVal g amap m (traitInfo:Trait 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 -> @@ -2683,8 +2727,16 @@ let CodegenWitnessThatTypSupportsTraitConstraint tcVal g amap m (traitInfo:Trait 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) let ChooseTyparSolutionAndSolve css denv tp = diff --git a/src/fsharp/FSComp.txt b/src/fsharp/FSComp.txt index f09efb42d99..a212f7def0b 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" @@ -1338,6 +1340,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." @@ -1423,4 +1427,6 @@ notAFunctionButMaybeDeclaration,"This value is not a function and cannot be appl 3219,pickleUnexpectedNonZero,"An error occurred while reading the F# metadata of assembly '%s'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct." 3220,tcTupleMemberNotNormallyUsed,"This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead." 3221,implicitlyDiscardedInSequenceExpression,"This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'." -3222,implicitlyDiscardedSequenceInSequenceExpression,"This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'." \ No newline at end of file +3222,implicitlyDiscardedSequenceInSequenceExpression,"This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'." +3223,parsInvalidAnonRecdExpr,"Invalid anonymous record expression" +3224,parsInvalidAnonRecdType,"Invalid anonymous record type" diff --git a/src/fsharp/FSStrings.resx b/src/fsharp/FSStrings.resx index eb8a8f975cf..48e26fceda4 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/FindUnsolved.fs b/src/fsharp/FindUnsolved.fs index f207262e930..1efe5e0e05c 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 704a92f7600..f5cee3ca886 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -373,7 +373,7 @@ type PtrsOK = | PtrTypesNotOK let rec GenTypeArgAux amap m tyenv tyarg = - GenTypeAux amap m tyenv VoidNotOK PtrTypesNotOK tyarg + GenTypeAuxAux amap m tyenv VoidNotOK PtrTypesNotOK tyarg and GenTypeArgsAux amap m tyenv tyargs = List.map (GenTypeArgAux amap m tyenv) (DropErasedTyargs tyargs) @@ -385,13 +385,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 @@ -404,12 +406,12 @@ and GenNamedTyAppAux (amap:ImportMap) m tyenv ptrsOK tcref tinst = match tcref.TypeReprInfo with // Generate the base type, because that is always the representation of the erased type, unless the assembly is being injected | TProvidedTypeExtensionPoint info when info.IsErased -> - GenTypeAux amap m tyenv VoidNotOK ptrsOK (info.BaseTypeForErased (m,g.obj_ty)) + GenTypeAuxAux amap m tyenv VoidNotOK ptrsOK (info.BaseTypeForErased (m,g.obj_ty)) | _ -> #endif GenTyAppAux amap m tyenv (GenTyconRef tcref) tinst -and GenTypeAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = +and GenTypeAuxAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = let g = amap.g #if DEBUG voidCheck m g voidOK ty @@ -418,16 +420,20 @@ and GenTypeAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = #endif match stripTyEqnsAndMeasureEqns g ty with | TType_app (tcref, tinst) -> GenNamedTyAppAux amap m tyenv ptrsOK tcref tinst - | TType_tuple (tupInfo, args) -> GenTypeAux amap m tyenv VoidNotOK ptrsOK (mkCompiledTupleTy g (evalTupInfoIsStruct tupInfo) args) + | TType_tuple (tupInfo, args) -> GenTypeAuxAux 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 + let cuspec,idx = GenUnionCaseSpecAux amap m tyenv ucref args EraseUnions.GetILTypeForAlternative cuspec idx | TType_forall (tps, tau) -> let tps = DropErasedTypars tps - if tps.IsEmpty then GenTypeAux amap m tyenv VoidNotOK ptrsOK tau + if tps.IsEmpty then GenTypeAuxAux amap m tyenv VoidNotOK ptrsOK tau else EraseClosures.mkILTyFuncTy g.ilxPubCloEnv | TType_var tp -> mkILTyvarTy tyenv.[tp,m] | TType_measure _ -> g.ilg.typ_Int32 @@ -439,7 +445,7 @@ and GenTypeAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = and GenUnionCaseRef (amap: ImportMap) m tyenv i (fspecs:RecdField array) = let g = amap.g fspecs |> Array.mapi (fun j fspec -> - let ilFieldDef = IL.mkILInstanceField(fspec.Name,GenType amap m tyenv fspec.FormalType, None, ILMemberAccess.Public) + let ilFieldDef = IL.mkILInstanceField(fspec.Name,GenTypeAux amap m tyenv fspec.FormalType, None, ILMemberAccess.Public) IlxUnionField { ilFieldDef with // These properties on the "field" of an alternative end up going on a property generated by cu_erase.fs @@ -482,47 +488,26 @@ and ComputeUnionHasHelpers g (tcref : TyconRef) = | _ -> AllHelpers (* not hiddenRepr *) -and GenUnionSpec amap m tyenv tcref tyargs = +and GenUnionSpecAux amap m tyenv tcref tyargs = let curef = GenUnionRef amap m tcref - let tinst = GenTypeArgs amap m tyenv tyargs + let tinst = GenTypeArgsAux amap m tyenv tyargs IlxUnionSpec(curef,tinst) -and GenUnionCaseSpec amap m tyenv (ucref:UnionCaseRef) tyargs = - let cuspec = GenUnionSpec amap m tyenv ucref.TyconRef tyargs +and GenUnionCaseSpecAux amap m tyenv (ucref:UnionCaseRef) tyargs = + let cuspec = GenUnionSpecAux amap m tyenv ucref.TyconRef tyargs cuspec, ucref.Index -and GenType amap m tyenv ty = - GenTypeAux amap m tyenv VoidNotOK PtrTypesNotOK ty - - -and GenTypes amap m tyenv tys = List.map (GenType amap m tyenv) tys -and GenTypePermitVoid amap m tyenv ty = (GenTypeAux amap m tyenv VoidOK PtrTypesNotOK ty) -and GenTypesPermitVoid amap m tyenv tys = List.map (GenTypePermitVoid amap m tyenv) tys - -and GenTyApp amap m tyenv repr tyargs = GenTyAppAux amap m tyenv repr tyargs -and GenNamedTyApp amap m tyenv tcref tinst = GenNamedTyAppAux amap m tyenv PtrTypesNotOK tcref tinst - /// IL void types are only generated for return types -and GenReturnType amap m tyenv returnTyOpt = +and GenReturnTypeAux amap m tyenv returnTyOpt = match returnTyOpt with | None -> ILType.Void - | Some returnTy -> GenTypeAux amap m tyenv VoidNotOK(*1*) PtrTypesOK returnTy (*1: generate void from unit, but not accept void *) - -and GenParamType amap m tyenv ty = - ty |> GenTypeAux amap m tyenv VoidNotOK PtrTypesOK - -and GenParamTypes amap m tyenv tys = - tys |> List.map (GenTypeAux amap m tyenv VoidNotOK PtrTypesOK) - -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 + | Some returnTy -> GenTypeAuxAux amap m tyenv VoidNotOK(*1*) PtrTypesOK returnTy (*1: generate void from unit, but not accept void *) +and GenTypeAux amap m tyenv ty = GenTypeAuxAux amap m tyenv VoidNotOK PtrTypesNotOK ty +and GenTypesAux amap m tyenv tys = List.map (GenTypeAux amap m tyenv) tys +and GenParamTypeAux amap m tyenv ty = GenTypeAuxAux amap m tyenv VoidNotOK PtrTypesOK ty +and GenParamTypesAux amap m tyenv tys = tys |> List.map (GenParamTypeAux amap m tyenv) +and GenTypePermitVoidAux amap m tyenv ty = GenTypeAuxAux 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 @@ -549,12 +534,9 @@ let GenFieldSpecForStaticField (isInteractive, g, ilContainerTy, vspec:Val, nm, let GenRecdFieldRef m cenv tyenv (rfref:RecdFieldRef) tyargs = let tyenvinner = TypeReprEnv.ForTycon rfref.Tycon - mkILFieldSpecInTy(GenTyApp cenv.amap m tyenv rfref.TyconRef.CompiledRepresentation tyargs, + mkILFieldSpecInTy(GenTyAppAux cenv.amap m tyenv rfref.TyconRef.CompiledRepresentation tyargs, ComputeFieldName rfref.Tycon rfref.RecdField, - GenType cenv.amap m tyenvinner rfref.RecdField.FormalType) - -let GenExnType amap m tyenv (ecref:TyconRef) = GenTyApp amap m tyenv ecref.CompiledRepresentation [] - + GenTypeAux cenv.amap m tyenvinner rfref.RecdField.FormalType) //-------------------------------------------------------------------------- // Closure summaries @@ -595,663 +577,827 @@ type IlxClosureInfo = //-------------------------------------------------------------------------- -// Representation of term declarations = Environments for compiling expressions. +// Generate debugging marks //-------------------------------------------------------------------------- - -[] -type ValStorage = - /// Indicates the value is always null - | Null - /// Indicates the value is stored in a static field. - | StaticField of ILFieldSpec * ValRef * (*hasLiteralAttr:*)bool * ILType * string * ILType * ILMethodRef * ILMethodRef * OptionalShadowLocal - /// Indicates the value is "stored" as a property that recomputes it each time it is referenced. Used for simple constants that do not cause initialization triggers - | StaticProperty of ILMethodSpec * OptionalShadowLocal - /// Indicates the value is "stored" as a IL static method (in a "main" class for a F# - /// compilation unit, or as a member) according to its inferred or specified arity. - | Method of ValReprInfo * ValRef * ILMethodSpec * Range.range * ArgReprInfo list * ArgReprInfo - /// Indicates the value is stored at the given position in the closure environment accessed via "ldarg 0" - | Env of ILType * int * ILFieldSpec * NamedLocalIlxClosureInfo ref option - /// Indicates that the value is an argument of a method being generated - | Arg of int - /// Indicates that the value is stored in local of the method being generated. NamedLocalIlxClosureInfo is normally empty. - /// It is non-empty for 'local type functions', see comments on definition of NamedLocalIlxClosureInfo. - | Local of int * NamedLocalIlxClosureInfo ref option +let GenILSourceMarker (g: TcGlobals) (m:range) = + ILSourceMarker.Create(document=g.memoize_file m.FileIndex, + line=m.StartLine, + /// NOTE: .NET && VS measure first column as column 1 + column= m.StartColumn+1, + endLine= m.EndLine, + endColumn=m.EndColumn+1) -and OptionalShadowLocal = - | NoShadowLocal - | ShadowLocal of ValStorage +let GenPossibleILSourceMarker cenv m = + if cenv.opts.generateDebugSymbols then + Some (GenILSourceMarker cenv.g m ) + else + None -/// The representation of a NamedLocalClosure is based on a cloinfo. However we can't generate a cloinfo until we've -/// decided the representations of other items in the recursive set. Hence we use two phases to decide representations in -/// a recursive set. Yuck. -and NamedLocalIlxClosureInfo = - | NamedLocalIlxClosureInfoGenerator of (IlxGenEnv -> IlxClosureInfo) - | NamedLocalIlxClosureInfoGenerated of IlxClosureInfo - -and ModuleStorage = - { Vals: Lazy> - SubModules: Lazy> } +//-------------------------------------------------------------------------- +// Helpers for merging property definitions +//-------------------------------------------------------------------------- -/// BranchCallItems are those where a call to the value can be implemented as -/// a branch. At the moment these are only used for generating branch calls back to -/// the entry label of the method currently being generated. -and BranchCallItem = - | BranchCallClosure of ArityInfo - | BranchCallMethod of - // Argument counts for compiled form of F# method or value - ArityInfo * - // Arg infos for compiled form of F# method or value - (TType * ArgReprInfo) list list * - // Typars for F# method or value - Tast.Typars * - // Typars for F# method or value - int * - // num obj args - int - -and Mark = - | Mark of ILCodeLabel (* places we can branch to *) - member x.CodeLabel = (let (Mark(lab)) = x in lab) +let HashRangeSorted (ht: IDictionary<_, (int * _)>) = + [ for KeyValue(_k,v) in ht -> v ] |> List.sortBy fst |> List.map snd -and IlxGenEnv = - { tyenv: TypeReprEnv - someTypeInThisAssembly: ILType - isFinalFile: bool - /// Where to place the stuff we're currently generating - cloc: CompileLocation - /// Hiding information down the signature chain, used to compute what's public to the assembly - sigToImplRemapInfo: (Remap * SignatureHidingInfo) list - /// All values in scope - valsInScope: ValMap> - /// For optimizing direct tail recursion to a loop - mark says where to branch to. Length is 0 or 1. - /// REVIEW: generalize to arbitrary nested local loops?? - innerVals: (ValRef * (BranchCallItem * Mark)) list - /// Full list of enclosing bound values. First non-compiler-generated element is used to help give nice names for closures and other expressions. - letBoundVars: ValRef list - /// The set of IL local variable indexes currently in use by lexically scoped variables, to allow reuse on different branches. - /// Really an integer set. - liveLocals: IntMap - /// Are we under the scope of a try, catch or finally? If so we can't tailcall. SEH = structured exception handling - withinSEH: bool } +let MergeOptions m o1 o2 = + match o1,o2 with + | Some x, None | None, Some x -> Some x + | None, None -> None + | Some x, Some _ -> +#if DEBUG + // This warning fires on some code that also triggers this warning: + // warning(Error("The implementation of a specified generic interface required a method implementation not fully supported by F# Interactive. In the unlikely event that the resulting class fails to load then compile the interface type into a statically-compiled DLL and reference it using '#r'",m)) + // The code is OK so we don't print this. + errorR(InternalError("MergeOptions: two values given",m)) +#else + ignore m +#endif + Some x -let ReplaceTyenv tyenv (eenv: IlxGenEnv) = {eenv with tyenv = tyenv } -let EnvForTypars tps eenv = {eenv with tyenv = TypeReprEnv.ForTypars tps } -let AddTyparsToEnv typars (eenv: IlxGenEnv) = {eenv with tyenv = eenv.tyenv.Add typars} +let MergePropertyPair m (pd: ILPropertyDef) pdef = + {pd with GetMethod=MergeOptions m pd.GetMethod pdef.GetMethod + SetMethod=MergeOptions m pd.SetMethod pdef.SetMethod} -let AddSignatureRemapInfo _msg (rpi, mhi) eenv = - { eenv with sigToImplRemapInfo = (mkRepackageRemapping rpi,mhi) :: eenv.sigToImplRemapInfo } - -//-------------------------------------------------------------------------- -// Print eenv -//-------------------------------------------------------------------------- +type PropKey = PropKey of string * ILTypes * ILThisConvention -let OutputStorage (pps: TextWriter) s = - match s with - | StaticField _ -> pps.Write "(top)" - | StaticProperty _ -> pps.Write "(top)" - | Method _ -> pps.Write "(top)" - | Local _ -> pps.Write "(local)" - | Arg _ -> pps.Write "(arg)" - | Env _ -> pps.Write "(env)" - | Null -> pps.Write "(null)" +let AddPropertyDefToHash (m:range) (ht:Dictionary) (pdef: ILPropertyDef) = + let nm = PropKey(pdef.Name, pdef.Args, pdef.CallingConv) + if ht.ContainsKey nm then + let idx,pd = ht.[nm] + ht.[nm] <- (idx, MergePropertyPair m pd pdef) + else + ht.[nm] <- (ht.Count, pdef) + + +/// Merge a whole group of properties all at once +let MergePropertyDefs m ilPropertyDefs = + let ht = new Dictionary<_,_>(3,HashIdentity.Structural) + ilPropertyDefs |> List.iter (AddPropertyDefToHash m ht) + HashRangeSorted ht //-------------------------------------------------------------------------- -// Augment eenv with values +// Buffers for compiling modules. The entire assembly gets compiled via an AssemblyBuilder //-------------------------------------------------------------------------- -let AddStorageForVal (g: TcGlobals) (v,s) eenv = - let eenv = { eenv with valsInScope = eenv.valsInScope.Add v s } - // If we're compiling fslib then also bind the value as a non-local path to - // allow us to resolve the compiler-non-local-references that arise from env.fs - // - // Do this by generating a fake "looking from the outside in" non-local value reference for - // v, dereferencing it to find the corresponding signature Val, and adding an entry for the signature val. - // - // A similar code path exists in ilxgen.fs for the tables of "optimization data" for values - if g.compilingFslib then - // Passing an empty remap is sufficient for FSharp.Core.dll because it turns out the remapped type signature can - // still be resolved. - match tryRescopeVal g.fslibCcu Remap.Empty v with - | None -> eenv - | Some vref -> - match vref.TryDeref with - | VNone -> - //let msg = sprintf "could not dereference external value reference to something in FSharp.Core.dll during code generation, v.MangledName = '%s', v.Range = %s" v.MangledName (stringOfRange v.Range) - //System.Diagnostics.Debug.Assert(false, msg) - eenv - | VSome gv -> - { eenv with valsInScope = eenv.valsInScope.Add gv s } - else - eenv +/// Information collected imperatively for each type definition +type TypeDefBuilder(tdef, tdefDiscards) = + let gmethods = new ResizeArray(0) + let gfields = new ResizeArray(0) + let gproperties : Dictionary = new Dictionary<_,_>(3,HashIdentity.Structural) + let gevents = new ResizeArray(0) + let gnested = new TypeDefsBuilder() + + member b.Close() = + { tdef with + Methods = mkILMethods (tdef.Methods.AsList @ ResizeArray.toList gmethods) + Fields = mkILFields (tdef.Fields.AsList @ ResizeArray.toList gfields) + Properties = mkILProperties (tdef.Properties.AsList @ HashRangeSorted gproperties ) + Events = mkILEvents (tdef.Events.AsList @ ResizeArray.toList gevents) + NestedTypes = mkILTypeDefs (tdef.NestedTypes.AsList @ gnested.Close()) } -let AddStorageForLocalVals g vals eenv = List.foldBack (fun (v,s) acc -> AddStorageForVal g (v,notlazy s) acc) vals eenv -//-------------------------------------------------------------------------- -// Lookup eenv -//-------------------------------------------------------------------------- - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library + member b.AddEventDef(edef) = gevents.Add edef + member b.AddFieldDef(ilFieldDef) = gfields.Add ilFieldDef + member b.AddMethodDef(ilMethodDef) = + let discard = + match tdefDiscards with + | Some (mdefDiscard, _) -> mdefDiscard ilMethodDef + | None -> false + if not discard then + gmethods.Add ilMethodDef + member b.NestedTypeDefs = gnested + member b.GetCurrentFields() = gfields |> Seq.readonly -let StorageForVal m v eenv = - let v = - try eenv.valsInScope.[v] - with :? KeyNotFoundException -> - assert false - errorR(Error(FSComp.SR.ilUndefinedValue(showL(vspecAtBindL v)),m)) - notlazy (Arg 668(* random value for post-hoc diagnostic analysis on generated tree *) ) - v.Force() + /// Merge Get and Set property nodes, which we generate independently for F# code + /// when we come across their corresponding methods. + member b.AddOrMergePropertyDef(pdef,m) = + let discard = + match tdefDiscards with + | Some (_, pdefDiscard) -> pdefDiscard pdef + | None -> false + if not discard then + AddPropertyDefToHash m gproperties pdef -let StorageForValRef m (v: ValRef) eenv = StorageForVal m v.Deref eenv + member b.PrependInstructionsToSpecificMethodDef(cond,instrs,tag) = + match ResizeArray.tryFindIndex cond gmethods with + | Some idx -> gmethods.[idx] <- prependInstrsToMethod instrs gmethods.[idx] + | None -> gmethods.Add(mkILClassCtor (mkMethodBody (false,[],1,nonBranchingInstrsToCode instrs,tag))) -//-------------------------------------------------------------------------- -// Imported modules and the environment -// -// How a top level value is represented depends on its type. If it's a -// function or is polymorphic, then it gets represented as a -// method (possibly and instance method). Otherwise it gets represented as a -// static field. -//-------------------------------------------------------------------------- -let IsValRefIsDllImport g (vref:ValRef) = - vref.Attribs |> HasFSharpAttributeOpt g g.attrib_DllImportAttribute +and TypeDefsBuilder() = + let tdefs : Internal.Utilities.Collections.HashMultiMap = HashMultiMap(0, HashIdentity.Structural) + let mutable countDown = System.Int32.MaxValue -let GetMethodSpecForMemberVal amap g (memberInfo:ValMemberInfo) (vref:ValRef) = - let m = vref.Range - let tps,curriedArgInfos,returnTy,retInfo = - assert(vref.ValReprInfo.IsSome) - GetTopValTypeInCompiledForm g (Option.get vref.ValReprInfo) vref.Type m - let tyenvUnderTypars = TypeReprEnv.ForTypars tps - let flatArgInfos = List.concat curriedArgInfos - let isCtor = (memberInfo.MemberFlags.MemberKind = MemberKind.Constructor) - let cctor = (memberInfo.MemberFlags.MemberKind = MemberKind.ClassConstructor) - let parentTcref = vref.TopValDeclaringEntity - let parentTypars = parentTcref.TyparsNoRange - let numParentTypars = parentTypars.Length - if tps.Length < numParentTypars then error(InternalError("CodeGen check: type checking did not ensure that this method is sufficiently generic", m)) - let ctps,mtps = List.chop numParentTypars tps - let isCompiledAsInstance = ValRefIsCompiledAsInstanceMember g vref + member b.Close() = + //The order we emit type definitions is not deterministic since it is using the reverse of a range from a hash table. We should use an approximation of source order. + // Ideally it shouldn't matter which order we use. + // However, for some tests FSI generated code appears sensitive to the order, especially for nested types. + + [ for (b, eliminateIfEmpty) in HashRangeSorted tdefs do + let tdef = b.Close() + // Skip the type if it is empty + if not eliminateIfEmpty + || not tdef.NestedTypes.AsList.IsEmpty + || not tdef.Fields.AsList.IsEmpty + || not tdef.Events.AsList.IsEmpty + || not tdef.Properties.AsList.IsEmpty + || not tdef.Methods.AsList.IsEmpty then + yield tdef ] - let ilActualRetTy = - let ilRetTy = GenReturnType amap m tyenvUnderTypars returnTy - if isCtor || cctor then ILType.Void else ilRetTy - let ilTy = GenType amap m tyenvUnderTypars (mkAppTy parentTcref (List.map mkTyparTy ctps)) - if isCompiledAsInstance || isCtor then - // Find the 'this' argument type if any - let thisTy,flatArgInfos = - if isCtor then (GetFSharpViewOfReturnType g returnTy),flatArgInfos - else - match flatArgInfos with - | [] -> error(InternalError("This instance method '" + vref.LogicalName + "' has no arguments", m)) - | (h,_):: t -> h,t + member b.FindTypeDefBuilder(nm) = + try tdefs.[nm] |> snd |> fst + with :? KeyNotFoundException -> failwith ("FindTypeDefBuilder: " + nm + " not found") - let thisTy = if isByrefTy g thisTy then destByrefTy g thisTy else thisTy - let thisArgTys = argsOfAppTy g thisTy - if ctps.Length <> thisArgTys.Length then - warning(InternalError(sprintf "CodeGen check: type checking did not quantify the correct number of type variables for this method, #parentTypars = %d, #ctps = %d, #mtps = %d, #thisArgTys = %d" numParentTypars ctps.Length mtps.Length thisArgTys.Length,m)) - else - List.iter2 - (fun gtp ty2 -> - if not (typeEquiv g (mkTyparTy gtp) ty2) then - warning(InternalError("CodeGen check: type checking did not quantify the correct type variables for this method: generalization list contained " + gtp.Name + "#" + string gtp.Stamp + " and list from 'this' pointer contained " + (showL(typeL ty2)), m))) - ctps - thisArgTys - let methodArgTys,paramInfos = List.unzip flatArgInfos - let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars methodArgTys - let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy mtps) - let mspec = mkILInstanceMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - - mspec,ctps,mtps,paramInfos,retInfo - else - let methodArgTys,paramInfos = List.unzip flatArgInfos - let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars methodArgTys - let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy mtps) - let mspec = mkILStaticMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - - mspec,ctps,mtps,paramInfos,retInfo + member b.FindNestedTypeDefsBuilder(path) = + List.fold (fun (acc:TypeDefsBuilder) x -> acc.FindTypeDefBuilder(x).NestedTypeDefs) b path -// Generate the ILFieldSpec for a top-level value + member b.FindNestedTypeDefBuilder(tref:ILTypeRef) = + b.FindNestedTypeDefsBuilder(tref.Enclosing).FindTypeDefBuilder(tref.Name) -let ComputeFieldSpecForVal(optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, isInteractive, g, ilTyForProperty, vspec:Val, nm, m, cloc, ilTy, ilGetterMethRef) = - assert vspec.IsCompiledAsTopLevel - let generate() = GenFieldSpecForStaticField (isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy) - match optIntraAssemblyInfo with - | None -> generate() - | Some intraAssemblyInfo -> - if vspec.IsMutable && vspec.IsCompiledAsTopLevel && isStructTy g vspec.Type then - let ok, res = intraAssemblyInfo.StaticFieldInfo.TryGetValue ilGetterMethRef - if ok then - res - else - let res = generate() - intraAssemblyInfo.StaticFieldInfo.[ilGetterMethRef] <- res - res - else - generate() + member b.AddTypeDef(tdef:ILTypeDef, eliminateIfEmpty, addAtEnd, tdefDiscards) = + 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 -let IsValCompiledAsMethod g (v:Val) = - match v.ValReprInfo with - | None -> false - | Some topValInfo -> - not (isUnitTy g v.Type && not v.IsMemberOrModuleBinding && not v.IsMutable) && - not v.IsCompiledAsStaticPropertyWithoutField && - match GetTopValTypeInFSharpForm g topValInfo v.Type v.Range with - | [],[],_,_ when not v.IsMember -> false - | _ -> true +/// Assembly generation buffers +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 : Dictionary = Dictionary(HashIdentity.Reference) + let mutable extraBindingsToGenerate = [] -// This called via 2 routes. -// (a) ComputeAndAddStorageForLocalTopVal -// (b) ComputeStorageForNonLocalTopVal -// -/// This function decides the storage for the val. -/// The decision is based on arityInfo. -let ComputeStorageForTopVal (amap, g, optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, isInteractive, optShadowLocal, vref:ValRef, cloc) = + // A memoization table for generating value types for big constant arrays + let rawDataValueTypeGenerator = + new MemoizationTable<(CompileLocation * int) , ILTypeSpec> + ((fun (cloc,size) -> + let name = CompilerGeneratedName ("T" + string(newUnique()) + "_" + string size + "Bytes") // Type names ending ...$T_37Bytes + let vtdef = mkRawDataValueTypeDef cenv.g.iltyp_ValueType (name,size,0us) + let vtref = NestedTypeRefForCompLoc cloc vtdef.Name + let vtspec = mkILTySpec(vtref,[]) + let vtdef = vtdef.WithAccess(ComputeTypeAccess vtref true) + mgbuf.AddTypeDef(vtref, vtdef, false, true, None) + vtspec), + keyComparer=HashIdentity.Structural) - if isUnitTy g vref.Type && not vref.IsMemberOrModuleBinding && not vref.IsMutable then - Null - else - let topValInfo = - match vref.ValReprInfo with - | None -> error(InternalError("ComputeStorageForTopVal: no arity found for " + showL(valRefL vref),vref.Range)) - | Some a -> a + let generateAnonType genToStringMethod (isStruct, ilTypeRef, nms) = - let m = vref.Range - let nm = vref.CompiledName - - if vref.Deref.IsCompiledAsStaticPropertyWithoutField then - let nm = "get_"+nm - let tyenvUnderTypars = TypeReprEnv.ForTypars [] - let ilRetTy = GenType amap m tyenvUnderTypars vref.Type - let typ = mkILTyForCompLoc cloc - let mspec = mkILStaticMethSpecInTy (typ, nm, [], ilRetTy, []) - - StaticProperty (mspec, optShadowLocal) - else + 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 + CustomAttrs = emptyILCustomAttrs + HasReferenceTypeConstraint=false + HasNotNullableValueTypeConstraint=false + HasDefaultConstructorConstraint= false } ] + + let ilTy = mkILFormalNamedTy (if isStruct then ILBoxity.AsValue else ILBoxity.AsObject) ilTypeRef ilGenericParams - // Determine when a static field is required. - // - // REVIEW: This call to GetTopValTypeInFSharpForm is only needed to determine if this is a (type) function or a value - // We should just look at the arity - match GetTopValTypeInFSharpForm g topValInfo vref.Type vref.Range with - | [],[], returnTy,_ when not vref.IsMember -> - // Mutable and literal static fields must have stable names and live in the "public" location - // See notes on GenFieldSpecForStaticField above. - let vspec = vref.Deref - let ilTy = GenType amap m TypeReprEnv.Empty returnTy (* TypeReprEnv.Empty ok: not a field in a generic class *) - let ilTyForProperty = mkILTyForCompLoc cloc - let attribs = vspec.Attribs - let hasLiteralAttr = HasFSharpAttribute g g.attrib_LiteralAttribute attribs + // 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 -> + { Name = propName + Attributes = PropertyAttributes.None + SetMethod = None + GetMethod = Some(mkILMethRef(ilTypeRef,ILCallingConv.Instance,"get_" + propName,0,[],fldTy )) + CallingConv = ILCallingConv.Instance.ThisConv + Type = 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 ilTypeRefForProperty = ilTyForProperty.TypeRef - let ilGetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "get_"+nm, 0, [], ilTy) - let ilSetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "set_"+nm, 0, [ilTy], ILType.Void) + 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 -> GenTypeAux 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 fspec = ComputeFieldSpecForVal(optIntraAssemblyInfo, isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy, ilGetterMethRef) + let ilTypeDef = ilTypeDef.WithSealed(true).WithSerializable(true) - StaticField (fspec, vref, hasLiteralAttr, ilTyForProperty, nm, ilTy, ilGetterMethRef, ilSetterMethRef, optShadowLocal) - - | _ -> - match vref.MemberInfo with - | Some memberInfo when not vref.IsExtensionMember -> - let mspec,_,_,paramInfos,retInfo = GetMethodSpecForMemberVal amap g memberInfo vref - Method (topValInfo, vref, mspec, m, paramInfos, retInfo) - | _ -> - let (tps, curriedArgInfos, returnTy, retInfo) = GetTopValTypeInCompiledForm g topValInfo vref.Type m - let tyenvUnderTypars = TypeReprEnv.ForTypars tps - let (methodArgTys,paramInfos) = curriedArgInfos |> List.concat |> List.unzip - let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars methodArgTys - let ilRetTy = GenReturnType amap m tyenvUnderTypars returnTy - let ilLocTy = mkILTyForCompLoc cloc - let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy tps) - let mspec = mkILStaticMethSpecInTy (ilLocTy, nm, ilMethodArgTys, ilRetTy, ilMethodInst) - Method (topValInfo, vref, mspec, m, paramInfos, retInfo) + let ilTypeDef = { ilTypeDef with MethodImpls=mkILMethodImpls [] } + + 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 ComputeAndAddStorageForLocalTopVal (amap, g, intraAssemblyFieldTable, isInteractive, optShadowLocal) cloc (v:Val) eenv = - let storage = ComputeStorageForTopVal (amap, g, Some intraAssemblyFieldTable, isInteractive, optShadowLocal, mkLocalValRef v, cloc) - AddStorageForVal g (v,notlazy storage) eenv + let optimizedExtraBindings = extraBindings |> List.map (fun (TBind(a,b,c)) -> TBind(a,cenv.optimizeDuringCodeGen b,c)) -let ComputeStorageForNonLocalTopVal amap g cloc modref (v:Val) = - match v.ValReprInfo with - | None -> error(InternalError("ComputeStorageForNonLocalTopVal, expected an arity for " + v.LogicalName,v.Range)) - | Some _ -> ComputeStorageForTopVal (amap, g, None, false, NoShadowLocal, mkNestedValRef modref v, cloc) + extraBindingsToGenerate <- optimizedExtraBindings @ extraBindingsToGenerate -let rec ComputeStorageForNonLocalModuleOrNamespaceRef amap g cloc acc (modref:ModuleOrNamespaceRef) (modul:ModuleOrNamespace) = - let acc = - (acc, modul.ModuleOrNamespaceType.ModuleAndNamespaceDefinitions) ||> List.fold (fun acc smodul -> - ComputeStorageForNonLocalModuleOrNamespaceRef amap g (CompLocForSubModuleOrNamespace cloc smodul) acc (modref.NestedTyconRef smodul) smodul) + (ilCtorRef,ilMethodRefs,ilTy) - let acc = - (acc, modul.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> - AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc modref v)) acc) - acc + let mutable explicitEntryPointInfo : ILTypeRef option = None -let ComputeStorageForExternalCcu amap g eenv (ccu:CcuThunk) = - if not ccu.IsFSharp then eenv else - let cloc = CompLocForCcu ccu - let eenv = - List.foldBack - (fun smodul acc -> - let cloc = CompLocForSubModuleOrNamespace cloc smodul - let modref = mkNonLocalCcuRootEntityRef ccu smodul - ComputeStorageForNonLocalModuleOrNamespaceRef amap g cloc acc modref smodul) - ccu.RootModulesAndNamespaces - eenv - let eenv = - let eref = ERefNonLocalPreResolved ccu.Contents (mkNonLocalEntityRef ccu [| |]) - (eenv, ccu.Contents.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> - AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc eref v)) acc) - eenv + /// static init fields on script modules. + let mutable scriptInitFspecs : (ILFieldSpec * range) list = [] -let rec AddBindingsForLocalModuleType allocVal cloc eenv (mty:ModuleOrNamespaceType) = - let eenv = List.fold (fun eenv submodul -> AddBindingsForLocalModuleType allocVal (CompLocForSubModuleOrNamespace cloc submodul) eenv submodul.ModuleOrNamespaceType) eenv mty.ModuleAndNamespaceDefinitions - let eenv = Seq.fold (fun eenv v -> allocVal cloc v eenv) eenv mty.AllValsAndMembers - eenv + member mgbuf.AddScriptInitFieldSpec(fieldSpec,range) = + scriptInitFspecs <- (fieldSpec,range) :: scriptInitFspecs + + /// This initializes the script in #load and fsc command-line order causing their + /// sideeffects to be executed. + member mgbuf.AddInitializeScriptsInOrderToEntryPoint() = + // Get the entry point and initialized any scripts in order. + match explicitEntryPointInfo with + | Some tref -> + let IntializeCompiledScript(fspec,m) = + mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.IsEntryPoint), tref, fspec, GenPossibleILSourceMarker cenv m, [], []) + scriptInitFspecs |> List.iter IntializeCompiledScript + | None -> () -let AddExternalCcusToIlxGenEnv amap g eenv ccus = List.fold (ComputeStorageForExternalCcu amap g) eenv ccus + 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 + rawDataValueTypeGenerator.Apply((cloc,size)) -let AddBindingsForTycon allocVal (cloc:CompileLocation) (tycon:Tycon) eenv = - let unrealizedSlots = - if tycon.IsFSharpObjectModelTycon - then tycon.FSharpObjectModelTypeInfo.fsobjmodel_vslots - else [] - (eenv,unrealizedSlots) ||> List.fold (fun eenv vref -> allocVal cloc vref.Deref eenv) + 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 -let rec AddBindingsForModuleDefs allocVal (cloc:CompileLocation) eenv mdefs = - List.fold (AddBindingsForModuleDef allocVal cloc) eenv mdefs + 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 -and AddBindingsForModuleDef allocVal cloc eenv x = - match x with - | TMDefRec(_isRec,tycons,mbinds,_) -> - (* Virtual don't have 'let' bindings and must be added to the environment *) - let eenv = List.foldBack (AddBindingsForTycon allocVal cloc) tycons eenv - let eenv = List.foldBack (AddBindingsForModule allocVal cloc) mbinds eenv - eenv - | TMDefLet(bind,_) -> - allocVal cloc bind.Var eenv - | TMDefDo _ -> - eenv - | TMAbstract(ModuleOrNamespaceExprWithSig(mtyp,_,_)) -> - AddBindingsForLocalModuleType allocVal cloc eenv mtyp - | TMDefs(mdefs) -> - AddBindingsForModuleDefs allocVal cloc eenv mdefs + member mgbuf.GrabExtraBindingsToGenerate() = + let result = extraBindingsToGenerate + extraBindingsToGenerate <- [] + result -and AddBindingsForModule allocVal cloc x eenv = - match x with - | ModuleOrNamespaceBinding.Binding bind -> - allocVal cloc bind.Var eenv - | ModuleOrNamespaceBinding.Module (mspec, mdef) -> - let cloc = - if mspec.IsNamespace then cloc - else CompLocForFixedModule cloc.clocQualifiedNameOfFile cloc.clocTopImplQualifiedName mspec - - AddBindingsForModuleDef allocVal cloc eenv mdef + member mgbuf.AddTypeDef(tref:ILTypeRef, tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) = + gtdefs.FindNestedTypeDefsBuilder(tref.Enclosing).AddTypeDef(tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) -and AddBindingsForModuleTopVals _g allocVal _cloc eenv vs = - List.foldBack allocVal vs eenv + member mgbuf.GetCurrentFields(tref:ILTypeRef) = + gtdefs.FindNestedTypeDefBuilder(tref).GetCurrentFields() + member mgbuf.AddReflectedDefinition(vspec : Tast.Val,expr) = + // preserve order by storing index of item + let n = reflectedDefinitions.Count + reflectedDefinitions.Add(vspec, (vspec.CompiledName, n, expr)) + + member mgbuf.ReplaceNameOfReflectedDefinition(vspec, newName) = + match reflectedDefinitions.TryGetValue vspec with + | true, (name, n, expr) when name <> newName -> reflectedDefinitions.[vspec] <- (newName, n, expr) + | _ -> () -// Put the partial results for a generated fragment (i.e. a part of a CCU generated by FSI) -// into the stored results for the whole CCU. -// isIncrementalFragment = true --> "typed input" -// isIncrementalFragment = false --> "#load" -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,_,_)) -> - let cloc = { cloc with clocTopImplQualifiedName = qname.Text } - if isIncrementalFragment then - match mexpr with - | ModuleOrNamespaceExprWithSig(_,mdef,_) -> AddBindingsForModuleDef allocVal cloc eenv mdef - (* | ModuleOrNamespaceExprWithSig(mtyp,_,m) -> error(Error("don't expect inner defs to have a constraint",m)) *) - else - AddBindingsForLocalModuleType allocVal cloc eenv mexpr.Type) + member mgbuf.AddMethodDef(tref:ILTypeRef,ilMethodDef) = + gtdefs.FindNestedTypeDefBuilder(tref).AddMethodDef(ilMethodDef) + if ilMethodDef.IsEntryPoint then + explicitEntryPointInfo <- Some(tref) + + member mgbuf.AddExplicitInitToSpecificMethodDef(cond,tref,fspec,sourceOpt,feefee,seqpt) = + // Authoring a .cctor with effects forces the cctor for the 'initialization' module by doing a dummy store & load of a field + // Doing both a store and load keeps FxCop happier because it thinks the field is useful + let instrs = + [ yield! (if condition "NO_ADD_FEEFEE_TO_CCTORS" then [] elif condition "ADD_SEQPT_TO_CCTORS" then seqpt else feefee) // mark start of hidden code + yield mkLdcInt32 0 + yield mkNormalStsfld fspec + yield mkNormalLdsfld fspec + yield AI_pop] + gtdefs.FindNestedTypeDefBuilder(tref).PrependInstructionsToSpecificMethodDef(cond,instrs,sourceOpt) + + member mgbuf.AddEventDef(tref,edef) = + gtdefs.FindNestedTypeDefBuilder(tref).AddEventDef(edef) + member mgbuf.AddFieldDef(tref,ilFieldDef) = + gtdefs.FindNestedTypeDefBuilder(tref).AddFieldDef(ilFieldDef) + + member mgbuf.AddOrMergePropertyDef(tref,pdef,m) = + gtdefs.FindNestedTypeDefBuilder(tref).AddOrMergePropertyDef(pdef,m) + + member mgbuf.Close() = + // old implementation adds new element to the head of list so result was accumulated in reversed order + let orderedReflectedDefinitions = + [for (KeyValue(vspec, (name, n, expr))) in reflectedDefinitions -> n, ((name,vspec), expr)] + |> List.sortBy (fst >> (~-)) // invert the result to get 'order-by-descending' behavior (items in list are 0..* so we don't need to worry about int.MinValue) + |> List.map snd + gtdefs.Close(), orderedReflectedDefinitions + member mgbuf.cenv = cenv + member mgbuf.GetExplicitEntryPointInfo() = explicitEntryPointInfo + +/// Type generators which walk the types first to make sure all anonymous types are generated +let GenType cenv m tyenv ty = GenTypeAux cenv.amap m tyenv ty +let GenTypes cenv m tyenv tys = GenTypesAux cenv.amap m tyenv tys +let GenUnionCaseSpec cenv m tyenv c tyargs = GenUnionCaseSpecAux cenv.amap m tyenv c tyargs +let GenUnionSpec cenv m tyenv tcref tyargs = GenUnionSpecAux cenv.amap m tyenv tcref tyargs +let GenTypePermitVoid cenv m tyenv ty = GenTypeAuxAux cenv.amap m tyenv VoidOK PtrTypesNotOK ty +let GenTypesPermitVoid cenv m tyenv tys = List.map (GenTypePermitVoid cenv m tyenv) tys +let GenTyApp cenv m tyenv repr tyargs = GenTyAppAux cenv.amap m tyenv repr tyargs +let GenNamedTyApp cenv m tyenv tcref tinst = GenNamedTyAppAux cenv.amap m tyenv PtrTypesNotOK tcref tinst +let GenReturnType cenv m tyenv returnTyOpt = GenReturnTypeAux cenv.amap m tyenv returnTyOpt +let GenParamType cenv m tyenv ty = GenParamTypeAux cenv.amap m tyenv ty +let GenParamTypes cenv m tyenv tys = GenParamTypesAux cenv.amap m tyenv tys +let GenTypeArgs cenv m tyenv tyargs = GenTypeArgsAux cenv.amap m tyenv tyargs +let GenExnType amap m tyenv (ecref:TyconRef) = GenTyAppAux amap m tyenv ecref.CompiledRepresentation [] + //-------------------------------------------------------------------------- -// Generate debugging marks +// Representation of term declarations = Environments for compiling expressions. //-------------------------------------------------------------------------- -let GenILSourceMarker (g: TcGlobals) (m:range) = - ILSourceMarker.Create(document=g.memoize_file m.FileIndex, - line=m.StartLine, - /// NOTE: .NET && VS measure first column as column 1 - column= m.StartColumn+1, - endLine= m.EndLine, - endColumn=m.EndColumn+1) + +[] +type ValStorage = + /// Indicates the value is always null + | Null + /// Indicates the value is stored in a static field. + | StaticField of ILFieldSpec * ValRef * (*hasLiteralAttr:*)bool * ILType * string * ILType * ILMethodRef * ILMethodRef * OptionalShadowLocal + /// Indicates the value is "stored" as a property that recomputes it each time it is referenced. Used for simple constants that do not cause initialization triggers + | StaticProperty of ILMethodSpec * OptionalShadowLocal + /// Indicates the value is "stored" as a IL static method (in a "main" class for a F# + /// compilation unit, or as a member) according to its inferred or specified arity. + | Method of ValReprInfo * ValRef * ILMethodSpec * Range.range * ArgReprInfo list * ArgReprInfo + /// Indicates the value is stored at the given position in the closure environment accessed via "ldarg 0" + | Env of ILType * int * ILFieldSpec * NamedLocalIlxClosureInfo ref option + /// Indicates that the value is an argument of a method being generated + | Arg of int + /// Indicates that the value is stored in local of the method being generated. NamedLocalIlxClosureInfo is normally empty. + /// It is non-empty for 'local type functions', see comments on definition of NamedLocalIlxClosureInfo. + | Local of int * NamedLocalIlxClosureInfo ref option -let GenPossibleILSourceMarker cenv m = - if cenv.opts.generateDebugSymbols then - Some (GenILSourceMarker cenv.g m ) - else - None +and OptionalShadowLocal = + | NoShadowLocal + | ShadowLocal of ValStorage -//-------------------------------------------------------------------------- -// Helpers for merging property definitions -//-------------------------------------------------------------------------- +/// The representation of a NamedLocalClosure is based on a cloinfo. However we can't generate a cloinfo until we've +/// decided the representations of other items in the recursive set. Hence we use two phases to decide representations in +/// a recursive set. Yuck. +and NamedLocalIlxClosureInfo = + | NamedLocalIlxClosureInfoGenerator of (IlxGenEnv -> IlxClosureInfo) + | NamedLocalIlxClosureInfoGenerated of IlxClosureInfo + +and ModuleStorage = + { Vals: Lazy> + SubModules: Lazy> } -let HashRangeSorted (ht: IDictionary<_, (int * _)>) = - [ for KeyValue(_k,v) in ht -> v ] |> List.sortBy fst |> List.map snd +/// BranchCallItems are those where a call to the value can be implemented as +/// a branch. At the moment these are only used for generating branch calls back to +/// the entry label of the method currently being generated. +and BranchCallItem = + | BranchCallClosure of ArityInfo + | BranchCallMethod of + // Argument counts for compiled form of F# method or value + ArityInfo * + // Arg infos for compiled form of F# method or value + (TType * ArgReprInfo) list list * + // Typars for F# method or value + Tast.Typars * + // Typars for F# method or value + int * + // num obj args + int + +and Mark = + | Mark of ILCodeLabel (* places we can branch to *) + member x.CodeLabel = (let (Mark(lab)) = x in lab) -let MergeOptions m o1 o2 = - match o1,o2 with - | Some x, None | None, Some x -> Some x - | None, None -> None - | Some x, Some _ -> -#if DEBUG - // This warning fires on some code that also triggers this warning: - // warning(Error("The implementation of a specified generic interface required a method implementation not fully supported by F# Interactive. In the unlikely event that the resulting class fails to load then compile the interface type into a statically-compiled DLL and reference it using '#r'",m)) - // The code is OK so we don't print this. - errorR(InternalError("MergeOptions: two values given",m)) -#else - ignore m -#endif - Some x +and IlxGenEnv = + { tyenv: TypeReprEnv + someTypeInThisAssembly: ILType + isFinalFile: bool + /// Where to place the stuff we're currently generating + cloc: CompileLocation + /// Hiding information down the signature chain, used to compute what's public to the assembly + sigToImplRemapInfo: (Remap * SignatureHidingInfo) list + /// All values in scope + valsInScope: ValMap> + /// For optimizing direct tail recursion to a loop - mark says where to branch to. Length is 0 or 1. + /// REVIEW: generalize to arbitrary nested local loops?? + innerVals: (ValRef * (BranchCallItem * Mark)) list + /// Full list of enclosing bound values. First non-compiler-generated element is used to help give nice names for closures and other expressions. + letBoundVars: ValRef list + /// The set of IL local variable indexes currently in use by lexically scoped variables, to allow reuse on different branches. + /// Really an integer set. + liveLocals: IntMap + /// Are we under the scope of a try, catch or finally? If so we can't tailcall. SEH = structured exception handling + withinSEH: bool } -let MergePropertyPair m (pd: ILPropertyDef) pdef = - {pd with GetMethod=MergeOptions m pd.GetMethod pdef.GetMethod - SetMethod=MergeOptions m pd.SetMethod pdef.SetMethod} +let ReplaceTyenv tyenv (eenv: IlxGenEnv) = {eenv with tyenv = tyenv } +let EnvForTypars tps eenv = {eenv with tyenv = TypeReprEnv.ForTypars tps } +let AddTyparsToEnv typars (eenv: IlxGenEnv) = {eenv with tyenv = eenv.tyenv.Add typars} -type PropKey = PropKey of string * ILTypes * ILThisConvention +let AddSignatureRemapInfo _msg (rpi, mhi) eenv = + { eenv with sigToImplRemapInfo = (mkRepackageRemapping rpi,mhi) :: eenv.sigToImplRemapInfo } + +//-------------------------------------------------------------------------- +// Print eenv +//-------------------------------------------------------------------------- -let AddPropertyDefToHash (m:range) (ht:Dictionary) (pdef: ILPropertyDef) = - let nm = PropKey(pdef.Name, pdef.Args, pdef.CallingConv) - if ht.ContainsKey nm then - let idx,pd = ht.[nm] - ht.[nm] <- (idx, MergePropertyPair m pd pdef) +let OutputStorage (pps: TextWriter) s = + match s with + | StaticField _ -> pps.Write "(top)" + | StaticProperty _ -> pps.Write "(top)" + | Method _ -> pps.Write "(top)" + | Local _ -> pps.Write "(local)" + | Arg _ -> pps.Write "(arg)" + | Env _ -> pps.Write "(env)" + | Null -> pps.Write "(null)" + +//-------------------------------------------------------------------------- +// Augment eenv with values +//-------------------------------------------------------------------------- + +let AddStorageForVal (g: TcGlobals) (v,s) eenv = + let eenv = { eenv with valsInScope = eenv.valsInScope.Add v s } + // If we're compiling fslib then also bind the value as a non-local path to + // allow us to resolve the compiler-non-local-references that arise from env.fs + // + // Do this by generating a fake "looking from the outside in" non-local value reference for + // v, dereferencing it to find the corresponding signature Val, and adding an entry for the signature val. + // + // A similar code path exists in ilxgen.fs for the tables of "optimization data" for values + if g.compilingFslib then + // Passing an empty remap is sufficient for FSharp.Core.dll because it turns out the remapped type signature can + // still be resolved. + match tryRescopeVal g.fslibCcu Remap.Empty v with + | None -> eenv + | Some vref -> + match vref.TryDeref with + | VNone -> + //let msg = sprintf "could not dereference external value reference to something in FSharp.Core.dll during code generation, v.MangledName = '%s', v.Range = %s" v.MangledName (stringOfRange v.Range) + //System.Diagnostics.Debug.Assert(false, msg) + eenv + | VSome gv -> + { eenv with valsInScope = eenv.valsInScope.Add gv s } else - ht.[nm] <- (ht.Count, pdef) - + eenv -/// Merge a whole group of properties all at once -let MergePropertyDefs m ilPropertyDefs = - let ht = new Dictionary<_,_>(3,HashIdentity.Structural) - ilPropertyDefs |> List.iter (AddPropertyDefToHash m ht) - HashRangeSorted ht +let AddStorageForLocalVals g vals eenv = List.foldBack (fun (v,s) acc -> AddStorageForVal g (v,notlazy s) acc) vals eenv //-------------------------------------------------------------------------- -// Buffers for compiling modules. The entire assembly gets compiled via an AssemblyBuilder +// Lookup eenv //-------------------------------------------------------------------------- + +open Microsoft.FSharp.Compiler.AbstractIL +open Microsoft.FSharp.Compiler.AbstractIL.Internal +open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -/// Information collected imperatively for each type definition -type TypeDefBuilder(tdef, tdefDiscards) = - let gmethods = new ResizeArray(0) - let gfields = new ResizeArray(0) - let gproperties : Dictionary = new Dictionary<_,_>(3,HashIdentity.Structural) - let gevents = new ResizeArray(0) - let gnested = new TypeDefsBuilder() - - member b.Close() = - { tdef with - Methods = mkILMethods (tdef.Methods.AsList @ ResizeArray.toList gmethods) - Fields = mkILFields (tdef.Fields.AsList @ ResizeArray.toList gfields) - Properties = mkILProperties (tdef.Properties.AsList @ HashRangeSorted gproperties ) - Events = mkILEvents (tdef.Events.AsList @ ResizeArray.toList gevents) - NestedTypes = mkILTypeDefs (tdef.NestedTypes.AsList @ gnested.Close()) } +let StorageForVal m v eenv = + let v = + try eenv.valsInScope.[v] + with :? KeyNotFoundException -> + assert false + errorR(Error(FSComp.SR.ilUndefinedValue(showL(vspecAtBindL v)),m)) + notlazy (Arg 668(* random value for post-hoc diagnostic analysis on generated tree *) ) + v.Force() +let StorageForValRef m (v: ValRef) eenv = StorageForVal m v.Deref eenv - member b.AddEventDef(edef) = gevents.Add edef - member b.AddFieldDef(ilFieldDef) = gfields.Add ilFieldDef - member b.AddMethodDef(ilMethodDef) = - let discard = - match tdefDiscards with - | Some (mdefDiscard, _) -> mdefDiscard ilMethodDef - | None -> false - if not discard then - gmethods.Add ilMethodDef - member b.NestedTypeDefs = gnested - member b.GetCurrentFields() = gfields |> Seq.readonly +//-------------------------------------------------------------------------- +// Imported modules and the environment +// +// How a top level value is represented depends on its type. If it's a +// function or is polymorphic, then it gets represented as a +// method (possibly and instance method). Otherwise it gets represented as a +// static field. +//-------------------------------------------------------------------------- - /// Merge Get and Set property nodes, which we generate independently for F# code - /// when we come across their corresponding methods. - member b.AddOrMergePropertyDef(pdef,m) = - let discard = - match tdefDiscards with - | Some (_, pdefDiscard) -> pdefDiscard pdef - | None -> false - if not discard then - AddPropertyDefToHash m gproperties pdef +let IsValRefIsDllImport g (vref:ValRef) = + vref.Attribs |> HasFSharpAttributeOpt g g.attrib_DllImportAttribute - member b.PrependInstructionsToSpecificMethodDef(cond,instrs,tag) = - match ResizeArray.tryFindIndex cond gmethods with - | Some idx -> gmethods.[idx] <- prependInstrsToMethod instrs gmethods.[idx] - | None -> gmethods.Add(mkILClassCtor (mkMethodBody (false,[],1,nonBranchingInstrsToCode instrs,tag))) +let GetMethodSpecForMemberVal amap g (memberInfo:ValMemberInfo) (vref:ValRef) = + let m = vref.Range + let tps,curriedArgInfos,returnTy,retInfo = + assert(vref.ValReprInfo.IsSome) + GetTopValTypeInCompiledForm g (Option.get vref.ValReprInfo) vref.Type m + let tyenvUnderTypars = TypeReprEnv.ForTypars tps + let flatArgInfos = List.concat curriedArgInfos + let isCtor = (memberInfo.MemberFlags.MemberKind = MemberKind.Constructor) + let cctor = (memberInfo.MemberFlags.MemberKind = MemberKind.ClassConstructor) + let parentTcref = vref.TopValDeclaringEntity + let parentTypars = parentTcref.TyparsNoRange + let numParentTypars = parentTypars.Length + if tps.Length < numParentTypars then error(InternalError("CodeGen check: type checking did not ensure that this method is sufficiently generic", m)) + let ctps,mtps = List.chop numParentTypars tps + let isCompiledAsInstance = ValRefIsCompiledAsInstanceMember g vref + let ilActualRetTy = + let ilRetTy = GenReturnTypeAux amap m tyenvUnderTypars returnTy + if isCtor || cctor then ILType.Void else ilRetTy -and TypeDefsBuilder() = - let tdefs : Internal.Utilities.Collections.HashMultiMap = HashMultiMap(0, HashIdentity.Structural) - let mutable countDown = System.Int32.MaxValue + let ilTy = GenTypeAux amap m tyenvUnderTypars (mkAppTy parentTcref (List.map mkTyparTy ctps)) - member b.Close() = - //The order we emit type definitions is not deterministic since it is using the reverse of a range from a hash table. We should use an approximation of source order. - // Ideally it shouldn't matter which order we use. - // However, for some tests FSI generated code appears sensitive to the order, especially for nested types. + if isCompiledAsInstance || isCtor then + // Find the 'this' argument type if any + let thisTy,flatArgInfos = + if isCtor then (GetFSharpViewOfReturnType g returnTy),flatArgInfos + else + match flatArgInfos with + | [] -> error(InternalError("This instance method '" + vref.LogicalName + "' has no arguments", m)) + | (h,_):: t -> h,t + + let thisTy = if isByrefTy g thisTy then destByrefTy g thisTy else thisTy + let thisArgTys = argsOfAppTy g thisTy + if ctps.Length <> thisArgTys.Length then + warning(InternalError(sprintf "CodeGen check: type checking did not quantify the correct number of type variables for this method, #parentTypars = %d, #ctps = %d, #mtps = %d, #thisArgTys = %d" numParentTypars ctps.Length mtps.Length thisArgTys.Length,m)) + else + List.iter2 + (fun gtp ty2 -> + if not (typeEquiv g (mkTyparTy gtp) ty2) then + warning(InternalError("CodeGen check: type checking did not quantify the correct type variables for this method: generalization list contained " + gtp.Name + "#" + string gtp.Stamp + " and list from 'this' pointer contained " + (showL(typeL ty2)), m))) + ctps + thisArgTys + let methodArgTys,paramInfos = List.unzip flatArgInfos + let ilMethodArgTys = GenParamTypesAux amap m tyenvUnderTypars methodArgTys + let ilMethodInst = GenTypeArgsAux amap m tyenvUnderTypars (List.map mkTyparTy mtps) + let mspec = mkILInstanceMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - [ for (b, eliminateIfEmpty) in HashRangeSorted tdefs do - let tdef = b.Close() - // Skip the type if it is empty - if not eliminateIfEmpty - || not tdef.NestedTypes.AsList.IsEmpty - || not tdef.Fields.AsList.IsEmpty - || not tdef.Events.AsList.IsEmpty - || not tdef.Properties.AsList.IsEmpty - || not tdef.Methods.AsList.IsEmpty then - yield tdef ] + mspec,ctps,mtps,paramInfos,retInfo + else + let methodArgTys,paramInfos = List.unzip flatArgInfos + let ilMethodArgTys = GenParamTypesAux amap m tyenvUnderTypars methodArgTys + let ilMethodInst = GenTypeArgsAux amap m tyenvUnderTypars (List.map mkTyparTy mtps) + let mspec = mkILStaticMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) + + mspec,ctps,mtps,paramInfos,retInfo + +// Generate the ILFieldSpec for a top-level value + +let ComputeFieldSpecForVal(optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, isInteractive, g, ilTyForProperty, vspec:Val, nm, m, cloc, ilTy, ilGetterMethRef) = + assert vspec.IsCompiledAsTopLevel + let generate() = GenFieldSpecForStaticField (isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy) + match optIntraAssemblyInfo with + | None -> generate() + | Some intraAssemblyInfo -> + if vspec.IsMutable && vspec.IsCompiledAsTopLevel && isStructTy g vspec.Type then + let ok, res = intraAssemblyInfo.StaticFieldInfo.TryGetValue ilGetterMethRef + if ok then + res + else + let res = generate() + intraAssemblyInfo.StaticFieldInfo.[ilGetterMethRef] <- res + res + else + generate() + +let IsValCompiledAsMethod g (v:Val) = + match v.ValReprInfo with + | None -> false + | Some topValInfo -> + not (isUnitTy g v.Type && not v.IsMemberOrModuleBinding && not v.IsMutable) && + not v.IsCompiledAsStaticPropertyWithoutField && + match GetTopValTypeInFSharpForm g topValInfo v.Type v.Range with + | [],[],_,_ when not v.IsMember -> false + | _ -> true + +// This called via 2 routes. +// (a) ComputeAndAddStorageForLocalTopVal +// (b) ComputeStorageForNonLocalTopVal +// +/// This function decides the storage for the val. +/// The decision is based on arityInfo. +let ComputeStorageForTopVal (amap, g, optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, isInteractive, optShadowLocal, vref:ValRef, cloc) = + + if isUnitTy g vref.Type && not vref.IsMemberOrModuleBinding && not vref.IsMutable then + Null + else + let topValInfo = + match vref.ValReprInfo with + | None -> error(InternalError("ComputeStorageForTopVal: no arity found for " + showL(valRefL vref),vref.Range)) + | Some a -> a + + let m = vref.Range + let nm = vref.CompiledName - member b.FindTypeDefBuilder(nm) = - try tdefs.[nm] |> snd |> fst - with :? KeyNotFoundException -> failwith ("FindTypeDefBuilder: " + nm + " not found") + if vref.Deref.IsCompiledAsStaticPropertyWithoutField then + let nm = "get_"+nm + let tyenvUnderTypars = TypeReprEnv.ForTypars [] + let ilRetTy = GenTypeAux amap m tyenvUnderTypars vref.Type + let typ = mkILTyForCompLoc cloc + let mspec = mkILStaticMethSpecInTy (typ, nm, [], ilRetTy, []) + + StaticProperty (mspec, optShadowLocal) + else - member b.FindNestedTypeDefsBuilder(path) = - List.fold (fun (acc:TypeDefsBuilder) x -> acc.FindTypeDefBuilder(x).NestedTypeDefs) b path + // Determine when a static field is required. + // + // REVIEW: This call to GetTopValTypeInFSharpForm is only needed to determine if this is a (type) function or a value + // We should just look at the arity + match GetTopValTypeInFSharpForm g topValInfo vref.Type vref.Range with + | [],[], returnTy,_ when not vref.IsMember -> + // Mutable and literal static fields must have stable names and live in the "public" location + // See notes on GenFieldSpecForStaticField above. + let vspec = vref.Deref + let ilTy = GenTypeAux amap m TypeReprEnv.Empty returnTy (* TypeReprEnv.Empty ok: not a field in a generic class *) + let ilTyForProperty = mkILTyForCompLoc cloc + let attribs = vspec.Attribs + let hasLiteralAttr = HasFSharpAttribute g g.attrib_LiteralAttribute attribs - member b.FindNestedTypeDefBuilder(tref:ILTypeRef) = - b.FindNestedTypeDefsBuilder(tref.Enclosing).FindTypeDefBuilder(tref.Name) + let ilTypeRefForProperty = ilTyForProperty.TypeRef + let ilGetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "get_"+nm, 0, [], ilTy) + let ilSetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "set_"+nm, 0, [ilTy], ILType.Void) - member b.AddTypeDef(tdef:ILTypeDef, eliminateIfEmpty, addAtEnd, tdefDiscards) = - let idx = if addAtEnd then (countDown <- countDown - 1; countDown) else tdefs.Count - tdefs.Add (tdef.Name, (idx, (new TypeDefBuilder(tdef, tdefDiscards), eliminateIfEmpty))) + let fspec = ComputeFieldSpecForVal(optIntraAssemblyInfo, isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy, ilGetterMethRef) -/// Assembly generation buffers -type AssemblyBuilder(cenv:cenv) 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) - // A memoization table for generating value types for big constant arrays - let vtgenerator= - new MemoizationTable<(CompileLocation * int) , ILTypeSpec> - ((fun (cloc,size) -> - let name = CompilerGeneratedName ("T" + string(newUnique()) + "_" + string size + "Bytes") // Type names ending ...$T_37Bytes - let vtdef = mkRawDataValueTypeDef cenv.g.iltyp_ValueType (name,size,0us) - let vtref = NestedTypeRefForCompLoc cloc vtdef.Name - let vtspec = mkILTySpec(vtref,[]) - let vtdef = vtdef.WithAccess(ComputeTypeAccess vtref true) - mgbuf.AddTypeDef(vtref, vtdef, false, true, None) - vtspec), - keyComparer=HashIdentity.Structural) + StaticField (fspec, vref, hasLiteralAttr, ilTyForProperty, nm, ilTy, ilGetterMethRef, ilSetterMethRef, optShadowLocal) + + | _ -> + match vref.MemberInfo with + | Some memberInfo when not vref.IsExtensionMember -> + let mspec,_,_,paramInfos,retInfo = GetMethodSpecForMemberVal amap g memberInfo vref + Method (topValInfo, vref, mspec, m, paramInfos, retInfo) + | _ -> + let (tps, curriedArgInfos, returnTy, retInfo) = GetTopValTypeInCompiledForm g topValInfo vref.Type m + let tyenvUnderTypars = TypeReprEnv.ForTypars tps + let (methodArgTys,paramInfos) = curriedArgInfos |> List.concat |> List.unzip + let ilMethodArgTys = GenParamTypesAux amap m tyenvUnderTypars methodArgTys + let ilRetTy = GenReturnTypeAux amap m tyenvUnderTypars returnTy + let ilLocTy = mkILTyForCompLoc cloc + let ilMethodInst = GenTypeArgsAux amap m tyenvUnderTypars (List.map mkTyparTy tps) + let mspec = mkILStaticMethSpecInTy (ilLocTy, nm, ilMethodArgTys, ilRetTy, ilMethodInst) + Method (topValInfo, vref, mspec, m, paramInfos, retInfo) - let mutable explicitEntryPointInfo : ILTypeRef option = None +let ComputeAndAddStorageForLocalTopVal (amap, g, intraAssemblyFieldTable, isInteractive, optShadowLocal) cloc (v:Val) eenv = + let storage = ComputeStorageForTopVal (amap, g, Some intraAssemblyFieldTable, isInteractive, optShadowLocal, mkLocalValRef v, cloc) + AddStorageForVal g (v,notlazy storage) eenv - /// static init fields on script modules. - let mutable scriptInitFspecs : (ILFieldSpec * range) list = [] - - member mgbuf.AddScriptInitFieldSpec(fieldSpec,range) = - scriptInitFspecs <- (fieldSpec,range) :: scriptInitFspecs - - /// This initializes the script in #load and fsc command-line order causing their - /// sideeffects to be executed. - member mgbuf.AddInitializeScriptsInOrderToEntryPoint() = - // Get the entry point and initialized any scripts in order. - match explicitEntryPointInfo with - | Some tref -> - let IntializeCompiledScript(fspec,m) = - mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.IsEntryPoint), tref, fspec, GenPossibleILSourceMarker cenv m, [], []) - scriptInitFspecs |> List.iter IntializeCompiledScript - | None -> () +let ComputeStorageForNonLocalTopVal amap g cloc modref (v:Val) = + match v.ValReprInfo with + | None -> error(InternalError("ComputeStorageForNonLocalTopVal, expected an arity for " + v.LogicalName,v.Range)) + | Some _ -> ComputeStorageForTopVal (amap, g, None, false, NoShadowLocal, mkNestedValRef modref v, cloc) - +let rec ComputeStorageForNonLocalModuleOrNamespaceRef amap g cloc acc (modref:ModuleOrNamespaceRef) (modul:ModuleOrNamespace) = + let acc = + (acc, modul.ModuleOrNamespaceType.ModuleAndNamespaceDefinitions) ||> List.fold (fun acc smodul -> + ComputeStorageForNonLocalModuleOrNamespaceRef amap g (CompLocForSubModuleOrNamespace cloc smodul) acc (modref.NestedTyconRef smodul) smodul) - 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)) + let acc = + (acc, modul.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> + AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc modref v)) acc) + acc - member mgbuf.AddTypeDef(tref:ILTypeRef, tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) = - gtdefs.FindNestedTypeDefsBuilder(tref.Enclosing).AddTypeDef(tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) +let ComputeStorageForExternalCcu amap g eenv (ccu:CcuThunk) = + if not ccu.IsFSharp then eenv else + let cloc = CompLocForCcu ccu + let eenv = + List.foldBack + (fun smodul acc -> + let cloc = CompLocForSubModuleOrNamespace cloc smodul + let modref = mkNonLocalCcuRootEntityRef ccu smodul + ComputeStorageForNonLocalModuleOrNamespaceRef amap g cloc acc modref smodul) + ccu.RootModulesAndNamespaces + eenv + let eenv = + let eref = ERefNonLocalPreResolved ccu.Contents (mkNonLocalEntityRef ccu [| |]) + (eenv, ccu.Contents.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> + AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc eref v)) acc) + eenv + +let rec AddBindingsForLocalModuleType allocVal cloc eenv (mty:ModuleOrNamespaceType) = + let eenv = List.fold (fun eenv submodul -> AddBindingsForLocalModuleType allocVal (CompLocForSubModuleOrNamespace cloc submodul) eenv submodul.ModuleOrNamespaceType) eenv mty.ModuleAndNamespaceDefinitions + let eenv = Seq.fold (fun eenv v -> allocVal cloc v eenv) eenv mty.AllValsAndMembers + eenv - member mgbuf.GetCurrentFields(tref:ILTypeRef) = - gtdefs.FindNestedTypeDefBuilder(tref).GetCurrentFields() +let AddExternalCcusToIlxGenEnv amap g eenv ccus = List.fold (ComputeStorageForExternalCcu amap g) eenv ccus - member mgbuf.AddReflectedDefinition(vspec : Tast.Val,expr) = - // preserve order by storing index of item - let n = reflectedDefinitions.Count - reflectedDefinitions.Add(vspec, (vspec.CompiledName, n, expr)) - - member mgbuf.ReplaceNameOfReflectedDefinition(vspec, newName) = - match reflectedDefinitions.TryGetValue vspec with - | true, (name, n, expr) when name <> newName -> reflectedDefinitions.[vspec] <- (newName, n, expr) - | _ -> () +let AddBindingsForTycon allocVal (cloc:CompileLocation) (tycon:Tycon) eenv = + let unrealizedSlots = + if tycon.IsFSharpObjectModelTycon + then tycon.FSharpObjectModelTypeInfo.fsobjmodel_vslots + else [] + (eenv,unrealizedSlots) ||> List.fold (fun eenv vref -> allocVal cloc vref.Deref eenv) - member mgbuf.AddMethodDef(tref:ILTypeRef,ilMethodDef) = - gtdefs.FindNestedTypeDefBuilder(tref).AddMethodDef(ilMethodDef) - if ilMethodDef.IsEntryPoint then - explicitEntryPointInfo <- Some(tref) +let rec AddBindingsForModuleDefs allocVal (cloc:CompileLocation) eenv mdefs = + List.fold (AddBindingsForModuleDef allocVal cloc) eenv mdefs - member mgbuf.AddExplicitInitToSpecificMethodDef(cond,tref,fspec,sourceOpt,feefee,seqpt) = - // Authoring a .cctor with effects forces the cctor for the 'initialization' module by doing a dummy store & load of a field - // Doing both a store and load keeps FxCop happier because it thinks the field is useful - let instrs = - [ yield! (if condition "NO_ADD_FEEFEE_TO_CCTORS" then [] elif condition "ADD_SEQPT_TO_CCTORS" then seqpt else feefee) // mark start of hidden code - yield mkLdcInt32 0 - yield mkNormalStsfld fspec - yield mkNormalLdsfld fspec - yield AI_pop] - gtdefs.FindNestedTypeDefBuilder(tref).PrependInstructionsToSpecificMethodDef(cond,instrs,sourceOpt) +and AddBindingsForModuleDef allocVal cloc eenv x = + match x with + | TMDefRec(_isRec,tycons,mbinds,_) -> + (* Virtual don't have 'let' bindings and must be added to the environment *) + let eenv = List.foldBack (AddBindingsForTycon allocVal cloc) tycons eenv + let eenv = List.foldBack (AddBindingsForModule allocVal cloc) mbinds eenv + eenv + | TMDefLet(bind,_) -> + allocVal cloc bind.Var eenv + | TMDefDo _ -> + eenv + | TMAbstract(ModuleOrNamespaceExprWithSig(mtyp,_,_)) -> + AddBindingsForLocalModuleType allocVal cloc eenv mtyp + | TMDefs(mdefs) -> + AddBindingsForModuleDefs allocVal cloc eenv mdefs - member mgbuf.AddEventDef(tref,edef) = - gtdefs.FindNestedTypeDefBuilder(tref).AddEventDef(edef) +and AddBindingsForModule allocVal cloc x eenv = + match x with + | ModuleOrNamespaceBinding.Binding bind -> + allocVal cloc bind.Var eenv + | ModuleOrNamespaceBinding.Module (mspec, mdef) -> + let cloc = + if mspec.IsNamespace then cloc + else CompLocForFixedModule cloc.clocQualifiedNameOfFile cloc.clocTopImplQualifiedName mspec + + AddBindingsForModuleDef allocVal cloc eenv mdef - member mgbuf.AddFieldDef(tref,ilFieldDef) = - gtdefs.FindNestedTypeDefBuilder(tref).AddFieldDef(ilFieldDef) +and AddBindingsForModuleTopVals _g allocVal _cloc eenv vs = + List.foldBack allocVal vs eenv - member mgbuf.AddOrMergePropertyDef(tref,pdef,m) = - gtdefs.FindNestedTypeDefBuilder(tref).AddOrMergePropertyDef(pdef,m) - member mgbuf.Close() = - // old implementation adds new element to the head of list so result was accumulated in reversed order - let orderedReflectedDefinitions = - [for (KeyValue(vspec, (name, n, expr))) in reflectedDefinitions -> n, ((name,vspec), expr)] - |> List.sortBy (fst >> (~-)) // invert the result to get 'order-by-descending' behavior (items in list are 0..* so we don't need to worry about int.MinValue) - |> List.map snd - gtdefs.Close(), orderedReflectedDefinitions - member mgbuf.cenv = cenv - member mgbuf.GetExplicitEntryPointInfo() = explicitEntryPointInfo +// Put the partial results for a generated fragment (i.e. a part of a CCU generated by FSI) +// into the stored results for the whole CCU. +// isIncrementalFragment = true --> "typed input" +// isIncrementalFragment = false --> "#load" +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, _, _, _)) -> + let cloc = { cloc with clocTopImplQualifiedName = qname.Text } + if isIncrementalFragment then + match mexpr with + | ModuleOrNamespaceExprWithSig(_,mdef,_) -> AddBindingsForModuleDef allocVal cloc eenv mdef + (* | ModuleOrNamespaceExprWithSig(mtyp,_,m) -> error(Error("don't expect inner defs to have a constraint",m)) *) + else + AddBindingsForLocalModuleType allocVal cloc eenv mexpr.Type) - /// 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. @@ -1270,11 +1416,7 @@ let FeeFeeInstr (cenv:cenv) doc = endColumn = 0)) /// Buffers for IL code generation -type CodeGenBuffer(m:range, - mgbuf: AssemblyBuilder, - methodName, - alreadyUsedArgs:int, - alreadyUsedLocals:int) = +type CodeGenBuffer(m:range, mgbuf: AssemblyBuilder, methodName, alreadyUsedArgs:int, alreadyUsedLocals:int) = let locals = new ResizeArray<((string * (Mark * Mark)) list * ILType * bool)>(10) let codebuf = new ResizeArray(200) @@ -1870,13 +2012,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],_ -> @@ -1956,7 +2102,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(_,typ,_,_,[meth],[],m) when isDelegateTy cenv.g typ -> @@ -2059,7 +2204,7 @@ and GenSequel cenv cloc cgbuf sequel = //-------------------------------------------------------------------------- and GenConstant cenv cgbuf eenv (c,m,ty) sequel = - let ilTy = GenType cenv.amap m eenv.tyenv ty + let ilTy = GenType cenv m eenv.tyenv ty // Check if we need to generate the value at all match sequelAfterDiscard sequel with | None -> @@ -2101,7 +2246,7 @@ and GenConstant cenv cgbuf eenv (c,m,ty) sequel = and GenUnitTy cenv eenv m = match cenv.ilUnitTy with | None -> - let res = GenType cenv.amap m eenv.tyenv cenv.g.unit_ty + let res = GenType cenv m eenv.tyenv cenv.g.unit_ty cenv.ilUnitTy <- Some res res | Some res -> res @@ -2123,7 +2268,7 @@ and GenAllocTuple cenv cgbuf eenv (tupInfo, args,argtys,m) sequel = let tupInfo = evalTupInfoIsStruct tupInfo let tcref, tys, args, newm = mkCompiledTuple cenv.g tupInfo (argtys,args,m) - let typ = GenNamedTyApp cenv.amap newm eenv.tyenv tcref tys + let typ = GenNamedTyApp cenv newm eenv.tyenv tcref tys let ntyvars = if (tys.Length - 1) < goodTupleFields then (tys.Length - 1) else goodTupleFields let formalTyvars = [ for n in 0 .. ntyvars do yield mkILTyvarTy (uint16 n) ] @@ -2141,14 +2286,14 @@ and GenGetTupleField cenv cgbuf eenv (tupInfo,e,tys,n,m) sequel = if ar <= 0 then failwith "getCompiledTupleItem" elif ar < maxTuple then let tcr' = mkCompiledTupleTyconRef g tupInfo ar - let typ = GenNamedTyApp cenv.amap m eenv.tyenv tcr' tys + let typ = GenNamedTyApp cenv m eenv.tyenv tcr' tys mkGetTupleItemN g m n typ tupInfo e tys.[n] else let tysA,tysB = List.splitAfter (goodTupleFields) tys let tyB = mkCompiledTupleTy g tupInfo tysB let tys' = tysA@[tyB] let tcr' = mkCompiledTupleTyconRef g tupInfo (List.length tys') - let typ' = GenNamedTyApp cenv.amap m eenv.tyenv tcr' tys' + let typ' = GenNamedTyApp cenv m eenv.tyenv tcr' tys' let n' = (min n goodTupleFields) let elast = mkGetTupleItemN g m n' typ' tupInfo e tys'.[n'] if n < goodTupleFields then @@ -2161,7 +2306,7 @@ and GenAllocExn cenv cgbuf eenv (c,args,m) sequel = GenExprs cenv cgbuf eenv args let typ = GenExnType cenv.amap m eenv.tyenv c let flds = recdFieldsOfExnDefRef c - let argtys = flds |> List.map (fun rfld -> GenType cenv.amap m eenv.tyenv rfld.FormalType) + let argtys = flds |> List.map (fun rfld -> GenType cenv m eenv.tyenv rfld.FormalType) let mspec = mkILCtorMethSpecForTy (typ, argtys) CG.EmitInstr cgbuf (pop args.Length) (Push [typ]) @@ -2170,12 +2315,12 @@ and GenAllocExn cenv cgbuf eenv (c,args,m) sequel = and GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel = GenExprs cenv cgbuf eenv args - let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv c tyargs + let cuspec,idx = GenUnionCaseSpec cenv m eenv.tyenv c tyargs CG.EmitInstrs cgbuf (pop args.Length) (Push [cuspec.DeclaringType]) (EraseUnions.mkNewData cenv.g.ilg (cuspec, idx)) GenSequel cenv eenv.cloc cgbuf sequel and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = - let typ = GenNamedTyApp cenv.amap m eenv.tyenv tcref argtys + let typ = GenNamedTyApp cenv m eenv.tyenv tcref argtys // Filter out fields with default initialization let relevantFields = @@ -2198,12 +2343,30 @@ and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = let tyenvinner = TypeReprEnv.ForTyconRef tcref CG.EmitInstr cgbuf (pop args.Length) (Push [typ]) (mkNormalNewobj - (mkILCtorMethSpecForTy (typ,relevantFields |> List.map (fun f -> GenType cenv.amap m tyenvinner f.FormalType) ))) + (mkILCtorMethSpecForTy (typ,relevantFields |> List.map (fun f -> GenType cenv 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 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 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 + let ilElemTy = GenType cenv m eenv.tyenv elemTy let ilArrTy = mkILArr1DTy ilElemTy CG.EmitInstrs cgbuf (pop 0) (Push [ilArrTy]) [ (AI_ldc (DT_I4,ILConst.I4 (elems.Length))); I_newarr (ILArrayShape.SingleDimensional,ilElemTy) ] @@ -2240,7 +2403,7 @@ and GenNewArray cenv cgbuf eenv (elems: Expr list,elemTy,m) sequel = | _ -> (function _ -> false), (fun _ _ -> failwith "unreachable") if elems' |> Array.forall (function Expr.Const(c,_,_) -> test c | _ -> false) then - let ilElemTy = GenType cenv.amap m eenv.tyenv elemTy + let ilElemTy = GenType cenv m eenv.tyenv elemTy GenConstArray cenv cgbuf eenv ilElemTy elems' (fun buf -> function Expr.Const(c,_,_) -> write buf c | _ -> failwith "unreachable") GenSequel cenv eenv.cloc cgbuf sequel @@ -2255,7 +2418,7 @@ and GenCoerce cenv cgbuf eenv (e,tgty,m,srcty) sequel = begin if (isInterfaceTy cenv.g tgty) then ( GenExpr cenv cgbuf eenv SPSuppress e Continue - let ilToTy = GenType cenv.amap m eenv.tyenv tgty + let ilToTy = GenType cenv m eenv.tyenv tgty // Section "III.1.8.1.3 Merging stack states" of ECMA-335 implies that no unboxing // is required, but we still push the coerce'd type on to the code gen buffer. CG.EmitInstrs cgbuf (pop 1) (Push [ilToTy]) [] @@ -2267,15 +2430,15 @@ and GenCoerce cenv cgbuf eenv (e,tgty,m,srcty) sequel = else GenExpr cenv cgbuf eenv SPSuppress e Continue if not (isObjTy cenv.g srcty) then - let ilFromTy = GenType cenv.amap m eenv.tyenv srcty + let ilFromTy = GenType cenv m eenv.tyenv srcty CG.EmitInstrs cgbuf (pop 1) (Push [cenv.g.ilg.typ_Object]) [ I_box ilFromTy ] if not (isObjTy cenv.g tgty) then - let ilToTy = GenType cenv.amap m eenv.tyenv tgty + let ilToTy = GenType cenv m eenv.tyenv tgty CG.EmitInstrs cgbuf (pop 1) (Push [ilToTy]) [ I_unbox_any ilToTy ] GenSequel cenv eenv.cloc cgbuf sequel and GenReraise cenv cgbuf eenv (rtnty,m) sequel = - let ilReturnTy = GenType cenv.amap m eenv.tyenv rtnty + let ilReturnTy = GenType cenv m eenv.tyenv rtnty CG.EmitInstrs cgbuf (pop 0) Push0 [I_rethrow] // [See comment related to I_throw]. // Rethrow does not return. Required to push dummy value on the stack. @@ -2290,7 +2453,7 @@ and GenGetExnField cenv cgbuf eenv (e,ecref,fieldNum,m) sequel = CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass typ] let fld = List.item fieldNum exnc.TrueInstanceFieldsAsList - let ftyp = GenType cenv.amap m eenv.tyenv fld.FormalType + let ftyp = GenType cenv m eenv.tyenv fld.FormalType let mspec = mkILNonGenericInstanceMethSpecInTy (typ,"get_" + fld.Name, [], ftyp) CG.EmitInstr cgbuf (pop 1) (Push [ftyp]) (mkNormalCall mspec) @@ -2303,7 +2466,7 @@ and GenSetExnField cenv cgbuf eenv (e,ecref,fieldNum,e2,m) sequel = let typ = GenExnType cenv.amap m eenv.tyenv ecref CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass typ ] let fld = List.item fieldNum exnc.TrueInstanceFieldsAsList - let ftyp = GenType cenv.amap m eenv.tyenv fld.FormalType + let ftyp = GenType cenv m eenv.tyenv fld.FormalType let ilFieldName = ComputeFieldName exnc fld GenExpr cenv cgbuf eenv SPSuppress e2 Continue CG.EmitInstr cgbuf (pop 2) Push0 (mkNormalStfld(mkILFieldSpecInTy (typ,ilFieldName,ftyp))) @@ -2321,7 +2484,7 @@ and UnionCodeGen (cgbuf: CodeGenBuffer) = and GenUnionCaseProof cenv cgbuf eenv (e,ucref,tyargs,m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs + let cuspec,idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs let fty = EraseUnions.GetILTypeForAlternative cuspec idx let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef EraseUnions.emitCastData cenv.g.ilg (UnionCodeGen cgbuf) (false,avoidHelpers,cuspec,idx) @@ -2332,7 +2495,7 @@ and GenGetUnionCaseField cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel = assert (ucref.Tycon.IsStructOrEnumTycon || isProvenUnionCaseTy (tyOfExpr cenv.g e)) GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs + let cuspec,idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs let fty = actualTypOfIlxUnionField cuspec idx n let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef CG.EmitInstrs cgbuf (pop 1) (Push [fty]) (EraseUnions.mkLdData (avoidHelpers, cuspec, idx, n)) @@ -2342,7 +2505,7 @@ and GenGetUnionCaseFieldAddr cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel = assert (ucref.Tycon.IsStructOrEnumTycon || isProvenUnionCaseTy (tyOfExpr cenv.g e)) GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs + let cuspec,idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs let fty = actualTypOfIlxUnionField cuspec idx n let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref fty]) (EraseUnions.mkLdDataAddr (avoidHelpers, cuspec, idx, n)) @@ -2350,7 +2513,7 @@ and GenGetUnionCaseFieldAddr cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel = and GenGetUnionCaseTag cenv cgbuf eenv (e,tcref,tyargs,m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec = GenUnionSpec cenv.amap m eenv.tyenv tcref tyargs + let cuspec = GenUnionSpec cenv m eenv.tyenv tcref tyargs let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib tcref EraseUnions.emitLdDataTag cenv.g.ilg (UnionCodeGen cgbuf) (avoidHelpers, cuspec) CG.EmitInstrs cgbuf (pop 1) (Push [cenv.g.ilg.typ_Int32]) [ ] // push/pop to match the line above @@ -2358,7 +2521,7 @@ and GenGetUnionCaseTag cenv cgbuf eenv (e,tcref,tyargs,m) sequel = and GenSetUnionCaseField cenv cgbuf eenv (e,ucref,tyargs,n,e2,m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs + let cuspec,idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef EraseUnions.emitCastData cenv.g.ilg (UnionCodeGen cgbuf) (false,avoidHelpers,cuspec,idx) CG.EmitInstrs cgbuf (pop 1) (Push [cuspec.DeclaringType]) [ ] // push/pop to match the line above @@ -2591,7 +2754,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = let actualRetTy = applyTys cenv.g vref.Type (tyargs,nowArgs) let _,curriedArgInfos,returnTy,_ = GetTopValTypeInCompiledForm cenv.g topValInfo vref.Type m - let ilTyArgs = GenTypeArgs cenv.amap m eenv.tyenv tyargs + let ilTyArgs = GenTypeArgs cenv m eenv.tyenv tyargs // For instance method calls chop off some type arguments, which are already @@ -2636,7 +2799,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = let callInstr = match valUseFlags with | PossibleConstrainedCall ty -> - let ilThisTy = GenType cenv.amap m eenv.tyenv ty + let ilThisTy = GenType cenv m eenv.tyenv ty I_callconstraint ( isTailCall, ilThisTy,mspec,None) | _ -> if newobj then I_newobj (mspec, None) @@ -2655,7 +2818,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = (eenv,laterArgs) ||> List.mapFold (fun eenv laterArg -> // Only save arguments that have effects if Optimizer.ExprHasEffect cenv.g laterArg then - let ilTy = laterArg |> tyOfExpr cenv.g |> GenType cenv.amap m eenv.tyenv + let ilTy = laterArg |> tyOfExpr cenv.g |> GenType cenv m eenv.tyenv let loc,eenv = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("arg",m), ilTy, false) scopeMarks GenExpr cenv cgbuf eenv SPSuppress laterArg Continue EmitSetLocal cgbuf loc @@ -2665,7 +2828,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = let nargs = mspec.FormalArgTypes.Length CG.EmitInstr cgbuf (pop (nargs + (if mspec.CallingConv.IsStatic || newobj then 0 else 1))) - (if mustGenerateUnitAfterCall || isSuperInit || isSelfInit then Push0 else (Push [(GenType cenv.amap m eenv.tyenv actualRetTy)])) callInstr + (if mustGenerateUnitAfterCall || isSuperInit || isSelfInit then Push0 else (Push [(GenType cenv m eenv.tyenv actualRetTy)])) callInstr // For isSuperInit, load the 'this' pointer as the pretend 'result' of the operation. It will be popped again in most cases if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [mspec.DeclaringType]) [ mkLdarg0 ] @@ -2718,12 +2881,12 @@ and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv typ cloinfo tyargs let ilContractClassTyargs = cloinfo.localTypeFuncContractFreeTypars |> List.map mkTyparTy - |> GenTypeArgs cenv.amap m eenv.tyenv + |> GenTypeArgs cenv m eenv.tyenv - let ilTyArgs = tyargs |> GenTypeArgs cenv.amap m eenv.tyenv + let ilTyArgs = tyargs |> GenTypeArgs cenv m eenv.tyenv let _,(ilContractMethTyargs: ILGenericParameterDefs),(ilContractCloTySpec:ILTypeSpec),ilContractFormalRetTy = - GenNamedLocalTypeFuncContractInfo cenv eenv m cloinfo + GenNamedLocalTypeFuncContractInfo cenv cgbuf.mgbuf eenv m cloinfo let ilContractTy = mkILBoxedTy ilContractCloTySpec.TypeRef ilContractClassTyargs @@ -2735,7 +2898,7 @@ and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv typ cloinfo tyargs let actualRetTy = applyTys cenv.g typ (tyargs,[]) let ilDirectInvokeMethSpec = mkILInstanceMethSpecInTy(ilContractTy, "DirectInvoke", [], ilContractFormalRetTy, ilTyArgs) - let ilActualRetTy = GenType cenv.amap m eenv.tyenv actualRetTy + let ilActualRetTy = GenType cenv m eenv.tyenv actualRetTy CountCallFuncInstructions() CG.EmitInstr cgbuf (pop 1) (Push [ilActualRetTy]) (mkNormalCallvirt ilDirectInvokeMethSpec) actualRetTy @@ -2765,16 +2928,16 @@ and GenIndirectCall cenv cgbuf eenv (functy,tyargs,args,m) sequel = List.fold (fun (formalFuncTyp,sofar) _ -> let dty,rty = destFunTy cenv.g formalFuncTyp - (rty,(fun acc -> sofar (Apps_app(GenType cenv.amap m feenv dty,acc))))) + (rty,(fun acc -> sofar (Apps_app(GenType cenv m feenv dty,acc))))) (formalFuncTyp,id) args - let ilxRetApps = Apps_done (GenType cenv.amap m feenv formalRetTy) + let ilxRetApps = Apps_done (GenType cenv m feenv formalRetTy) - List.foldBack (fun tyarg acc -> Apps_tyapp(GenType cenv.amap m eenv.tyenv tyarg,acc)) tyargs (appBuilder ilxRetApps) + List.foldBack (fun tyarg acc -> Apps_tyapp(GenType cenv m eenv.tyenv tyarg,acc)) tyargs (appBuilder ilxRetApps) let actualRetTy = applyTys cenv.g functy (tyargs, args) - let ilActualRetTy = GenType cenv.amap m eenv.tyenv actualRetTy + let ilActualRetTy = GenType cenv m eenv.tyenv actualRetTy // Check if any byrefs are involved to make sure we don't tailcall let hasByrefArg = @@ -2811,7 +2974,7 @@ and GenTry cenv cgbuf eenv scopeMarks (e1,m,resty,spTry) = let endTryMark = CG.GenerateDelayMark cgbuf "endTryMark" let afterHandler = CG.GenerateDelayMark cgbuf "afterHandler" let eenvinner = {eenvinner with withinSEH = true} - let ilResultTy = GenType cenv.amap m eenvinner.tyenv resty + let ilResultTy = GenType cenv m eenvinner.tyenv resty let whereToSave,eenvinner = AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("tryres",m),ilResultTy, false) (startTryMark,endTryMark) // Generate the body of the try. In the normal case (SequencePointAtTry) we generate a sequence point @@ -3086,8 +3249,8 @@ and GenSequential cenv cgbuf eenv spIn (e1,e2,specialSeqFlag,spSeq,_m) sequel = //-------------------------------------------------------------------------- and GenAsmCode cenv cgbuf eenv (il,tyargs,args,returnTys,m) sequel = - let ilTyArgs = GenTypesPermitVoid cenv.amap m eenv.tyenv tyargs - let ilReturnTys = GenTypesPermitVoid cenv.amap m eenv.tyenv returnTys + let ilTyArgs = GenTypesPermitVoid cenv m eenv.tyenv tyargs + let ilReturnTys = GenTypesPermitVoid cenv m eenv.tyenv returnTys let ilAfterInst = il |> List.filter (function AI_nop -> false | _ -> true) |> List.map (fun i -> @@ -3256,7 +3419,7 @@ and GenQuotation cenv cgbuf eenv (ast,conv,m,ety) sequel = let someTypeInModuleExpr = mkTypeOfExpr cenv m eenv.someTypeInThisAssembly let rawTy = mkRawQuotedExprTy cenv.g - let spliceTypeExprs = List.map (GenType cenv.amap m eenv.tyenv >> (mkTypeOfExpr cenv m)) spliceTypes + let spliceTypeExprs = List.map (GenType cenv m eenv.tyenv >> (mkTypeOfExpr cenv m)) spliceTypes let bytesExpr = Expr.Op(TOp.Bytes(astSerializedBytes),[],[],m) @@ -3298,9 +3461,9 @@ and GenILCall cenv cgbuf eenv (virt,valu,newobj,valUseFlags,isDllImport,ilMethRe let makesNoCriticalTailcalls = (newobj || not virt) // Don't tailcall for 'newobj', or 'call' to IL code let tail = CanTailcall(valu,ccallInfo,eenv.withinSEH,hasByrefArg,mustGenerateUnitAfterCall,isDllImport,false,makesNoCriticalTailcalls,sequel) - let ilEnclArgTys = GenTypeArgs cenv.amap m eenv.tyenv enclArgTys - let ilMethArgTys = GenTypeArgs cenv.amap m eenv.tyenv methArgTys - let ilReturnTys = GenTypes cenv.amap m eenv.tyenv returnTys + let ilEnclArgTys = GenTypeArgs cenv m eenv.tyenv enclArgTys + let ilMethArgTys = GenTypeArgs cenv m eenv.tyenv methArgTys + let ilReturnTys = GenTypes cenv m eenv.tyenv returnTys let ilMethSpec = mkILMethSpec (ilMethRef,boxity,ilEnclArgTys,ilMethArgTys) let useICallVirt = virt || useCallVirt cenv boxity ilMethSpec isBaseCall @@ -3313,7 +3476,7 @@ and GenILCall cenv cgbuf eenv (virt,valu,newobj,valUseFlags,isDllImport,ilMethRe else match ccallInfo with | Some objArgTy -> - let ilObjArgTy = GenType cenv.amap m eenv.tyenv objArgTy + let ilObjArgTy = GenType cenv m eenv.tyenv objArgTy [ I_callconstraint(tail,ilObjArgTy,ilMethSpec,None) ] | None -> if useICallVirt then [ I_callvirt(tail,ilMethSpec,None) ] @@ -3377,19 +3540,19 @@ and GenGetValAddr cenv cgbuf eenv (v: ValRef, m) sequel = and GenGetByref cenv cgbuf eenv (v:ValRef,m) sequel = GenGetLocalVRef cenv cgbuf eenv m v None - let ilty = GenType cenv.amap m eenv.tyenv (destByrefTy cenv.g v.Type) + let ilty = GenType cenv m eenv.tyenv (destByrefTy cenv.g v.Type) CG.EmitInstrs cgbuf (pop 1) (Push [ilty]) [ mkNormalLdobj ilty ] GenSequel cenv eenv.cloc cgbuf sequel and GenSetByref cenv cgbuf eenv (v:ValRef,e,m) sequel = GenGetLocalVRef cenv cgbuf eenv m v None GenExpr cenv cgbuf eenv SPSuppress e Continue - let ilty = GenType cenv.amap m eenv.tyenv (destByrefTy cenv.g v.Type) + let ilty = GenType cenv m eenv.tyenv (destByrefTy cenv.g v.Type) CG.EmitInstrs cgbuf (pop 2) Push0 [ mkNormalStobj ilty ] GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel and GenDefaultValue cenv cgbuf eenv (ty,m) = - let ilTy = GenType cenv.amap m eenv.tyenv ty + let ilTy = GenType cenv m eenv.tyenv ty if isRefTy cenv.g ty then CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) AI_ldnull else @@ -3411,7 +3574,7 @@ and GenDefaultValue cenv cgbuf eenv (ty,m) = | Some tcref when (tyconRefEq cenv.g cenv.g.system_Double_tcref tcref) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (iLdcDouble 0.0) | _ -> - let ilTy = GenType cenv.amap m eenv.tyenv ty + let ilTy = GenType cenv m eenv.tyenv ty LocalScope "ilzero" cgbuf (fun scopeMarks -> let locIdx, _ = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("default",m), ilTy, false) scopeMarks // "initobj" (Generated by EmitInitLocal) doesn't work on byref types @@ -3427,8 +3590,8 @@ and GenDefaultValue cenv cgbuf eenv (ty,m) = // Generate generic parameters //-------------------------------------------------------------------------- -and GenGenericParam cenv eenv (tp:Typar) = - let subTypeConstraints = tp.Constraints |> List.choose (function | TyparConstraint.CoercesTo(ty,_) -> Some(ty) | _ -> None) |> List.map (GenTypeAux cenv.amap tp.Range eenv.tyenv VoidNotOK PtrTypesNotOK) +and GenGenericParam cenv mgbuf eenv (tp:Typar) = + let subTypeConstraints = tp.Constraints |> List.choose (function | TyparConstraint.CoercesTo(ty,_) -> Some(ty) | _ -> None) |> List.map (GenTypeAuxAux cenv.amap tp.Range eenv.tyenv VoidNotOK PtrTypesNotOK) let refTypeConstraint = tp.Constraints |> List.exists (function TyparConstraint.IsReferenceType _ -> true | TyparConstraint.SupportsNull _ -> true | _ -> false) let notNullableValueTypeConstraint = tp.Constraints |> List.exists (function TyparConstraint.IsNonNullableStruct _ -> true | _ -> false) let defaultConstructorConstraint = tp.Constraints |> List.exists (function TyparConstraint.RequiresDefaultConstructor _ -> true | _ -> false) @@ -3455,7 +3618,7 @@ and GenGenericParam cenv eenv (tp:Typar) = Constraints = subTypeConstraints Variance=NonVariant - CustomAttrs = mkILCustomAttrs (GenAttrs cenv eenv tp.Attribs) + CustomAttrs = mkILCustomAttrs (GenAttrs cenv mgbuf eenv tp.Attribs) HasReferenceTypeConstraint=refTypeConstraint HasNotNullableValueTypeConstraint=notNullableValueTypeConstraint HasDefaultConstructorConstraint= defaultConstructorConstraint } @@ -3465,44 +3628,44 @@ and GenGenericParam cenv eenv (tp:Typar) = //-------------------------------------------------------------------------- /// Generates the data used for parameters at definitions of abstract method slots such as interface methods or override methods. -and GenSlotParam m cenv eenv (TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attribs)) : ILParameter = +and GenSlotParam m cenv mgbuf eenv (TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attribs)) : ILParameter = let inFlag2,outFlag2,optionalFlag2,defaultParamValue,paramMarshal2,attribs = GenParamAttribs cenv attribs { Name=nm - Type= GenParamType cenv.amap m eenv.tyenv ty + Type= GenParamType cenv m eenv.tyenv ty Default=defaultParamValue Marshal=paramMarshal2 IsIn=inFlag || inFlag2 IsOut=outFlag || outFlag2 IsOptional=optionalFlag || optionalFlag2 - CustomAttrs= mkILCustomAttrs (GenAttrs cenv eenv attribs) } + CustomAttrs= mkILCustomAttrs (GenAttrs cenv mgbuf eenv attribs) } -and GenFormalSlotsig m cenv eenv (TSlotSig(_,typ,ctps,mtps,paraml,returnTy)) = +and GenFormalSlotsig m cenv mgbuf eenv (TSlotSig(_,typ,ctps,mtps,paraml,returnTy)) = let paraml = List.concat paraml - let ilTy = GenType cenv.amap m eenv.tyenv typ + let ilTy = GenType cenv m eenv.tyenv typ let eenvForSlotSig = EnvForTypars (ctps @ mtps) eenv - let ilParams = paraml |> List.map (GenSlotParam m cenv eenvForSlotSig) - let ilRetTy = GenReturnType cenv.amap m eenvForSlotSig.tyenv returnTy + let ilParams = paraml |> List.map (GenSlotParam m cenv mgbuf eenvForSlotSig) + let ilRetTy = GenReturnType cenv m eenvForSlotSig.tyenv returnTy let ilRet = mkILReturn ilRetTy ilTy, ilParams, ilRet and instSlotParam inst (TSlotParam(nm,ty,inFlag,fl2,fl3,attrs)) = TSlotParam(nm,instType inst ty,inFlag,fl2,fl3,attrs) -and GenActualSlotsig m cenv eenv (TSlotSig(_,typ,ctps,mtps,ilSlotParams,ilSlotRetTy)) methTyparsOfOverridingMethod (methodParams: Val list) = +and GenActualSlotsig m cenv mgbuf eenv (TSlotSig(_,typ,ctps,mtps,ilSlotParams,ilSlotRetTy)) methTyparsOfOverridingMethod (methodParams: Val list) = let ilSlotParams = List.concat ilSlotParams let instForSlotSig = mkTyparInst (ctps@mtps) (argsOfAppTy cenv.g typ @ generalizeTypars methTyparsOfOverridingMethod) - let ilParams = ilSlotParams |> List.map (instSlotParam instForSlotSig >> GenSlotParam m cenv eenv) + let ilParams = ilSlotParams |> List.map (instSlotParam instForSlotSig >> GenSlotParam m cenv mgbuf eenv) // Use the better names if available let ilParams = if ilParams.Length = methodParams.Length then (ilParams, methodParams) ||> List.map2 (fun p pv -> { p with Name = Some (nameOfVal pv) }) else ilParams - let ilRetTy = GenReturnType cenv.amap m eenv.tyenv (Option.map (instType instForSlotSig) ilSlotRetTy) + let ilRetTy = GenReturnType cenv m eenv.tyenv (Option.map (instType instForSlotSig) ilSlotRetTy) let iLRet = mkILReturn ilRetTy ilParams,iLRet and GenNameOfOverridingMethod cenv (useMethodImpl,(TSlotSig(nameOfOverridenMethod,enclTypOfOverridenMethod,_,_,_,_))) = if useMethodImpl then qualifiedMangledNameOfTyconRef (tcrefOfAppTy cenv.g enclTypOfOverridenMethod) nameOfOverridenMethod else nameOfOverridenMethod -and GenMethodImpl cenv eenv (useMethodImpl,(TSlotSig(nameOfOverridenMethod,_,_,_,_,_) as slotsig)) m = - let ilOverrideTy,ilOverrideParams,ilOverrideRet = GenFormalSlotsig m cenv eenv slotsig +and GenMethodImpl cenv mgbuf eenv (useMethodImpl,(TSlotSig(nameOfOverridenMethod,_,_,_,_,_) as slotsig)) m = + let ilOverrideTy,ilOverrideParams,ilOverrideRet = GenFormalSlotsig m cenv mgbuf eenv slotsig let nameOfOverridingMethod = GenNameOfOverridingMethod cenv (useMethodImpl,slotsig) nameOfOverridingMethod, @@ -3510,8 +3673,8 @@ and GenMethodImpl cenv eenv (useMethodImpl,(TSlotSig(nameOfOverridenMethod,_,_,_ let ilOverrideTyRef = ilOverrideTy.TypeRef let ilOverrideMethRef = mkILMethRef(ilOverrideTyRef, ILCallingConv.Instance, nameOfOverridenMethod, List.length (DropErasedTypars methTyparsOfOverridingMethod), (typesOfILParams ilOverrideParams), ilOverrideRet.Type) let eenvForOverrideBy = AddTyparsToEnv methTyparsOfOverridingMethod eenv - let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv eenvForOverrideBy slotsig methTyparsOfOverridingMethod [] - let ilOverrideMethGenericParams = GenGenericParams cenv eenvForOverrideBy methTyparsOfOverridingMethod + let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv mgbuf eenvForOverrideBy slotsig methTyparsOfOverridingMethod [] + let ilOverrideMethGenericParams = GenGenericParams cenv mgbuf eenvForOverrideBy methTyparsOfOverridingMethod let ilOverrideMethGenericArgs = mkILFormalGenericArgs 0 ilOverrideMethGenericParams let ilOverrideBy = mkILInstanceMethSpecInTy(ilTyForOverriding, nameOfOverridingMethod, typesOfILParams ilParamsOfOverridingMethod, ilReturnOfOverridingMethod.Type, ilOverrideMethGenericArgs) { Overrides = OverridesSpec(ilOverrideMethRef,ilOverrideTy) @@ -3542,20 +3705,20 @@ and GenObjectMethod cenv eenvinner (cgbuf:CodeGenBuffer) useMethodImpl tmethod = let eenvUnderTypars = AddTyparsToEnv methTyparsOfOverridingMethod eenvinner let methodParams = List.concat methodParams let methodParamsNonSelf = match methodParams with [] -> [] | _::t -> t // drop the 'this' arg when computing better argument names for IL parameters - let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv eenvUnderTypars slotsig methTyparsOfOverridingMethod methodParamsNonSelf - let ilAttribs = GenAttrs cenv eenvinner attribs + let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv cgbuf.mgbuf eenvUnderTypars slotsig methTyparsOfOverridingMethod methodParamsNonSelf + let ilAttribs = GenAttrs cenv cgbuf.mgbuf eenvinner attribs // Args are stored starting at #1 let eenvForMeth = AddStorageForLocalVals cenv.g (methodParams |> List.mapi (fun i v -> (v,Arg i))) eenvUnderTypars let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],nameOfOverridenMethod,eenvForMeth,0,0,methodBodyExpr,(if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) - let nameOfOverridingMethod,methodImplGenerator = GenMethodImpl cenv eenvinner (useMethodImpl,slotsig) methodBodyExpr.Range + let nameOfOverridingMethod,methodImplGenerator = GenMethodImpl cenv cgbuf.mgbuf eenvinner (useMethodImpl,slotsig) methodBodyExpr.Range let mdef = mkILGenericVirtualMethod (nameOfOverridingMethod, ILMemberAccess.Public, - GenGenericParams cenv eenvUnderTypars methTyparsOfOverridingMethod, + GenGenericParams cenv cgbuf.mgbuf eenvUnderTypars methTyparsOfOverridingMethod, ilParamsOfOverridingMethod, ilReturnOfOverridingMethod, MethodBody.IL ilMethodBody) @@ -3566,7 +3729,7 @@ and GenObjectMethod cenv eenvinner (cgbuf:CodeGenBuffer) useMethodImpl tmethod = [(useMethodImpl,methodImplGenerator,methTyparsOfOverridingMethod),mdef] and GenObjectExpr cenv cgbuf eenvouter expr (baseType,baseValOpt,basecall,overrides,interfaceImpls,m) sequel = - let cloinfo,_,eenvinner = GetIlxClosureInfo cenv m false None eenvouter expr + let cloinfo,_,eenvinner = GetIlxClosureInfo cenv cgbuf.mgbuf m false None eenvouter expr let cloAttribs = cloinfo.cloAttribs let cloFreeVars = cloinfo.cloFreeVars @@ -3585,7 +3748,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,0,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) @@ -3601,9 +3763,9 @@ and GenObjectExpr cenv cgbuf eenvouter expr (baseType,baseValOpt,basecall,overri let mimpls = mimpls |> List.choose id // choose the ones that actually have method impls - let interfaceTys = interfaceImpls |> List.map (fst >> GenType cenv.amap m eenvinner.tyenv) + let interfaceTys = interfaceImpls |> List.map (fst >> GenType cenv m eenvinner.tyenv) - let attrs = GenAttrs cenv eenvinner cloAttribs + let attrs = GenAttrs cenv cgbuf.mgbuf eenvinner cloAttribs let super = (if isInterfaceTy cenv.g baseType then cenv.g.ilg.typ_Object else ilCloRetTy) let interfaceTys = interfaceTys @ (if isInterfaceTy cenv.g baseType then [ilCloRetTy] else []) let cloTypeDefs = GenClosureTypeDefs cenv (ilCloTypeRef,ilCloGenericFormals,attrs,ilCloFreeVars,ilCloLambdas,ilCtorBody,mdefs,mimpls,super,interfaceTys) @@ -3625,16 +3787,16 @@ and GenSequenceExpr cenv (cgbuf:CodeGenBuffer) eenvouter (nextEnumeratorValRef:V // Get the free variables. Make a lambda to pretend that the 'nextEnumeratorValRef' is bound (it is an argument to GenerateNext) let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilCloTypeRef:ILTypeRef,ilCloFreeVars,eenvinner) = - GetIlxClosureFreeVars cenv m None eenvouter [] (mkLambda m nextEnumeratorValRef.Deref (generateNextExpr, cenv.g.int32_ty)) + GetIlxClosureFreeVars cenv cgbuf.mgbuf m None eenvouter [] (mkLambda m nextEnumeratorValRef.Deref (generateNextExpr, cenv.g.int32_ty)) - let ilCloSeqElemTy = GenType cenv.amap m eenvinner.tyenv seqElemTy + let ilCloSeqElemTy = GenType cenv m eenvinner.tyenv seqElemTy let cloRetTy = mkSeqTy cenv.g seqElemTy - let ilCloRetTyInner = GenType cenv.amap m eenvinner.tyenv cloRetTy - let ilCloRetTyOuter = GenType cenv.amap m eenvouter.tyenv cloRetTy - let ilCloEnumeratorTy = GenType cenv.amap m eenvinner.tyenv (mkIEnumeratorTy cenv.g seqElemTy) - let ilCloEnumerableTy = GenType cenv.amap m eenvinner.tyenv (mkSeqTy cenv.g seqElemTy) - let ilCloBaseTy = GenType cenv.amap m eenvinner.tyenv (mkAppTy cenv.g.seq_base_tcr [seqElemTy]) - let ilCloGenericParams = GenGenericParams cenv eenvinner cloFreeTyvars + let ilCloRetTyInner = GenType cenv m eenvinner.tyenv cloRetTy + let ilCloRetTyOuter = GenType cenv m eenvouter.tyenv cloRetTy + let ilCloEnumeratorTy = GenType cenv m eenvinner.tyenv (mkIEnumeratorTy cenv.g seqElemTy) + let ilCloEnumerableTy = GenType cenv m eenvinner.tyenv (mkSeqTy cenv.g seqElemTy) + let ilCloBaseTy = GenType cenv m eenvinner.tyenv (mkAppTy cenv.g.seq_base_tcr [seqElemTy]) + let ilCloGenericParams = GenGenericParams cenv cgbuf.mgbuf eenvinner cloFreeTyvars // Create a new closure class with a single "MoveNext" method that implements the iterator. let ilCloTyInner = mkILFormalBoxedTy ilCloTypeRef ilCloGenericParams @@ -3648,12 +3810,6 @@ and GenSequenceExpr cenv (cgbuf:CodeGenBuffer) eenvouter (nextEnumeratorValRef:V CodeGenMethod cenv cgbuf.mgbuf ([],"GetFreshEnumerator",eenvinner,1,0, (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) @@ -3689,7 +3845,7 @@ and GenSequenceExpr cenv (cgbuf:CodeGenBuffer) eenvouter (nextEnumeratorValRef:V let ilCtorBody = mkILSimpleStorageCtor(None, Some ilCloBaseTy.TypeSpec, ilCloTyInner, [], [], ILMemberAccess.Assembly).MethodBody - let attrs = GenAttrs cenv eenvinner cloAttribs + let attrs = GenAttrs cenv cgbuf.mgbuf eenvinner cloAttribs let cloTypeDefs = GenClosureTypeDefs cenv (ilCloTypeRef,ilCloGenericParams,attrs,ilCloFreeVars,ilCloLambdas,ilCtorBody,[generateNextMethod;closeMethod;checkCloseMethod;lastGeneratedMethod;getFreshMethod],[],ilCloBaseTy,[]) for cloTypeDef in cloTypeDefs do cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None) @@ -3735,7 +3891,7 @@ and GenClosureTypeDefs cenv (tref:ILTypeRef, ilGenParams, attrs, ilCloFreeVars, let tdefs = EraseClosures.convIlxClosureDef cenv.g.ilxPubCloEnv tref.Enclosing td cloInfo tdefs -and GenGenericParams cenv eenv tps = tps |> DropErasedTypars |> List.map (GenGenericParam cenv eenv) +and GenGenericParams cenv mgbuf eenv tps = tps |> DropErasedTypars |> List.map (GenGenericParam cenv mgbuf eenv) and GenGenericArgs m (tyenv:TypeReprEnv) tps = tps |> DropErasedTypars |> List.map (fun c -> (mkILTyvarTy tyenv.[c,m])) /// Generate the closure class for a function @@ -3744,19 +3900,20 @@ 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 cgbuf.mgbuf 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,0,body,Return) let ilCloTypeRef = cloinfo.cloSpec.TypeRef let cloTypeDefs = if isLocalTypeFunc then // Work out the contract type and generate a class with an abstract method for this type - let (ilContractGenericParams,ilContractMethTyargs,ilContractTySpec:ILTypeSpec,ilContractFormalRetTy) = GenNamedLocalTypeFuncContractInfo cenv eenv m cloinfo + let (ilContractGenericParams,ilContractMethTyargs,ilContractTySpec:ILTypeSpec,ilContractFormalRetTy) = GenNamedLocalTypeFuncContractInfo cenv cgbuf.mgbuf eenv m cloinfo let ilContractTypeRef = ilContractTySpec.TypeRef let ilContractTy = mkILFormalBoxedTy ilContractTypeRef ilContractGenericParams let ilContractCtor = mkILNonGenericEmptyCtor None cenv.g.ilg.typ_Object @@ -3806,7 +3963,7 @@ and GenLambda cenv cgbuf eenv isLocalTypeFunc selfv expr sequel = GenSequel cenv eenv.cloc cgbuf sequel and GenTypeOfVal cenv eenv (v:Val) = - GenType cenv.amap v.Range eenv.tyenv v.Type + GenType cenv v.Range eenv.tyenv v.Type and GenFreevar cenv m eenvouter tyenvinner (fv:Val) = match StorageForVal m fv eenvouter with @@ -3816,9 +3973,9 @@ and GenFreevar cenv m eenvouter tyenvinner (fv:Val) = // Check for things that should never make it into the free variable set. Only do this in debug for performance reasons | (StaticField _ | StaticProperty _ | Method _ | Null) -> error(InternalError("GenFreevar: compiler error: unexpected unrealized value",fv.Range)) #endif - | _ -> GenType cenv.amap m tyenvinner fv.Type + | _ -> GenType cenv m tyenvinner fv.Type -and GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr = +and GetIlxClosureFreeVars cenv mgbuf m selfv eenvouter takenNames expr = // Choose a base name for the closure let basename = @@ -3882,7 +4039,7 @@ and GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr = let eenvinner = eenvouter |> EnvForTypars cloFreeTyvars let ilCloTyInner = - let ilCloGenericParams = GenGenericParams cenv eenvinner cloFreeTyvars + let ilCloGenericParams = GenGenericParams cenv mgbuf eenvinner cloFreeTyvars mkILFormalBoxedTy ilCloTypeRef ilCloGenericParams // If generating a named closure, add the closure itself as a var, available via "arg0" . @@ -3913,7 +4070,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 mgbuf m isLocalTypeFunc selfv eenvouter expr = let returnTy = match expr with | Expr.Lambda (_,_,_,_,_,_,returnTy) | Expr.TyLambda(_,_,_,_,returnTy) -> returnTy @@ -3939,7 +4096,7 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = let takenNames = vs |> List.map (fun v -> v.CompiledName) // Get the free variables and the information about the closure, add the free variables to the environment - let (cloAttribs,cloInternalFreeTyvars,cloContractFreeTyvars,_,cloFreeVars,ilCloTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr + let (cloAttribs,cloInternalFreeTyvars,cloContractFreeTyvars,_,cloFreeVars,ilCloTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv mgbuf m selfv eenvouter takenNames expr // Put the type and value arguments into the environment let rec getClosureArgs eenv ntmargs tvsl (vs:Val list) = @@ -3947,7 +4104,7 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = | tvs :: rest, _ -> let eenv = AddTyparsToEnv tvs eenv let l,eenv = getClosureArgs eenv ntmargs rest vs - let lambdas = (tvs, l) ||> List.foldBack (fun tv sofar -> Lambdas_forall(GenGenericParam cenv eenv tv,sofar)) + let lambdas = (tvs, l) ||> List.foldBack (fun tv sofar -> Lambdas_forall(GenGenericParam cenv mgbuf eenv tv,sofar)) lambdas,eenv | [], v :: rest -> let nm = v.CompiledName @@ -3957,7 +4114,7 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = let lambdas = Lambdas_lambda (mkILParamNamed(nm,GenTypeOfVal cenv eenv v),l) lambdas,eenv | _ -> - let returnTy' = GenType cenv.amap m eenv.tyenv returnTy + let returnTy' = GenType cenv m eenv.tyenv returnTy Lambdas_return returnTy', eenv // start at arg number 1 as "this" pointer holds the current closure @@ -3967,7 +4124,7 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = let narginfo = vs |> List.map (fun _ -> 1) // Generate the ILX view of the lambdas - let ilReturnTy = GenType cenv.amap m eenvinner.tyenv returnTy + let ilReturnTy = GenType cenv m eenvinner.tyenv returnTy // The general shape is: // {LAM . expr }[free-typars] : overall-type[contract-typars] @@ -4006,9 +4163,9 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = // function values. /// Compute the contract if it is a local type function - let ilContractGenericParams = GenGenericParams cenv eenvinner cloContractFreeTyvars + let ilContractGenericParams = GenGenericParams cenv mgbuf eenvinner cloContractFreeTyvars let ilContractGenericActuals = GenGenericArgs m eenvouter.tyenv cloContractFreeTyvars - let ilInternalGenericParams = GenGenericParams cenv eenvinner cloInternalFreeTyvars + let ilInternalGenericParams = GenGenericParams cenv mgbuf eenvinner cloInternalFreeTyvars let ilInternalGenericActuals = GenGenericArgs m eenvouter.tyenv cloInternalFreeTyvars let ilCloGenericFormals = ilContractGenericParams @ ilInternalGenericParams @@ -4055,25 +4212,25 @@ and IsNamedLocalTypeFuncVal g (v:Val) expr = (match stripExpr expr with Expr.TyLambda _ -> true | _ -> false) /// Generate the information relevant to the contract portion of a named local type function -and GenNamedLocalTypeFuncContractInfo cenv eenv m cloinfo = +and GenNamedLocalTypeFuncContractInfo cenv mgbuf eenv m cloinfo = let ilCloTypeRef = cloinfo.cloSpec.TypeRef let ilContractTypeRef = ILTypeRef.Create(scope=ilCloTypeRef.Scope,enclosing=ilCloTypeRef.Enclosing,name=ilCloTypeRef.Name + "$contract") let eenvForContract = EnvForTypars cloinfo.localTypeFuncContractFreeTypars eenv - let ilContractGenericParams = GenGenericParams cenv eenv cloinfo.localTypeFuncContractFreeTypars + let ilContractGenericParams = GenGenericParams cenv mgbuf eenv cloinfo.localTypeFuncContractFreeTypars let tvs,contractRetTy = match cloinfo.cloExpr with | Expr.TyLambda(_,tvs,_,_,bty) -> tvs, bty | e -> [], tyOfExpr cenv.g e let eenvForContract = AddTyparsToEnv tvs eenvForContract - let ilContractMethTyargs = GenGenericParams cenv eenvForContract tvs - let ilContractFormalRetTy = GenType cenv.amap m eenvForContract.tyenv contractRetTy + let ilContractMethTyargs = GenGenericParams cenv mgbuf eenvForContract tvs + let ilContractFormalRetTy = GenType cenv m eenvForContract.tyenv contractRetTy ilContractGenericParams,ilContractMethTyargs,mkILTySpec(ilContractTypeRef,cloinfo.localTypeFuncILGenericArgs),ilContractFormalRetTy /// Generate a new delegate construction including a closure class if necessary. This is a lot like generating function closures /// and object expression closures, and most of the code is shared. and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delegateTy, _,_,_, _) as slotsig),_attribs,methTyparsOfOverridingMethod,tmvs,body,_),m) sequel = // Get the instantiation of the delegate type - let ilCtxtDelTy = GenType cenv.amap m eenvouter.tyenv delegateTy + let ilCtxtDelTy = GenType cenv m eenvouter.tyenv delegateTy let tmvs = List.concat tmvs // Yuck. TLBIMP.EXE generated APIs use UIntPtr for the delegate ctor. @@ -4095,8 +4252,8 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delega // Work out the free type variables for the morphing thunk let takenNames = List.map nameOfVal tmvs - let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilDelegeeTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv m None eenvouter takenNames expr - let ilDelegeeGenericParams = GenGenericParams cenv eenvinner cloFreeTyvars + let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilDelegeeTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv cgbuf.mgbuf m None eenvouter takenNames expr + let ilDelegeeGenericParams = GenGenericParams cenv cgbuf.mgbuf eenvinner cloFreeTyvars let ilDelegeeGenericActualsInner = mkILFormalGenericArgs 0 ilDelegeeGenericParams // Create a new closure class with a single "delegee" method that implements the delegate. @@ -4110,7 +4267,7 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delega // The slot sig contains a formal instantiation. When creating delegates we're only // interested in the actual instantiation since we don't have to emit a method impl. - let ilDelegeeParams,ilDelegeeRet = GenActualSlotsig m cenv envForDelegeeUnderTypars slotsig methTyparsOfOverridingMethod tmvs + let ilDelegeeParams,ilDelegeeRet = GenActualSlotsig m cenv cgbuf.mgbuf envForDelegeeUnderTypars slotsig methTyparsOfOverridingMethod tmvs let envForDelegeeMeth = AddStorageForLocalVals cenv.g (List.mapi (fun i v -> (v,Arg (i+numthis))) tmvs) envForDelegeeUnderTypars let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],delegeeMethName,envForDelegeeMeth,1,0,body,(if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) @@ -4124,7 +4281,7 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delega let ilCtorBody = delegeeCtorMeth.MethodBody let ilCloLambdas = Lambdas_return ilCtxtDelTy - let ilAttribs = GenAttrs cenv eenvinner cloAttribs + let ilAttribs = GenAttrs cenv cgbuf.mgbuf eenvinner cloAttribs let cloTypeDefs = GenClosureTypeDefs cenv (ilDelegeeTypeRef,ilDelegeeGenericParams,ilAttribs,ilCloFreeVars,ilCloLambdas,ilCtorBody,[delegeeInvokeMeth],[],cenv.g.ilg.typ_Object,[]) for cloTypeDef in cloTypeDefs do cgbuf.mgbuf.AddTypeDef(ilDelegeeTypeRef, cloTypeDef, false, false, None) @@ -4190,7 +4347,7 @@ and GenJoinPoint cenv cgbuf pos eenv ty m sequel = // The others (e.g. Continue, LeaveFilter and CmpThenBrOrContinue) can't be done at the end of each branch. We must create a join point. | _ -> - let pushed = GenType cenv.amap m eenv.tyenv ty + let pushed = GenType cenv m eenv.tyenv ty let stackAfterJoin = (pushed :: (cgbuf.GetCurrentStack())) let afterJoin = CG.GenerateDelayMark cgbuf (pos + "_join") // go to the join point @@ -4392,7 +4549,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau match defaultTargetOpt with | None -> rest.Head.CaseTree | Some tg -> tg - let cuspec = GenUnionSpec cenv.amap m eenv.tyenv c.TyconRef tyargs + let cuspec = GenUnionSpec cenv m eenv.tyenv c.TyconRef tyargs let idx = c.Index let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib c.TyconRef GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e (Some (pop 1, Push [cenv.g.ilg.typ_Bool], Choice1Of2 (avoidHelpers, cuspec, idx))) eenv successTree failureTree targets repeatSP targetInfos sequel @@ -4417,7 +4574,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau GenExpr cenv cgbuf eenv SPSuppress e Continue let srcTy = tyOfExpr cenv.g e if isTyparTy cenv.g srcTy then - let ilFromTy = GenType cenv.amap m eenv.tyenv srcTy + let ilFromTy = GenType cenv m eenv.tyenv srcTy CG.EmitInstr cgbuf (pop 1) (Push [cenv.g.ilg.typ_Object]) (I_box ilFromTy) BI_brfalse | DecisionTreeTest.IsInst (_srcty,tgty) -> @@ -4431,7 +4588,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau | DecisionTreeTest.ActivePatternCase _ -> error(InternalError("internal error in codegen: DecisionTreeTest.ActivePatternCase",switchm)) | DecisionTreeTest.UnionCase (hdc,tyargs) -> GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec = GenUnionSpec cenv.amap m eenv.tyenv hdc.TyconRef tyargs + let cuspec = GenUnionSpec cenv m eenv.tyenv hdc.TyconRef tyargs let dests = if cases.Length <> caseLabels.Length then failwith "internal error: DecisionTreeTest.UnionCase" (cases , caseLabels) ||> List.map2 (fun case label -> @@ -4567,7 +4724,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 -> @@ -4584,7 +4741,7 @@ and GenLetRecBindings cenv cgbuf eenv (allBinds: Bindings,m) = | Expr.Lambda _ | Expr.TyLambda _ | Expr.Obj _ -> let isLocalTypeFunc = Option.isSome selfv && (IsNamedLocalTypeFuncVal cenv.g (Option.get selfv) e) let selfv = (match e with Expr.Obj _ -> None | _ when isLocalTypeFunc -> None | _ -> Option.map mkLocalValRef selfv) - let clo,_,eenvclo = GetIlxClosureInfo cenv m isLocalTypeFunc selfv {eenv with letBoundVars=(mkLocalValRef boundv)::eenv.letBoundVars} e + let clo,_,eenvclo = GetIlxClosureInfo cenv cgbuf.mgbuf m isLocalTypeFunc selfv {eenv with letBoundVars=(mkLocalValRef boundv)::eenv.letBoundVars} e clo.cloFreeVars |> List.iter (fun fv -> if Zset.contains fv forwardReferenceSet then match StorageForVal m fv eenvclo with @@ -4695,11 +4852,11 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta let tps,ctorThisValOpt,baseValOpt,vsl,body',bodyty = IteratedAdjustArityOfLambda cenv.g cenv.amap topValInfo rhsExpr let methodVars = List.concat vsl CommitStartScope cgbuf startScopeMarkOpt - GenMethodForBinding cenv cgbuf eenv (vspec,mspec,access,paramInfos,retInfo) (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, body', bodyty) + GenMethodForBinding cenv cgbuf.mgbuf eenv (vspec,mspec,access,paramInfos,retInfo) (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, body', bodyty) | StaticProperty (ilGetterMethSpec, optShadowLocal) -> - let ilAttribs = GenAttrs cenv eenv vspec.Attribs + let ilAttribs = GenAttrs cenv cgbuf.mgbuf eenv vspec.Attribs let ilTy = ilGetterMethSpec.FormalReturnType let ilPropDef = { Name = PrettyNaming.ChopPropertyName ilGetterMethSpec.Name @@ -4753,9 +4910,9 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta if not hasLiteralAttr then vspec.Attribs |> List.filter (fun (Attrib(_,_,_,_,_,targets,_)) -> canTarget(targets, System.AttributeTargets.Field)) - |> GenAttrs cenv eenv // backing field only gets attributes that target fields + |> GenAttrs cenv cgbuf.mgbuf eenv // backing field only gets attributes that target fields else - GenAttrs cenv eenv vspec.Attribs // literals have no property, so preserve all the attributes on the field itself + GenAttrs cenv cgbuf.mgbuf eenv vspec.Attribs // literals have no property, so preserve all the attributes on the field itself let ilFieldDef = { ilFieldDef with @@ -4774,7 +4931,7 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta let ilAttribs = vspec.Attribs |> List.filter (fun (Attrib(_,_,_,_,_,targets,_)) -> canTarget(targets, System.AttributeTargets.Property)) - |> GenAttrs cenv eenv // property only gets attributes that target properties + |> GenAttrs cenv cgbuf.mgbuf eenv // property only gets attributes that target properties let ilPropDef = { Name=ilPropName Attributes = PropertyAttributes.None @@ -4963,7 +5120,7 @@ and GenParamAttribs cenv attribs = let Marshal,attribs = GenMarshal cenv attribs inFlag,outFlag,optionalFlag,defaultValue,Marshal,attribs -and GenParams cenv eenv (mspec:ILMethodSpec) (attribs:ArgReprInfo list) (implValsOpt: Val list option) = +and GenParams cenv mgbuf eenv (mspec:ILMethodSpec) (attribs:ArgReprInfo list) (implValsOpt: Val list option) = let ilArgTys = mspec.FormalArgTypes let argInfosAndTypes = if List.length attribs = List.length ilArgTys then List.zip ilArgTys attribs @@ -5002,16 +5159,16 @@ and GenParams cenv eenv (mspec:ILMethodSpec) (attribs:ArgReprInfo list) (implVal IsIn=inFlag IsOut=outFlag IsOptional=optionalFlag - CustomAttrs= mkILCustomAttrs (GenAttrs cenv eenv attribs) } + CustomAttrs= mkILCustomAttrs (GenAttrs cenv mgbuf eenv attribs) } param, takenNames) |> fst -and GenReturnInfo cenv eenv ilRetTy (retInfo : ArgReprInfo) : ILReturn = +and GenReturnInfo cenv mgbuf eenv ilRetTy (retInfo : ArgReprInfo) : ILReturn = let marshal,attrs = GenMarshal cenv retInfo.Attribs { Type=ilRetTy Marshal=marshal - CustomAttrs= mkILCustomAttrs (GenAttrs cenv eenv attrs) } + CustomAttrs= mkILCustomAttrs (GenAttrs cenv mgbuf eenv attrs) } and GenPropertyForMethodDef compileAsInstance tref mdef (v:Val) (memberInfo:ValMemberInfo) ilArgTys ilPropTy ilAttrs compiledName = let name = match compiledName with | Some n -> n | _ -> v.PropertyName in (* chop "get_" *) @@ -5029,7 +5186,7 @@ and GenPropertyForMethodDef compileAsInstance tref mdef (v:Val) (memberInfo:ValM and GenEventForProperty cenv eenvForMeth (mspec:ILMethodSpec) (v:Val) ilAttrsThatGoOnPrimaryItem m returnTy = let evname = v.PropertyName let delegateTy = Infos.FindDelegateTypeOfPropertyEvent cenv.g cenv.amap evname m returnTy - let ilDelegateTy = GenType cenv.amap m eenvForMeth.tyenv delegateTy + let ilDelegateTy = GenType cenv m eenvForMeth.tyenv delegateTy let ilThisTy = mspec.DeclaringType let addMethRef = mkILMethRef (ilThisTy.TypeRef,mspec.CallingConv,"add_" + evname,0,[ilDelegateTy],ILType.Void) let removeMethRef = mkILMethRef (ilThisTy.TypeRef,mspec.CallingConv,"remove_" + evname,0,[ilDelegateTy],ILType.Void) @@ -5100,7 +5257,7 @@ and ComputeMethodImplAttribs cenv (_v:Val) attrs = hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningImplFlag, hasAggressiveInliningImplFlag, attrs and GenMethodForBinding - cenv cgbuf eenv + cenv mgbuf eenv (v:Val,mspec,access,paramInfos,retInfo) (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, body, returnTy) = @@ -5164,7 +5321,7 @@ and GenMethodForBinding // This is the main code generation for most methods false, - MethodBody.IL(CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,tailCallInfo, mspec.Name, eenvForMeth, 0, 0, bodyExpr, sequel)), + MethodBody.IL(CodeGenMethodForExpr cenv mgbuf (SPAlways,tailCallInfo, mspec.Name, eenvForMeth, 0, 0, bodyExpr, sequel)), false // Do not generate DllImport attributes into the code - they are implicit from the P/Invoke @@ -5186,7 +5343,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 mgbuf eenv securityAttributes let secDecls = if List.isEmpty securityAttributes then emptyILSecurityDecls else mkILSecurityDecls permissionSets @@ -5194,12 +5351,12 @@ and GenMethodForBinding let ilAttrsCompilerGenerated = if v.IsCompilerGenerated then [ cenv.g.CompilerGeneratedAttribute ] else [] let ilAttrsThatGoOnPrimaryItem = - [ yield! GenAttrs cenv eenv attrs + [ yield! GenAttrs cenv mgbuf eenv attrs yield! GenCompilationArgumentCountsAttr cenv v ] - let ilTypars = GenGenericParams cenv eenvUnderMethLambdaTypars tps - let ilParams = GenParams cenv eenv mspec paramInfos (Some(nonUnitNonSelfMethodVars)) - let ilReturn = GenReturnInfo cenv eenv mspec.FormalReturnType retInfo + let ilTypars = GenGenericParams cenv mgbuf eenvUnderMethLambdaTypars tps + let ilParams = GenParams cenv mgbuf eenv mspec paramInfos (Some(nonUnitNonSelfMethodVars)) + let ilReturn = GenReturnInfo cenv mgbuf eenv mspec.FormalReturnType retInfo let methName = mspec.Name let tref = mspec.MethodRef.DeclaringTypeRef @@ -5225,7 +5382,7 @@ and GenMethodForBinding else mdef CountMethodDef() - cgbuf.mgbuf.AddMethodDef(tref,mdef) + mgbuf.AddMethodDef(tref,mdef) match v.MemberInfo with @@ -5262,7 +5419,7 @@ and GenMethodForBinding let mdef = List.fold (fun mdef f -> f mdef) mdef flagFixups // fixup can potentially change name of reflected definition that was already recorded - patch it if necessary - cgbuf.mgbuf.ReplaceNameOfReflectedDefinition(v, mdef.Name) + mgbuf.ReplaceNameOfReflectedDefinition(v, mdef.Name) mdef else mkILGenericNonVirtualMethod (v.CompiledName,access,ilMethTypars,ilParams,ilReturn,ilMethodBody) @@ -5289,20 +5446,20 @@ and GenMethodForBinding // Emit the pseudo-property as an event, but not if its a private method impl if mdef.Access <> ILMemberAccess.Private then let edef = GenEventForProperty cenv eenvForMeth mspec v ilAttrsThatGoOnPrimaryItem m returnTy - cgbuf.mgbuf.AddEventDef(tref,edef) + mgbuf.AddEventDef(tref,edef) // The method def is dropped on the floor here else // Emit the property, but not if its a private method impl if mdef.Access <> ILMemberAccess.Private then let vtyp = ReturnTypeOfPropertyVal cenv.g v - let ilPropTy = GenType cenv.amap m eenvUnderMethTypeTypars.tyenv vtyp - let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv.amap m eenvUnderMethTypeTypars.tyenv + let ilPropTy = GenType cenv m eenvUnderMethTypeTypars.tyenv vtyp + let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv m eenvUnderMethTypeTypars.tyenv let ilPropDef = GenPropertyForMethodDef compileAsInstance tref mdef v memberInfo ilArgTys ilPropTy (mkILCustomAttrs ilAttrsThatGoOnPrimaryItem) compiledName - cgbuf.mgbuf.AddOrMergePropertyDef(tref,ilPropDef,m) + mgbuf.AddOrMergePropertyDef(tref,ilPropDef,m) // Add the special name flag for all properties - let mdef = { mdef.WithSpecialName with CustomAttrs= mkILCustomAttrs ((GenAttrs cenv eenv attrsAppliedToGetterOrSetter) @ sourceNameAttribs @ ilAttrsCompilerGenerated) } + let mdef = { mdef.WithSpecialName with CustomAttrs= mkILCustomAttrs ((GenAttrs cenv mgbuf eenv attrsAppliedToGetterOrSetter) @ sourceNameAttribs @ ilAttrsCompilerGenerated) } EmitTheMethodDef mdef | _ -> let mdef = { mdef with CustomAttrs= mkILCustomAttrs (ilAttrsThatGoOnPrimaryItem @ sourceNameAttribs @ ilAttrsCompilerGenerated) } @@ -5316,7 +5473,7 @@ and GenMethodForBinding match v.MemberInfo with | Some memberInfo when v.IsExtensionMember -> match memberInfo.MemberFlags.MemberKind with - | (MemberKind.PropertySet | MemberKind.PropertyGet) -> ilAttrsThatGoOnPrimaryItem @ GenAttrs cenv eenv attrsAppliedToGetterOrSetter + | (MemberKind.PropertySet | MemberKind.PropertyGet) -> ilAttrsThatGoOnPrimaryItem @ GenAttrs cenv mgbuf eenv attrsAppliedToGetterOrSetter | _ -> ilAttrsThatGoOnPrimaryItem | _ -> ilAttrsThatGoOnPrimaryItem @@ -5374,7 +5531,7 @@ and GenSetVal cenv cgbuf eenv (vref,e,m) sequel = and GenGetValRefAndSequel cenv cgbuf eenv m (v:ValRef) fetchSequel = let ty = v.Type - GenGetStorageAndSequel cenv cgbuf eenv m (ty, GenType cenv.amap m eenv.tyenv ty) (StorageForValRef m v eenv) fetchSequel + GenGetStorageAndSequel cenv cgbuf eenv m (ty, GenType cenv m eenv.tyenv ty) (StorageForValRef m v eenv) fetchSequel and GenGetVal cenv cgbuf eenv (v:ValRef,m) sequel = GenGetValRefAndSequel cenv cgbuf eenv m v None @@ -5531,7 +5688,7 @@ and AllocLocalVal cenv cgbuf v eenv repr scopeMarks = let eenvinner = {eenv with letBoundVars=(mkLocalValRef v)::eenv.letBoundVars} - let cloinfo,_,_ = GetIlxClosureInfo cenv v.Range true None eenvinner (Option.get repr) + let cloinfo,_,_ = GetIlxClosureInfo cenv cgbuf.mgbuf v.Range true None eenvinner (Option.get repr) cloinfo let idx,eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.CompiledName, cenv.g.ilg.typ_Object, false) scopeMarks @@ -5621,7 +5778,8 @@ and EmitRestoreStack cgbuf (savedStack,savedStackLocals) = //GenAttr: custom attribute generation //------------------------------------------------------------------------- -and GenAttribArg amap g eenv x (ilArgTy:ILType) = +and GenAttribArg cenv mgbuf eenv x (ilArgTy:ILType) = + let g = cenv.g match x,ilArgTy with @@ -5662,31 +5820,31 @@ and GenAttribArg amap g eenv x (ilArgTy:ILType) = // Detect '[| ... |]' nodes | Expr.Op(TOp.Array,[elemTy],args,m),_ -> - let ilElemTy = GenType amap m eenv.tyenv elemTy - ILAttribElem.Array (ilElemTy, List.map (fun arg -> GenAttribArg amap g eenv arg ilElemTy) args) + let ilElemTy = GenType cenv m eenv.tyenv elemTy + ILAttribElem.Array (ilElemTy, List.map (fun arg -> GenAttribArg cenv mgbuf eenv arg ilElemTy) args) // Detect 'typeof' calls | TypeOfExpr g ty, _ -> - ILAttribElem.Type (Some (GenType amap x.Range eenv.tyenv ty)) + ILAttribElem.Type (Some (GenType cenv x.Range eenv.tyenv ty)) // Detect 'typedefof' calls | TypeDefOfExpr g ty, _ -> - ILAttribElem.TypeRef (Some (GenType amap x.Range eenv.tyenv ty).TypeRef) + ILAttribElem.TypeRef (Some (GenType cenv x.Range eenv.tyenv ty).TypeRef) // Ignore upcasts | Expr.Op(TOp.Coerce,_,[arg2],_),_ -> - GenAttribArg amap g eenv arg2 ilArgTy + GenAttribArg cenv mgbuf eenv arg2 ilArgTy // Detect explicit enum values | EnumExpr g arg1, _ -> - GenAttribArg amap g eenv arg1 ilArgTy + GenAttribArg cenv mgbuf eenv arg1 ilArgTy // Detect bitwise or of attribute flags: one case of constant folding (a more general treatment is needed) | AttribBitwiseOrExpr g (arg1,arg2),_ -> - let v1 = GenAttribArg amap g eenv arg1 ilArgTy - let v2 = GenAttribArg amap g eenv arg2 ilArgTy + let v1 = GenAttribArg cenv mgbuf eenv arg1 ilArgTy + let v2 = GenAttribArg cenv mgbuf eenv arg2 ilArgTy match v1,v2 with | ILAttribElem.SByte i1, ILAttribElem.SByte i2 -> ILAttribElem.SByte (i1 ||| i2) | ILAttribElem.Int16 i1, ILAttribElem.Int16 i2-> ILAttribElem.Int16 (i1 ||| i2) @@ -5703,24 +5861,25 @@ and GenAttribArg amap g eenv x (ilArgTy:ILType) = error (InternalError ("invalid custom attribute value (not a constant): " + showL (exprL x),x.Range)) -and GenAttr amap g eenv (Attrib(_,k,args,props,_,_,_)) = +and GenAttr cenv mgbuf eenv (Attrib(_,k,args,props,_,_,_)) = + let g = cenv.g let props = props |> List.map (fun (AttribNamedArg(s,ty,fld,AttribExpr(_,expr))) -> let m = expr.Range - let ilTy = GenType amap m eenv.tyenv ty - let cval = GenAttribArg amap g eenv expr ilTy + let ilTy = GenType cenv m eenv.tyenv ty + let cval = GenAttribArg cenv mgbuf eenv expr ilTy (s,ilTy,fld,cval)) let mspec = match k with | ILAttrib(mref) -> mkILMethSpec(mref,AsObject,[],[]) | FSAttrib(vref) -> assert(vref.IsMember) - let mspec,_,_,_,_ = GetMethodSpecForMemberVal amap g (Option.get vref.MemberInfo) vref + let mspec,_,_,_,_ = GetMethodSpecForMemberVal cenv.amap g (Option.get vref.MemberInfo) vref mspec - let ilArgs = List.map2 (fun (AttribExpr(_,vexpr)) ty -> GenAttribArg amap g eenv vexpr ty) args mspec.FormalArgTypes + let ilArgs = List.map2 (fun (AttribExpr(_,vexpr)) ty -> GenAttribArg cenv mgbuf eenv vexpr ty) args mspec.FormalArgTypes mkILCustomAttribMethRef g.ilg (mspec,ilArgs, props) -and GenAttrs cenv eenv attrs = List.map (GenAttr cenv.amap cenv.g eenv) attrs +and GenAttrs cenv mgbuf eenv attrs = List.map (GenAttr cenv mgbuf eenv) attrs and GenCompilationArgumentCountsAttr cenv (v:Val) = [ match v.ValReprInfo with @@ -5732,18 +5891,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 mgbuf 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 mgbuf 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 @@ -5762,7 +5921,7 @@ and GenTypeDefForCompLoc (cenv, eenv, mgbuf: AssemblyBuilder, cloc, hidden, attr emptyILProperties, emptyILEvents, mkILCustomAttrs - (GenAttrs cenv eenv attribs @ + (GenAttrs cenv mgbuf eenv attribs @ (if List.contains tref.Name [TypeNameForImplicitMainMethod cloc; TypeNameForInitClass cloc; TypeNameForPrivateImplementationDetails cloc] then [ ] else [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Module)])), @@ -5849,7 +6008,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 @@ -5879,7 +6045,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 @@ -5905,8 +6070,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 @@ -5946,7 +6109,7 @@ and GenTopImpl cenv mgbuf mainInfoOpt eenv (TImplFile(qname, _, mexpr, hasExplic // } | None -> - let ilAttrs = mkILCustomAttrs (GenAttrs cenv eenv mainInfo) + let ilAttrs = mkILCustomAttrs (GenAttrs cenv mgbuf eenv mainInfo) if not cenv.opts.isInteractive && not doesSomething then let errorM = m.EndRange warning (Error(FSComp.SR.ilMainModuleEmpty(), errorM)) @@ -6033,7 +6196,7 @@ and GenFieldInit m c = | ConstToILFieldInit fieldInit -> fieldInit | _ -> error(Error(FSComp.SR.ilTypeCannotBeUsedForLiteralField(),m)) -and GenAbstractBinding cenv eenv tref (vref:ValRef) = +and GenAbstractBinding cenv mgbuf eenv tref (vref:ValRef) = assert(vref.IsMember) let m = vref.Range let memberInfo = Option.get vref.MemberInfo @@ -6041,14 +6204,14 @@ and GenAbstractBinding cenv eenv tref (vref:ValRef) = let hasPreserveSigImplFlag,hasSynchronizedImplFlag,hasNoInliningFlag,hasAggressiveInliningImplFlag,attribs = ComputeMethodImplAttribs cenv vref.Deref attribs if memberInfo.MemberFlags.IsDispatchSlot && not memberInfo.IsImplemented then let ilAttrs = - [ yield! GenAttrs cenv eenv attribs + [ yield! GenAttrs cenv mgbuf eenv attribs yield! GenCompilationArgumentCountsAttr cenv vref.Deref ] let mspec,ctps,mtps,argInfos,retInfo = GetMethodSpecForMemberVal cenv.amap cenv.g memberInfo vref let eenvForMeth = EnvForTypars (ctps@mtps) eenv - let ilMethTypars = GenGenericParams cenv eenvForMeth mtps - let ilReturn = GenReturnInfo cenv eenvForMeth mspec.FormalReturnType retInfo - let ilParams = GenParams cenv eenvForMeth mspec argInfos None + let ilMethTypars = GenGenericParams cenv mgbuf eenvForMeth mtps + let ilReturn = GenReturnInfo cenv mgbuf eenvForMeth mspec.FormalReturnType retInfo + let ilParams = GenParams cenv mgbuf eenvForMeth mspec argInfos None let compileAsInstance = ValRefIsCompiledAsInstanceMember cenv.g vref let mdef = mkILGenericVirtualMethod (vref.CompiledName,ILMemberAccess.Public,ilMethTypars,ilParams,ilReturn,MethodBody.Abstract) @@ -6076,8 +6239,8 @@ and GenAbstractBinding cenv eenv tref (vref:ValRef) = [],[],[edef] else let ilPropDef = - let ilPropTy = GenType cenv.amap m eenvForMeth.tyenv vtyp - let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv.amap m eenvForMeth.tyenv + let ilPropTy = GenType cenv m eenvForMeth.tyenv vtyp + let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv m eenvForMeth.tyenv GenPropertyForMethodDef compileAsInstance tref mdef v memberInfo ilArgTys ilPropTy (mkILCustomAttrs ilAttrs) None let mdef = mdef.WithSpecialName [mdef], [ilPropDef],[] @@ -6085,12 +6248,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 @@ -6123,9 +6285,9 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = None)) let mdef = { ilMethodDef 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 @@ -6139,10 +6301,10 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let eenvinner = ReplaceTyenv (TypeReprEnv.ForTycon tycon) eenv let thisTy = generalizedTyconRef tcref - let ilThisTy = GenType cenv.amap m eenvinner.tyenv thisTy + let ilThisTy = GenType cenv m eenvinner.tyenv thisTy let tref = ilThisTy.TypeRef - let ilGenParams = GenGenericParams cenv eenvinner tycon.TyparsNoRange - let ilIntfTys = tycon.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv.amap m eenvinner.tyenv) + let ilGenParams = GenGenericParams cenv mgbuf eenvinner tycon.TyparsNoRange + let ilIntfTys = tycon.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv m eenvinner.tyenv) let ilTypeName = tref.Name let hidden = IsHiddenTycon eenv.sigToImplRemapInfo tycon @@ -6177,7 +6339,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = // REVIEW: this should be based off tcaug_adhoc_list, which is in declaration order tycon.MembersOfFSharpTyconSorted |> List.sortWith (fun v1 v2 -> rangeOrder.Compare(v1.DefinitionRange,v2.DefinitionRange)) - |> List.map (GenAbstractBinding cenv eenv tref) + |> List.map (GenAbstractBinding cenv mgbuf eenv tref) |> List.unzip3 |> mapTriple (List.concat, List.concat, List.concat) @@ -6207,7 +6369,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let useMethodImpl = true let eenvUnderTypars = EnvForTypars memberParentTypars eenv - let _,methodImplGenerator = GenMethodImpl cenv eenvUnderTypars (useMethodImpl,slotsig) m + let _,methodImplGenerator = GenMethodImpl cenv mgbuf eenvUnderTypars (useMethodImpl,slotsig) m if useMethodImpl then yield methodImplGenerator (ilThisTy,memberMethodTypars) @@ -6237,11 +6399,11 @@ 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 mgbuf eenv securityAttrs let secDecls = if List.isEmpty securityAttrs then emptyILSecurityDecls else mkILSecurityDecls permissionSets let ilDebugDisplayAttributes = - [ yield! GenAttrs cenv eenv debugDisplayAttrs + [ yield! GenAttrs cenv mgbuf eenv debugDisplayAttrs if generateDebugDisplayAttribute then yield cenv.g.mkDebuggerDisplayAttribute ("{" + debugDisplayMethodName + "(),nq}") ] @@ -6250,7 +6412,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = [ yield! defaultMemberAttrs yield! normalAttrs |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_StructLayoutAttribute >> not) - |> GenAttrs cenv eenv + |> GenAttrs cenv mgbuf eenv yield! ilDebugDisplayAttributes ] let reprAccess = ComputeMemberAccess hiddenRepr @@ -6293,7 +6455,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = ((fspec.IsCompilerGenerated && not tycon.IsEnumTycon) || hiddenRepr || IsHiddenRecdField eenv.sigToImplRemapInfo (tcref.MakeNestedRecdFieldRef fspec)) - let ilType = GenType cenv.amap m eenvinner.tyenv fspec.FormalType + let ilType = GenType cenv m eenvinner.tyenv fspec.FormalType let ilFieldName = ComputeFieldName tycon fspec yield (useGenuineField, ilFieldName, fspec.IsMutable, fspec.IsStatic, fspec.PropertyAttribs, ilType, isPropHidden, fspec) ] @@ -6351,7 +6513,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = LiteralValue = literalValue Offset = ilFieldOffset Marshal = ilFieldMarshal - CustomAttrs = mkILCustomAttrs (GenAttrs cenv eenv fattribs @ extraAttribs) } + CustomAttrs = mkILCustomAttrs (GenAttrs cenv mgbuf eenv fattribs @ extraAttribs) } let fdef = fdef.WithAccess(access) .WithStatic(isStatic) @@ -6372,7 +6534,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let ilCallingConv = if isStatic then ILCallingConv.Static else ILCallingConv.Instance let ilPropName = fspec.Name let ilHasSetter = isCLIMutable || isFSharpMutable - let ilFieldAttrs = GenAttrs cenv eenv propAttribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i] + let ilFieldAttrs = GenAttrs cenv mgbuf eenv propAttribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i] yield { Name = ilPropName Attributes = PropertyAttributes.None @@ -6490,7 +6652,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 @@ -6504,13 +6666,12 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = match paraml with | [[tsp]] when isUnitTy cenv.g tsp.Type -> [] (* suppress unit arg *) | paraml -> paraml - GenActualSlotsig m cenv eenvinner (TSlotSig(nm,typ,ctps,mtps,paraml,returnTy)) [] [] - for ilMethodDef in mkILDelegateMethods reprAccess cenv.g.ilg (cenv.g.iltyp_AsyncCallback, cenv.g.iltyp_IAsyncResult) (p,r) do - yield ilMethodDef + GenActualSlotsig m cenv mgbuf eenvinner (TSlotSig(nm,typ,ctps,mtps,paraml,returnTy)) [] [] + 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 @@ -6529,7 +6690,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = | TRecdRepr _ | TFSharpObjectRepr _ as tyconRepr -> let super = superOfTycon cenv.g tycon - let ilBaseTy = GenType cenv.amap m eenvinner.tyenv super + let ilBaseTy = GenType cenv m eenvinner.tyenv super // Build a basic type definition let isObjectType = (match tyconRepr with TFSharpObjectRepr _ -> true | _ -> false) @@ -6637,7 +6798,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = tycon.UnionCasesArray |> Array.mapi (fun i ucspec -> { altName=ucspec.CompiledName altFields=GenUnionCaseRef cenv.amap m eenvinner.tyenv i ucspec.RecdFieldsArray - altCustomAttrs= mkILCustomAttrs (GenAttrs cenv eenv ucspec.Attribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.UnionCase) i]) }) + altCustomAttrs= mkILCustomAttrs (GenAttrs cenv mgbuf eenv ucspec.Attribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.UnionCase) i]) }) let cuinfo = { cudReprAccess=reprAccess cudNullPermitted=IsUnionTypeWithNullAsTrueValue cenv.g tycon @@ -6732,7 +6893,7 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = let ilMethodDefsForProperties,ilFieldDefs,ilPropertyDefs,fieldNamesAndTypes = [ for i,fld in markup fspecs do let ilPropName = fld.Name - let ilPropType = GenType cenv.amap m eenv.tyenv fld.FormalType + let ilPropType = GenType cenv m eenv.tyenv fld.FormalType let ilMethName = "get_" + fld.Name let ilFieldName = ComputeFieldName exnc fld let ilMethodDef = mkLdfldMethodDef (ilMethName,reprAccess,false,ilThisTy,ilFieldName,ilPropType) @@ -6746,7 +6907,7 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = Type = ilPropType Init = None Args = [] - CustomAttrs=mkILCustomAttrs (GenAttrs cenv eenv fld.PropertyAttribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i]) } + CustomAttrs=mkILCustomAttrs (GenAttrs cenv mgbuf eenv fld.PropertyAttribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i]) } yield (ilMethodDef,ilFieldDef,ilPropDef,(ilPropName,ilFieldName,ilPropType)) ] |> List.unzip4 @@ -6811,7 +6972,7 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = let ilTypeName = tref.Name - let interfaces = exnc.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv.amap m eenv.tyenv) + let interfaces = exnc.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv m eenv.tyenv) let tdef = mkILGenericClass (ilTypeName,access,[],cenv.g.iltyp_Exception, @@ -6831,7 +6992,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,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() //------------------------------------------------------------------------- @@ -6856,15 +7036,17 @@ type IlxGenResults = { ilTypeDefs: ILTypeDef list ilAssemAttrs : ILAttribute list ilNetModuleAttrs: ILAttribute list + topAssemblyAttrs : Attribs + permissionSets : ILPermission 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 @@ -6873,10 +7055,11 @@ let GenerateCode (cenv, eenv, TypedAssemblyAfterOptimization fileImpls, assemAtt // Generate the whole assembly CodegenAssembly cenv eenv mgbuf fileImpls - let ilAssemAttrs = GenAttrs cenv eenv assemAttribs + let ilAssemAttrs = GenAttrs cenv mgbuf eenv assemAttribs let tdefs,reflectedDefinitions = mgbuf.Close() + // Generate the quotations let quotationResourceInfo = match reflectedDefinitions with @@ -6911,11 +7094,18 @@ let GenerateCode (cenv, eenv, TypedAssemblyAfterOptimization fileImpls, assemAtt [ (referencedTypeDefs, defnsResourceBytes) ] - let ilNetModuleAttrs = GenAttrs cenv eenv moduleAttribs + let ilNetModuleAttrs = GenAttrs cenv mgbuf eenv moduleAttribs + + let casApplied = new Dictionary() + let securityAttrs, topAssemblyAttrs = assemAttribs |> List.partition (fun a -> TypeChecker.IsSecurityAttribute cenv.g cenv.amap casApplied a rangeStartup) + // remove any security attributes from the top-level assembly attribute list + let permissionSets = CreatePermissionSets cenv mgbuf eenv securityAttrs { ilTypeDefs= tdefs ilAssemAttrs = ilAssemAttrs ilNetModuleAttrs = ilNetModuleAttrs + topAssemblyAttrs = topAssemblyAttrs + permissionSets = permissionSets quotationResourceInfo = quotationResourceInfo } @@ -6954,7 +7144,7 @@ let LookupGeneratedValue (amap:ImportMap) (ctxt: ExecutionContext) eenv (v:Val) try // Convert the v.Type into a System.Type according to ilxgen and ilreflect. let objTyp = - let ilTy = GenType amap v.Range TypeReprEnv.Empty v.Type (* TypeReprEnv.Empty ok, not expecting typars *) + let ilTy = GenTypeAux amap v.Range TypeReprEnv.Empty v.Type (* TypeReprEnv.Empty ok, not expecting typars *) ctxt.LookupType ilTy // Lookup the compiled v value (as an object). match StorageForVal v.Range v eenv with @@ -7015,37 +7205,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 staticTyp = ctxt.LookupTypeRef ilContainerTy.TypeRef - if hasLiteralAttr then - Some (staticTyp.GetField(fspec.Name) :> MemberInfo) - else - Some (staticTyp.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() @@ -7070,7 +7236,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 @@ -7078,5 +7244,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 f3db0386983..8ff68fd3ebb 100644 --- a/src/fsharp/IlxGen.fsi +++ b/src/fsharp/IlxGen.fsi @@ -44,6 +44,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 : ILPermission list /// The generated IL/ILX resources associated with F# quotations quotationResourceInfo : (ILTypeRef list * byte[]) list } @@ -70,9 +74,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 -> ILPermission 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 f8fc1354494..091f56acd69 100644 --- a/src/fsharp/InnerLambdasToTopLevelFuncs.fs +++ b/src/fsharp/InnerLambdasToTopLevelFuncs.fs @@ -1281,9 +1281,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 c933a847bbb..8d92b6edb64 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) @@ -749,8 +750,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 @@ -914,10 +915,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 "/" @@ -1163,6 +1169,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | RPAREN | GREATER true | RBRACE + | BAR_RBRACE | RBRACK | BAR_RBRACK | WITH @@ -1201,7 +1208,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 @@ -1294,9 +1301,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))) @@ -1813,7 +1820,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) @@ -1839,7 +1846,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) -> diff --git a/src/fsharp/NameResolution.fs b/src/fsharp/NameResolution.fs index 2715b65e27d..a62d489cb1e 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 @@ -1389,6 +1393,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 @@ -1637,6 +1643,7 @@ let CheckAllTyparsInferrable amap m item = | Item.UnionCase _ | Item.ExnCase _ | Item.RecdField _ + | Item.AnonRecdField _ | Item.NewDef _ | Item.ILField _ | Item.Event _ @@ -2000,6 +2007,15 @@ let TryFindUnionCaseOfType g typ nm = else None +/// Try to find a union case of a type, with the given name +let TryFindAnonRecdFieldOfType g typ nm = + match tryDestAnonRecdTy g typ with + | Some (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 + | None -> None + let CoreDisplayName(pinfo:PropInfo) = match pinfo with | FSProp(_,_,_,Some set) -> set.CoreDisplayName @@ -2060,7 +2076,18 @@ let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo | Some ucase -> OneResult (success(resInfo,Item.UnionCase(ucase,false),rest)) | None -> - let isLookUpExpr = lookupKind = LookupKind.Expr + + let anonRecdSearch = + match lookupKind with + | LookupKind.Expr -> TryFindAnonRecdFieldOfType g typ 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 typ with | Some (PropertyItem psets) when isLookUpExpr -> let pinfos = psets |> ExcludeHiddenOfPropInfos g ncenv.amap m @@ -2073,6 +2100,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 @@ -2080,13 +2108,16 @@ let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo let extensionMethInfos = ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv optFilter m typ success [resInfo,Item.MakeMethGroup (nm,minfos@extensionMethInfos),rest] + | Some (ILFieldItem (finfo:: _)) when (match lookupKind with LookupKind.Expr | LookupKind.Pattern -> true | _ -> false) -> success [resInfo,Item.ILField finfo,rest] | Some (EventItem (einfo :: _)) when isLookUpExpr -> success [resInfo,Item.Event einfo,rest] + | Some (RecdFieldItem (rfinfo)) when (match lookupKind with LookupKind.Expr | LookupKind.RecdField | LookupKind.Pattern -> true | _ -> false) -> success [resInfo,Item.RecdField(rfinfo),rest] + | _ -> let pinfos = ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (optFilter, ad) m typ @@ -3633,10 +3664,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 typ with + | Some (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 @ @@ -3674,6 +3715,12 @@ let rec ResolvePartialLongIdentInType (ncenv: NameResolver) nenv isApplicableMet |> List.filter (IsPropInfoAccessible g amap m ad) |> List.collect (fun pinfo -> (FullTypeOfPinfo pinfo) |> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) @ + (if statics then [] + else + match TryFindAnonRecdFieldOfType g typ 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,typ) |> List.collect (PropTypOfEventInfo ncenv.InfoReader m ad >> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) @ @@ -4133,6 +4180,13 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics typ if statics then yield! typ |> GetNestedTypesOfType (ad, ncenv, None, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) |> List.map (ItemOfTy g) | _ -> + if not statics then + match tryDestAnonRecdTy g typ with + | Some (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 typ |> List.filter (fun x -> @@ -4301,6 +4355,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 typ 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, typ) do let tyinfo = PropTypOfEventInfo ncenv.InfoReader m ad einfo diff --git a/src/fsharp/NameResolution.fsi b/src/fsharp/NameResolution.fsi index 859009e3645..0b092954f50 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. @@ -169,6 +172,9 @@ type BulkAdd = Yes | No /// Lookup patterns in name resolution environment val internal TryFindPatternByName : string -> NameResolutionEnv -> Item option +/// 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 d3116650608..aa20fba4d05 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)) @@ -921,6 +922,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 7ce763fede8..fe8052fc2b0 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -156,17 +156,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) ) ) @@ -1258,6 +1261,7 @@ and BindingHasEffect g bind = bind.Expr |> ExprHasEffect g and OpHasEffect g op = match op with | TOp.Tuple _ -> false + | TOp.AnonRecd _ -> false | TOp.Recd (ctor, tcref) -> match ctor with | RecdExprIsObjInit -> true @@ -1272,6 +1276,7 @@ and OpHasEffect g op = | TOp.TupleFieldGet(_) -> false | TOp.ExnFieldGet(ecref, n) -> isExnFieldMutable ecref n | TOp.RefAddrGet -> false + | TOp.AnonRecdGet _ -> true (* conservative *) | TOp.ValFieldGet rfref -> rfref.RecdField.IsMutable || (TryFindTyconRefBoolAttribute g Range.range0 g.attrib_AllowNullLiteralAttribute rfref.TyconRef = Some(true)) | TOp.ValFieldGetAddr rfref -> rfref.RecdField.IsMutable (* data is immutable, so taking address is ok *) | TOp.UnionCaseFieldGetAddr _ -> false (* data is immutable, so taking address is ok *) @@ -1857,7 +1862,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 _ @@ -3154,7 +3164,7 @@ and OptimizeModuleDefs cenv (env, bindInfosColl) defs = let defs, minfos = List.unzip defs (defs, UnionOptimizationInfos minfos), (env, bindInfosColl) -and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile(qname, pragmas, (ModuleOrNamespaceExprWithSig(mty, _, _) as mexpr), hasExplicitEntryPoint, isScript)) = +and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile(qname, pragmas, (ModuleOrNamespaceExprWithSig(mty, _, _) as mexpr), hasExplicitEntryPoint, isScript, anonRecdTypes)) = let env, mexpr', minfo = match mexpr with // FSI: FSI compiles everything as if you're typing incrementally into one module @@ -3173,7 +3183,7 @@ and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile(qn let hidden = ComputeHidingInfoAtAssemblyBoundary mty 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 c22fb3f4098..e741dc20eca 100644 --- a/src/fsharp/PostInferenceChecks.fs +++ b/src/fsharp/PostInferenceChecks.fs @@ -163,6 +163,7 @@ let SetArgVals env (vs: Val list) = type cenv = { boundVals: Dictionary // really a hash set mutable potentialUnboundUsesOfVals: StampMap + mutable anonRecdTypes: StampMap g: TcGlobals amap: Import.ImportMap /// For reading metadata @@ -200,7 +201,7 @@ let BindVals cenv env vs = List.iter (BindVal cenv env) vs // approx walk of type //-------------------------------------------------------------------------- -let rec CheckTypeDeep ((visitTyp,visitTyconRefOpt,visitAppTyOpt,visitTraitSolutionOpt, visitTyparOpt) as f) g env typ = +let rec CheckTypeDeep (cenv: cenv) ((visitTyp,visitTyconRefOpt,visitAppTyOpt,visitTraitSolutionOpt, visitTyparOpt) as f) g env typ = // 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 @@ -225,22 +226,27 @@ let rec CheckTypeDeep ((visitTyp,visitTyconRefOpt,visitAppTyOpt,visitTraitSoluti match typ with | TType_forall (tps,body) -> let env = BindTypars g env tps - CheckTypeDeep f g env body - tps |> List.iter (fun tp -> tp.Constraints |> List.iter (CheckTypeConstraintDeep f g env)) + CheckTypeDeep cenv f g env 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 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 (_,typs) -> CheckTypesDeep f g env typs - | TType_fun (s,t) -> CheckTypeDeep f g env s; CheckTypeDeep f g env t + | TType_anon (anonInfo,typs) -> + if not (cenv.anonRecdTypes.ContainsKey anonInfo.Stamp) then + cenv.anonRecdTypes <- cenv.anonRecdTypes.Add(anonInfo.Stamp, anonInfo) + CheckTypesDeep cenv f g env typs + + | TType_ucase (_,typs) + | TType_anon (_,typs) + | TType_tuple (_,typs) -> CheckTypesDeep cenv f g env typs + | TType_fun (s,t) -> CheckTypeDeep cenv f g env s; CheckTypeDeep cenv f g env t | TType_var tp -> if not tp.IsSolved then match visitTyparOpt with @@ -248,16 +254,16 @@ let rec CheckTypeDeep ((visitTyp,visitTyconRefOpt,visitAppTyOpt,visitTraitSoluti | Some visitTypar -> visitTypar (env,tp) -and CheckTypesDeep f g env tys = List.iter (CheckTypeDeep f g env) tys +and CheckTypesDeep cenv f g env tys = List.iter (CheckTypeDeep cenv f g env) tys -and CheckTypeConstraintDeep f g env x = +and CheckTypeConstraintDeep cenv f g env x = match x with - | TyparConstraint.CoercesTo(ty,_) -> CheckTypeDeep f g env ty - | TyparConstraint.MayResolveMember(traitInfo,_) -> CheckTraitInfoDeep f g env traitInfo - | TyparConstraint.DefaultsTo(_,ty,_) -> CheckTypeDeep f g env ty - | TyparConstraint.SimpleChoice(tys,_) -> CheckTypesDeep f g env tys - | TyparConstraint.IsEnum(uty,_) -> CheckTypeDeep f g env uty - | TyparConstraint.IsDelegate(aty,bty,_) -> CheckTypeDeep f g env aty; CheckTypeDeep f g env bty + | TyparConstraint.CoercesTo(ty,_) -> CheckTypeDeep cenv f g env ty + | TyparConstraint.MayResolveMember(traitInfo,_) -> CheckTraitInfoDeep cenv f g env traitInfo + | TyparConstraint.DefaultsTo(_,ty,_) -> CheckTypeDeep cenv f g env ty + | TyparConstraint.SimpleChoice(tys,_) -> CheckTypesDeep cenv f g env tys + | TyparConstraint.IsEnum(uty,_) -> CheckTypeDeep cenv f g env uty + | TyparConstraint.IsDelegate(aty,bty,_) -> CheckTypeDeep cenv f g env aty; CheckTypeDeep cenv f g env bty | TyparConstraint.SupportsComparison _ | TyparConstraint.SupportsEquality _ | TyparConstraint.SupportsNull _ @@ -265,10 +271,10 @@ and CheckTypeConstraintDeep f g env x = | TyparConstraint.IsUnmanaged _ | TyparConstraint.IsReferenceType _ | TyparConstraint.RequiresDefaultConstructor _ -> () -and CheckTraitInfoDeep ((_,_,_,visitTraitSolutionOpt,_) as f) g env (TTrait(typs,_,_,argtys,rty,soln)) = - CheckTypesDeep f g env typs - CheckTypesDeep f g env argtys - Option.iter (CheckTypeDeep f g env) rty +and CheckTraitInfoDeep cenv ((_,_,_,visitTraitSolutionOpt,_) as f) g env (TTrait(typs,_,_,argtys,rty,soln)) = + CheckTypesDeep cenv f g env typs + CheckTypesDeep cenv f g env argtys + Option.iter (CheckTypeDeep cenv f g env) rty match visitTraitSolutionOpt, !soln with | Some visitTraitSolution, Some sln -> visitTraitSolution sln | _ -> () @@ -278,7 +284,7 @@ and CheckTraitInfoDeep ((_,_,_,visitTraitSolutionOpt,_) as f) g env (TTrait(typs //-------------------------------------------------------------------------- let CheckForByrefLikeType cenv env typ check = - CheckTypeDeep (ignore, Some (fun tcref -> if isByrefLikeTyconRef cenv.g tcref then check()), None, None, None) cenv.g env typ + CheckTypeDeep cenv (ignore, Some (fun tcref -> if isByrefLikeTyconRef cenv.g tcref then check()), None, None, None) cenv.g env typ //-------------------------------------------------------------------------- @@ -353,7 +359,7 @@ let CheckTypeForAccess (cenv:cenv) env objName valAcc m ty = if isLessAccessible tyconAcc valAcc then errorR(Error(FSComp.SR.chkTypeLessAccessibleThanType(tcref.DisplayName, (objName())), m)) - CheckTypeDeep (visitType, None, None, None, None) cenv.g env ty + CheckTypeDeep cenv (visitType, None, None, None, None) cenv.g env ty let WarnOnWrongTypeForAccess (cenv:cenv) env objName valAcc m ty = if cenv.reportErrors then @@ -371,7 +377,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 (visitType, None, None, None, None) cenv.g env ty + CheckTypeDeep cenv (visitType, None, None, None, None) cenv.g env ty //-------------------------------------------------------------------------- // check type instantiations @@ -402,7 +408,7 @@ let CheckType permitByrefs (cenv:cenv) env m ty = | Some tcref -> if isByrefLikeTyconRef cenv.g tcref then errorR(Error(FSComp.SR.chkNoByrefsOfByrefs(NicePrint.minimalStringOfType cenv.denv ty), m)) - CheckTypesDeep (visitType, 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 @@ -413,7 +419,7 @@ let CheckType permitByrefs (cenv:cenv) env m ty = cenv.potentialUnboundUsesOfVals <- cenv.potentialUnboundUsesOfVals.Add(vref.Stamp,m) | _ -> () - CheckTypeDeep (ignore, Some visitTyconRef, Some visitAppTy, Some visitTraitSolution, Some visitTypar) cenv.g env ty + CheckTypeDeep cenv (ignore, Some visitTyconRef, Some visitAppTy, Some visitTraitSolution, Some visitTypar) cenv.g env ty /// Check types occurring in TAST (like CheckType) and additionally reject any byrefs. @@ -801,6 +807,7 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = // Address-of operator generates byref, and context permits this. CheckExprsNoByrefs cenv env args + | TOp.AnonRecdGet _,_,[arg1] | TOp.TupleFieldGet _,_,[arg1] -> CheckTypeInstNoByrefs cenv env m tyargs CheckExprsPermitByrefs cenv env [arg1] (* Compiled pattern matches on immutable value structs come through here. *) @@ -1703,6 +1710,7 @@ let CheckTopImpl (g,amap,reportErrors,infoReader,internalsVisibleToPaths,viewCcu reportErrors=reportErrors boundVals= new Dictionary<_,_>(100, HashIdentity.Structural) potentialUnboundUsesOfVals=Map.empty + anonRecdTypes = StampMap.Empty usesQuotations=false infoReader=infoReader internalsVisibleToPaths=internalsVisibleToPaths @@ -1737,4 +1745,4 @@ let CheckTopImpl (g,amap,reportErrors,infoReader,internalsVisibleToPaths,viewCcu CheckAttribs cenv env extraAttribs if cenv.usesQuotations && QuotationTranslator.QuotationGenerationScope.ComputeQuotationFormat(cenv.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 d918df258ac..bbb24c44abf 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) -> 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) -> bool * StampMap diff --git a/src/fsharp/QuotationTranslator.fs b/src/fsharp/QuotationTranslator.fs index 7216a700158..da1b9813adf 100644 --- a/src/fsharp/QuotationTranslator.fs +++ b/src/fsharp/QuotationTranslator.fs @@ -425,6 +425,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 @@ -808,6 +822,10 @@ and ConvType cenv env m typ = | 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 a5f59868f54..c69527bdbb6 100644 --- a/src/fsharp/TastOps.fs +++ b/src/fsharp/TastOps.fs @@ -177,6 +177,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 @@ -258,6 +264,8 @@ and remapTraitAux tyenv (TTrait(typs, nm, mf, argtys, rty, slnCell)) = FSMethSln(remapTypeAux tyenv typ, 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 -> @@ -682,6 +690,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 @@ -732,6 +743,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) @@ -754,6 +767,7 @@ let argsOfAppTy g ty = ty |> stripTyEqns g |> (function TType_app(_, tinst) -> let tryDestTyparTy g ty = ty |> stripTyEqns g |> (function TType_var v -> Some v | _ -> None) let tryDestFunTy g ty = ty |> stripTyEqns g |> (function TType_fun (tyv, tau) -> Some(tyv, tau) | _ -> None) let tryDestAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> Some tcref | _ -> None) +let tryDestAnonRecdTy g ty = ty |> stripTyEqns g |> (function TType_anon (anonInfo, tys) -> Some (anonInfo, tys) | _ -> None) let tryAnyParTy g ty = ty |> stripTyEqns g |> (function TType_var v -> Some v | TType_measure unt when isUnitParMeasure g unt -> Some(destUnitParMeasure g unt) | _ -> None) let (|AppTy|_|) g ty = ty |> stripTyEqns g |> (function TType_app(tcref, tinst) -> Some (tcref, tinst) | _ -> None) let (|RefTupleTy|_|) g ty = ty |> stripTyEqns g |> (function TType_tuple(tupInfo, tys) when not (evalTupInfoIsStruct tupInfo) -> Some tys | _ -> None) @@ -907,6 +921,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 -> @@ -915,6 +932,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) @@ -961,7 +984,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 @@ -1220,6 +1243,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(e, fref, tinst, m) = Expr.Op (TOp.ValFieldGetAddr(fref), tinst, [e], m) @@ -1660,7 +1684,7 @@ let isStructTy g ty = | Some tcref -> let tycon = tcref.Deref tycon.IsStructRecordOrUnionTycon || tycon.IsStructOrEnumTycon - | _ -> false + | _ -> isStructAnonRecdTy g ty let isRefTy g ty = not (isStructOrEnumTyconTy g ty) && @@ -1938,6 +1962,8 @@ and accFreeInTraitSln opts sln acc = accFreeInType opts typ (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 @@ -1964,6 +1990,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 @@ -2047,6 +2074,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 @@ -2439,8 +2469,9 @@ module SimplifyTypes = let z = f z typ match typ 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 (_, typs) + | TType_ucase (_, typs) + | TType_anon (_, typs) | TType_tuple (_, typs) -> List.fold (foldTypeButNotConstraints f) z typs | TType_fun (s, t) -> foldTypeButNotConstraints f (foldTypeButNotConstraints f z s) t | TType_var _ -> z @@ -3032,6 +3063,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 )) @@ -3093,6 +3125,7 @@ module DebugPrint = begin let prefix = tcref.IsPrefixDisplay let tcL = layoutTyconRef tcref auxTyparsL env tcL prefix tinst + | TType_anon (anonInfo, typs) -> braceBarL (sepListL (wordL (tagText ";")) (List.map2 (fun nm ty -> wordL (tagField nm) --- auxTypeAtomL env ty) (Array.toList anonInfo.SortedNames) typs)) | TType_tuple (_tupInfo, typs) -> sepListL (wordL (tagText "*")) (List.map (auxTypeAtomL env) typs) |> wrap | TType_fun (f, x) -> ((auxTypeAtomL env f ^^ wordL (tagText "->")) --- auxTypeL env x) |> wrap | TType_var typar -> auxTyparWrapL env isAtomic typar @@ -3598,8 +3631,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 @@ -3690,7 +3723,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 //-------------------------------------------------------------------------- // Data structures representing what gets hidden and what gets remapped (i.e. renamed or alpha-converted) @@ -4292,7 +4325,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 @@ -5261,6 +5296,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) @@ -5299,8 +5337,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") @@ -5694,6 +5734,10 @@ let mkTupleFieldGet g (tupInfo, e, tinst, i, m) = let wrap, e' = 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' = 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' = mkExprAddrOfExpr g fref.Tycon.IsStructOrEnumTycon false NeverMutates e None m @@ -6006,6 +6050,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 //-------------------------------------------------------------------------- @@ -6061,11 +6108,6 @@ let permuteExprList (sigma:int[]) (exprs: Expr list) (typ: TType list) (names:st 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 () @@ -7128,6 +7170,10 @@ 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, typs) -> if evalTupInfoIsStruct tupInfo then sprintf "System.ValueTuple%s"(tyargsEnc g (gtpsType, gtpsMethod) typs) @@ -7297,6 +7343,8 @@ 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 + tryDestAnonRecdTy g ty |> Option.get |> snd |> List.forall (TypeHasDefaultValue g m) else // All struct types defined in other .NET languages have a DefaultValue regardless of their // instantiation @@ -7309,6 +7357,9 @@ let (|SpecialComparableHeadType|_|) g ty = if isAnyTupleTy g ty then let _tupInfo, elemTys = destAnyTupleTy g ty Some elemTys + elif isAnonRecdTy g ty then + let _anonInfo, elemTys = tryDestAnonRecdTy g ty |> Option.get + Some elemTys else match ty with | AppTy g (tcref, tinst) -> diff --git a/src/fsharp/TastOps.fsi b/src/fsharp/TastOps.fsi index 9f23629b25e..2c839c645a1 100755 --- a/src/fsharp/TastOps.fsi +++ b/src/fsharp/TastOps.fsi @@ -181,6 +181,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 : Expr * RecdFieldRef * TypeInst * range -> Expr val mkStaticRecdFieldGet : RecdFieldRef * TypeInst * range -> Expr @@ -249,6 +251,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 helpEnsureTypeHasMetadata : TcGlobals -> TType -> TType @@ -430,6 +433,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 @@ -452,6 +457,7 @@ val tcrefOfAppTy : TcGlobals -> TType -> TyconRef val tryDestAppTy : TcGlobals -> TType -> TyconRef option val tryDestTyparTy : TcGlobals -> TType -> Typar option val tryDestFunTy : TcGlobals -> TType -> (TType * TType) option +val tryDestAnonRecdTy : TcGlobals -> TType -> (AnonRecdTypeInfo * TType list) option val argsOfAppTy : TcGlobals -> TType -> TypeInst val mkInstForAppTy : TcGlobals -> TType -> TyparInst @@ -577,6 +583,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 @@ -1408,7 +1415,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 @@ -1417,6 +1423,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 1726db26070..cb5476a424b 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 @@ -595,7 +609,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 @@ -688,21 +702,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 simpletypTab x = lookup_uniq st simpletypTab 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.isimpletyps (u_int st) let encode_simpletyp ccuTab stringTab nlerefTab simpletypTab thisCcu a = encode_uniq simpletypTab (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.osimpletyps st.oscope x) st -type sizes = int * int * int let pickleObjWithDanglingCcus inMem file g scope p x = - let ccuNameTab,(sizes: sizes),stringTab,pubpathTab,nlerefTab,simpletypTab,phase1bytes = + let ccuNameTab,(ntycons, ntypars, nvals, nanoninfos),stringTab,pubpathTab,nlerefTab,simpletypTab,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" @@ -712,19 +728,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.osimpletyps, st1.os.Close() - let phase2data = (ccuNameTab.AsArray,sizes,stringTab.AsArray,pubpathTab.AsArray,nlerefTab.AsArray,simpletypTab.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)" @@ -732,15 +750,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,simpletypTab.AsArray,phase1bytes) + st2 st2.os.Close() phase2bytes @@ -756,39 +780,43 @@ 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)" [| |] isimpletyps = new_itbl "isimpletyps (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,simpletypTab,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,simpletypTab,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 simpletypTab = new_itbl "isimpletyps" (Array.map (decode_simpletyp st2 ccuTab stringTab nlerefTab) simpletypTab) - let ((ntycons,ntypars,nvals) : sizes) = sizes 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 @@ -796,9 +824,8 @@ let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef option) u (p 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 @@ -808,7 +835,7 @@ let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef option) u (p //========================================================================= -// PART II *) +// PART II //========================================================================= //--------------------------------------------------------------------------- @@ -819,7 +846,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 @@ -943,8 +972,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) @@ -1240,7 +1272,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 @@ -1252,7 +1284,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" @@ -1357,6 +1389,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) -> @@ -1369,10 +1407,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_typs p_rfref p_bool (a,b,c) st + | FSAnonRecdFieldSln(a, b, c) -> + p_byte 5 st; p_tup3 p_anonInfo p_typs p_int (a,b,c) st + let p_trait (TTrait(a,b,c,d,e,f)) st = p_tup6 p_typs p_string p_MemberFlags p_typs (p_option p_typ) (p_option p_trait_sln) (a,b,c,d,e,!f) st +let u_anonInfo_data st = + let (ccu, info, nms) = u_tup3 u_ccuref u_bool (u_array u_ident) st + AnonRecdTypeInfo.Create (ccu, TupInfo.Const 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 @@ -1390,6 +1438,9 @@ let u_trait_sln st = | 4 -> let (a,b,c) = u_tup3 u_typs u_rfref u_bool st FSRecdFieldSln(a,b,c) + | 5 -> + let (a,b,c) = u_tup3 u_anonInfo u_typs u_int st + FSAnonRecdFieldSln(a, b, c) | _ -> ufailwith st "u_trait_sln" let u_trait st = @@ -1400,7 +1451,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 @@ -1510,7 +1563,6 @@ let p_typar_spec_data (x:Typar) st = p_int64 p_typar_constraints p_xmldoc - (x.typar_id,x.typar_attribs,int64 x.typar_flags.PickledBits,x.typar_constraints,x.typar_xmldoc) st let p_typar_spec (x:Typar) st = @@ -1551,7 +1603,12 @@ let _ = fill_p_typ (fun ty st -> | TType_var r -> p_byte 4 st; p_tpref r st | TType_forall (tps,r) -> p_byte 5 st; p_tup2 p_typar_specs p_typ (tps,r) st | TType_measure unt -> p_byte 6 st; p_measure_expr unt st - | TType_ucase (uc,tinst) -> p_byte 7 st; p_tup2 p_ucref p_typs (uc,tinst) st) + | TType_ucase (uc,tinst) -> p_byte 7 st; p_tup2 p_ucref p_typs (uc,tinst) st + // p_byte 8 taken by TType_tuple above + | TType_anon (anonInfo, l) -> + p_byte 9 st + p_anonInfo anonInfo st + p_typs l st) let _ = fill_u_typ (fun st -> let tag = u_byte st @@ -1565,6 +1622,7 @@ let _ = fill_u_typ (fun st -> | 6 -> let unt = u_measure_expr st in TType_measure unt | 7 -> let uc = u_ucref st in let tinst = u_typs st in TType_ucase (uc,tinst) | 8 -> let l = u_typs st in TType_tuple (tupInfoStruct, l) + | 9 -> let anonInfo = u_anonInfo st in let l = u_typs st in TType_anon (anonInfo, l) | _ -> ufailwith st "u_typ") @@ -1683,7 +1741,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 @@ -1755,7 +1813,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 @@ -1836,7 +1894,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 @@ -1921,7 +1979,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 @@ -2033,8 +2091,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 @@ -2152,7 +2210,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) @@ -2308,6 +2366,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 = @@ -2374,6 +2436,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 = @@ -2527,11 +2594,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 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 6aa5ffa64a3..77fbb1daaf1 100755 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -760,18 +760,46 @@ 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 TupInfo.Const isExplicitStruct else tupInfo) + let ptys = + if List.length ps = List.length ptys then ptys + else NewInferenceTypes ps + tupInfo, ptys + else + TupInfo.Const isExplicitStruct, NewInferenceTypes ps + 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 + | Some (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 TupInfo.Const isExplicitStruct 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 + | None -> + // Note: no known anonymous record type - use our assembly + let anonInfo = AnonRecdTypeInfo.Create(cenv.topCcu, TupInfo.Const 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 @@ -3214,7 +3242,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 @@ -3491,10 +3519,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 @@ -4576,21 +4604,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 = TupInfo.Const 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 = TupInfo.Const 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 @@ -5265,10 +5306,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 @@ -5335,13 +5376,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 nargtys > 1 -> args + | [SynPatErrorSkip(SynPat.Tuple (false, args, _)) | SynPatErrorSkip(SynPat.Paren(SynPatErrorSkip(SynPat.Tuple (false, args, _)), _))] when nargtys > 1 -> args // note: we allow both 'C _' and 'C (_)' regardless of number of argument of the pattern | [SynPatErrorSkip(SynPat.Wild _ as e) | SynPatErrorSkip(SynPat.Paren(SynPatErrorSkip(SynPat.Wild _ as e), _))] -> Array.toList (Array.create nargtys e) @@ -5405,17 +5446,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)) - 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)) + | 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(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 @@ -5779,19 +5813,31 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = let e', tpenv = TcExpr cenv ety env tpenv e mkLazyDelayed cenv.g m ety (mkUnitDelayLambda cenv.g m e'), 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 - mkRefTupled cenv.g m args' argtys, tpenv + 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, unsortedArgs, m) -> + let unsortedIds = unsortedArgs |> List.map fst |> List.toArray + let anonInfo, sortedArgTys = UnifyAnonRecdTypeAndInferCharacteristics env.eContextInfo cenv env.DisplayEnv m 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 m 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 m anonInfo sortedCheckedArgs sortedArgTys, tpenv | SynExpr.ArrayOrList (isArray, args, m) -> CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy, env.DisplayEnv, env.eAccessRights) @@ -6168,7 +6214,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 @@ -6177,13 +6223,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) @@ -6300,10 +6346,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 optOrigExpr objTy fldsList m = let tcref, tinst = destAppTy cenv.g objTy @@ -7109,7 +7151,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 @@ -7475,7 +7517,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 = @@ -7489,7 +7531,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 @@ -7506,7 +7548,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 @@ -8490,8 +8532,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 nargtys > 1 -> Some args + | SynExprParen(SynExpr.Tuple(false, args, _, _), _, _, _) + | SynExpr.Tuple(false, args, _, _) when nargtys > 1 -> Some args | SynExprParen(arg, _, _, _) | arg when nargtys = 1 -> Some [arg] | _ -> None @@ -8782,14 +8824,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 _ @@ -9132,6 +9174,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 @@ -15450,6 +15504,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) -> @@ -17140,16 +17195,16 @@ 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) with e -> errorRecovery e m - false) + false, StampMap.Empty) - let implFile = TImplFile(qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript) + let implFile = TImplFile(qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript, anonRecdTypes) return (topAttrs, implFile, envAtEnd, cenv.createsGeneratedProvidedTypes) } diff --git a/src/fsharp/ast.fs b/src/fsharp/ast.fs index 1963b00ed34..3bc6214ec7c 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.take 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.take 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: {| new id1=e1; ...; idN=eN |} + | AnonRecd of isStruct: bool * recordFields:(Ident * SynExpr) list * range:range /// F# syntax: [ e1; ...; en ], [| e1; ...; en |] | ArrayOrList of isList:bool * exprs:SynExpr list * range:range @@ -728,7 +745,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) @@ -791,8 +808,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) @@ -845,6 +862,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 @@ -853,8 +871,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) @@ -981,8 +999,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 @@ -1013,7 +1030,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) @@ -1702,8 +1718,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') -> @@ -1823,14 +1839,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) @@ -2337,10 +2353,12 @@ let rec synExprContainsError inpExpr = walkExpr e1 || walkExpr e2 | SynExpr.ArrayOrList (_,es,_) - | SynExpr.Tuple (es,_,_) - | SynExpr.StructTuple (es,_,_) -> + | SynExpr.Tuple (_,es,_,_) -> walkExprs es + | SynExpr.AnonRecd (_,flds,_) -> + walkExprs (List.map snd flds) + | SynExpr.Record (_,_,fs,_) -> let flds = fs |> List.choose (fun (_, v, _) -> v) walkExprs (flds) diff --git a/src/fsharp/fsc.fs b/src/fsharp/fsc.fs index 699b6c52ec8..b7ab66e6461 100644 --- a/src/fsharp/fsc.fs +++ b/src/fsharp/fsc.fs @@ -300,7 +300,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) @@ -1800,7 +1800,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) @@ -1960,13 +1960,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 -> TypeChecker.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 b0d55326c4a..f320761eec6 100644 --- a/src/fsharp/fsi/fsi.fs +++ b/src/fsharp/fsi/fsi.fs @@ -1115,7 +1115,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 f117f36ccad..8d2fe33be73 100755 --- a/src/fsharp/infos.fs +++ b/src/fsharp/infos.fs @@ -88,6 +88,8 @@ let GetSuperTypeOfType g amap m typ = Some(g.system_Enum_typ) else Some (g.system_Value_typ) + elif isAnonRecdTy g typ then + Some g.obj_ty elif isRecdTy g typ || isUnionTy g typ 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 cffda3b3ccb..1b13aab4e3e 100644 --- a/src/fsharp/lex.fsl +++ b/src/fsharp/lex.fsl @@ -560,11 +560,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 c36b1886418..bd6f1b12a33 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 } @@ -3329,7 +3344,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 } @@ -3346,7 +3361,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 } @@ -3382,7 +3397,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("-")) @@ -3538,9 +3553,9 @@ minusExpr: { SynExpr.AddressOf(true,$2,rhs parseState 1,unionRanges (rhs parseState 1) $2.Range) } | AMP_AMP minusExpr { SynExpr.AddressOf(false,$2,rhs parseState 1, unionRanges (rhs parseState 1) $2.Range) } - | NEW appTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType + | 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 { arbExpr("minusExpr2",(rhs parseState 1)) } @@ -3620,10 +3635,10 @@ atomicExpr: // silent recovery exprFromParseError (SynExpr.ArrayOrList(false,[ ], rhs parseState 1)),false } | STRUCT LPAREN tupleExpr rparen - { let exprs,commas = $3 in SynExpr.StructTuple(List.rev exprs, List.rev commas, (commas.Head, exprs) ||> unionRangeWithListBy (fun e -> e.Range) ), false } + { 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 } @@ -3699,6 +3714,8 @@ atomicExprAfterType: { $1 } | braceExpr { $1 } + | braceBarExpr + { $1 } | NULL { SynExpr.Null(lhs parseState) } | FALSE @@ -3925,6 +3942,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) @@ -3960,7 +3981,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 @@ -4001,7 +4022,6 @@ recdExpr: | 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) } @@ -4030,6 +4050,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 */ @@ -4082,19 +4103,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 } @@ -4138,9 +4159,45 @@ 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 oneOrMoreRecdExprBindings bar_rbrace + { let flds = $2 + let m = rhs2 parseState 1 3 + (fun isStruct -> SynExpr.AnonRecd(isStruct,flds,m)) } + + | LBRACE_BAR oneOrMoreRecdExprBindings recover + { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBraceBar()) + let flds = $2 + let m = rhs2 parseState 1 2 + (fun isStruct -> SynExpr.AnonRecd(isStruct,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,[],m)) } + + | LBRACE_BAR bar_rbrace + { let m = rhs2 parseState 1 2 + (fun isStruct -> SynExpr.AnonRecd(isStruct,[],m)) } + +oneOrMoreRecdExprBindings: + | recdBinding recdExprBindings + { (($1, None) :: List.rev $2) |> 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) } + anonLambdaExpr: | FUN atomicPatterns RARROW typedSeqExprBlock @@ -4224,7 +4281,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] } @@ -4274,15 +4331,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 } @@ -4298,13 +4355,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) } @@ -4378,57 +4428,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' */ @@ -4451,11 +4481,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()) @@ -4927,6 +4957,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 f4a7ac416c3..8702a6a7595 100644 --- a/src/fsharp/service/ServiceAssemblyContent.fs +++ b/src/fsharp/service/ServiceAssemblyContent.fs @@ -530,7 +530,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, _, _, _) -> @@ -578,7 +578,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 | _ -> () @@ -616,7 +616,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, _) @@ -1003,4 +1003,4 @@ module ParsedInput = match tryFindNearestPointAndModules currentLine ast insertionPoint with | Some (scope, _, point), modules -> Some (findBestPositionToInsertOpenDeclaration modules scope point entity) - | _ -> None \ No newline at end of file + | _ -> None diff --git a/src/fsharp/service/ServiceDeclarationLists.fs b/src/fsharp/service/ServiceDeclarationLists.fs index 5acc998cf46..69c6eef3b48 100644 --- a/src/fsharp/service/ServiceDeclarationLists.fs +++ b/src/fsharp/service/ServiceDeclarationLists.fs @@ -284,6 +284,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 @@ -404,6 +408,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 04b09ec157b..34c99cd8e04 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, _) -> @@ -760,7 +760,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 ce78b9101e6..393579bb5ee 100755 --- a/src/fsharp/service/ServiceLexing.fs +++ b/src/fsharp/service/ServiceLexing.fs @@ -237,16 +237,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 987d10c2de7..1acdac88a13 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 4a07d826880..3f1de0e7e84 100755 --- a/src/fsharp/service/ServiceParseTreeWalk.fs +++ b/src/fsharp/service/ServiceParseTreeWalk.fs @@ -191,9 +191,10 @@ 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, synExprList, _range) -> synExprList |> List.map snd |> List.map (fun x -> dive x x.Range traverseSynExpr) |> pick expr | SynExpr.Record(inheritOpt,copyOpt,fields, _range) -> [ let diveIntoSeparator offsideColumn scPosOpt copyOpt = @@ -455,8 +456,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, _, _) -> @@ -485,8 +485,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 ffe2461d959..0c55b379e67 100644 --- a/src/fsharp/service/ServiceStructure.fs +++ b/src/fsharp/service/ServiceStructure.fs @@ -371,8 +371,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,_,_,_) -> @@ -849,4 +848,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 1405443c42a..5af088ff525 100755 --- a/src/fsharp/service/ServiceUntypedParse.fs +++ b/src/fsharp/service/ServiceUntypedParse.fs @@ -218,15 +218,17 @@ 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, fs, _) -> + yield! walkExprs (fs |> List.map snd) | SynExpr.ObjExpr (_,_,bs,is,_,_) -> yield! walkBinds bs @@ -719,7 +721,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 @@ -752,7 +754,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 @@ -780,7 +782,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 _ -> @@ -1050,7 +1052,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 @@ -1111,7 +1113,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 -> @@ -1213,7 +1215,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 187c84bdd0a..3f171716851 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 d818cf956a1..87f93eecc93 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(_mty, mdef, _), hasExplicitEntryPoint, isScript)) = mimpl + let (TImplFile(qname, _pragmas, ModuleOrNamespaceExprWithSig(_mty, 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 a2997654b74..89cb44394b6 100644 --- a/src/fsharp/symbols/SymbolHelpers.fs +++ b/src/fsharp/symbols/SymbolHelpers.fs @@ -359,6 +359,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 @@ -425,6 +426,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 @@ -743,6 +745,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) @@ -775,6 +779,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 @@ -855,6 +860,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) @@ -1191,6 +1197,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 @@ -1310,6 +1327,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 22b406e12fb..c8c70562cd4 100644 --- a/src/fsharp/symbols/SymbolPatterns.fs +++ b/src/fsharp/symbols/SymbolPatterns.fs @@ -185,7 +185,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 74aa51c9e20..ad8c68c652a 100644 --- a/src/fsharp/symbols/Symbols.fs +++ b/src/fsharp/symbols/Symbols.fs @@ -710,26 +710,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: cenv, 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: cenv, 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)) @@ -747,15 +764,17 @@ and FSharpField(cenv: cenv, d: FSharpFieldData) = ) let isUnresolved() = - entityIsUnresolved d.DeclaringTyconRef || + d.TryDeclaringTyconRef |> Option.exists entityIsUnresolved || match d with + | AnonField _ -> false | RecdOrClass v -> v.TryRecdField.IsNone | Union (v, _) -> v.TryUnionCase.IsNone | ILField _ -> false let checkIsResolved() = - checkEntityIsResolved d.DeclaringTyconRef + d.TryDeclaringTyconRef |> Option.iter checkEntityIsResolved match d with + | AnonField _ -> () | RecdOrClass v -> if v.TryRecdField.IsNone then invalidOp (sprintf "The record field '%s' could not be found in the target type" v.FieldName) @@ -768,7 +787,7 @@ and FSharpField(cenv: cenv, 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() @@ -776,32 +795,47 @@ and FSharpField(cenv: cenv, 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() @@ -815,6 +849,7 @@ and FSharpField(cenv: cenv, d: FSharpFieldData) = SymbolHelpers.GetXmlDocSigOfUnionCaseInfo unionCase | ILField f -> SymbolHelpers.GetXmlDocSigOfILFieldInfo cenv.infoReader range0 f + | AnonField _ -> None match xmlsig with | Some (_, docsig) -> docsig | _ -> "" @@ -822,71 +857,81 @@ and FSharpField(cenv: cenv, 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 + override x.Equals(other: obj) = box x === other || match other with @@ -894,10 +939,12 @@ and FSharpField(cenv: cenv, 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 override x.GetHashCode() = hash x.Name + override x.ToString() = "field " + x.Name and [] FSharpRecordField = FSharpField @@ -1900,6 +1947,7 @@ and FSharpType(cenv, typ:TType) = member __.GenericArguments = protect <| fun () -> match stripTyparEqns typ 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 @@ -1931,6 +1979,19 @@ and FSharpType(cenv, typ:TType) = | TType_fun _ -> true | _ -> false + member __.IsAnonRecordType = + isResolved() && + protect <| fun () -> + match stripTyparEqns typ with + | TType_anon _ -> true + | _ -> false + + member __.AnonRecordTypeDetails = + protect <| fun () -> + match stripTyparEqns typ with + | TType_anon (anonInfo, _) -> FSharpAnonRecordTypeDetails(cenv, anonInfo) + | _ -> invalidOp "not an anonymous record type" + member __.IsGenericParameter = protect <| fun () -> match stripTyparEqns typ with @@ -1985,6 +2046,7 @@ and FSharpType(cenv, typ:TType) = | TType_tuple (_, l1) -> 10400 + List.sumBy hashType l1 | TType_fun (dty, rty) -> 10500 + hashType dty + hashType rty | TType_measure _ -> 10600 + | TType_anon (_,l1) -> 10800 + List.sumBy hashType l1 hashType typ member x.Format(denv: FSharpDisplayContext) = @@ -2221,6 +2283,8 @@ type FSharpSymbol with | 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) :> _ diff --git a/src/fsharp/symbols/Symbols.fsi b/src/fsharp/symbols/Symbols.fsi index 55c1a6fbb2b..faa0f851109 100644 --- a/src/fsharp/symbols/Symbols.fsi +++ b/src/fsharp/symbols/Symbols.fsi @@ -395,7 +395,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 = @@ -404,8 +417,14 @@ and [] public FSharpField = internal new : Impl.cenv * RecdFieldRef -> FSharpField internal new : Impl.cenv * 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 @@ -922,6 +941,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 58a348c1861..a5e3350ed55 100755 --- a/src/fsharp/tast.fs +++ b/src/fsharp/tast.fs @@ -2114,6 +2114,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(typ, extOpt, ilMethodRef, minst) /// /// Indicates a trait is solved by a .NET method. @@ -3536,6 +3539,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. @@ -3567,7 +3575,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) -> "union case type " + uc.CaseName + (match tinst with [] -> "" | tys -> "<" + String.concat "," (List.map string tys) + ">") | TType_var tp -> tp.DisplayName @@ -3580,6 +3593,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 -> "" @@ -3589,7 +3603,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 @@ -4133,6 +4190,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 @@ -4377,7 +4440,7 @@ and [] /// Represents a complete typechecked implementation file, including its typechecked signature if any. /// /// TImplFile(qualifiedNameOfFile,pragmas,implementationExpressionWithSignature,hasExplicitEntryPoint,isScript) -and TypedImplFile = TImplFile of QualifiedNameOfFile * ScopedPragma list * ModuleOrNamespaceExprWithSig * bool * bool +and TypedImplFile = TImplFile of QualifiedNameOfFile * ScopedPragma list * ModuleOrNamespaceExprWithSig * bool * bool * StampMap /// Represents a complete typechecked assembly, made up of multiple implementation files. /// @@ -4519,9 +4582,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 @@ -5144,3 +5207,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 ad7572ef053..13433bae31d 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -6982,6 +6982,36 @@ Tento výraz vrátí hodnotu typu {0}, ale implicitně se zahodí. Zvažte vytvoření vazby mezi výsledkem a názvem pomocí klíčového slova let, např. let výsledek = výraz. Pokud jste chtěli výraz použít jako hodnotu v sekvenci, použijte explicitní klíčové slovo yield!. + + 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 + + \ 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 1754e4d729a..09ee764bc5a 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -6982,6 +6982,36 @@ Dieser Ausdruck gibt einen Wert des Typs "{0}" zurück, wird aber implizit verworfen. Verwenden Sie ggf. "let", um das Ergebnis an einen Namen zu binden. Beispiel: "let Ergebnis = Ausdruck". Falls Sie den Ausdruck als Wert in der Sequenz einsetzen möchten, verwenden Sie explizit "yield!". + + 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 + + \ 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 a1dece2d6f9..bb3d873ab9e 100644 --- a/src/fsharp/xlf/FSComp.txt.en.xlf +++ b/src/fsharp/xlf/FSComp.txt.en.xlf @@ -6982,6 +6982,36 @@ This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + + 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 + + \ 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 0ea4958ff74..e02d0d40831 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -6982,6 +6982,36 @@ Esta expresión devuelve un valor de tipo “{0}”, pero se descarta de forma implícita. Considere el uso de “let” para enlazar el resultado a un nombre; por ejemplo, “let result = expression”. Si su intención es utilizar la expresión como un valor en la secuencia, utilice “yield” de forma explícita. + + 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 + + \ 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 c74eb738e59..2d00a2fbd6e 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -6982,6 +6982,36 @@ Cette expression retourne une valeur de type '{0}', mais est implicitement ignorée. Utilisez 'let' pour lier le résultat à un nom, par ex. 'let result = expression'. Si vous voulez utiliser l'expression comme valeur dans la séquence, utilisez un 'yield!' explicite. + + 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 + + \ 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 d063e9e49ce..a9a9c35e72d 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -6982,6 +6982,36 @@ Questa espressione restituisce un valore di tipo '{0}' ma viene rimossa in modo implicito. Provare a usare 'let' per eseguire il binding del risultato a un nome, ad esempio 'let risultato = espressione'. Se si intende usare l'espressione come valore nella sequenza, usare l'operando 'yield!' esplicito. + + 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 + + \ 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 f515115c15d..c9dc1d8c305 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -6982,6 +6982,36 @@ この式は型 '{0}' の値を返しますが、暗黙的に破棄されます。'let' を使用して結果を名前にバインドすることを検討してください。例: 'let result = expression'。式をシーケンス内で値として使用する場合は、明示的に 'yield!' を使用してください。 + + 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 + + \ 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 ca9ffe834f4..64d4bc3e904 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -6982,6 +6982,36 @@ 이 식은 '{0}' 형식의 값을 반환하지만 암시적으로 삭제됩니다. 'let'을 사용하여 결과를 이름에 바인딩하세요(예: 'let result = expression'). 식을 시퀀스의 값으로 사용하려면 명시적 'yield!'를 사용하세요. + + 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 + + \ 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 4cad63a4afa..b956238d314 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -6982,6 +6982,36 @@ To wyrażenie zwraca wartość typu „{0}”, ale jest niejawnie odrzucane. Rozważ użycie instrukcji „let” do powiązania wyniku z nazwą, np. „let wynik = wyrażenie”. Jeśli chcesz użyć tego wyrażenia jako wartości w sekwencji, użyj jawnej instrukcji „yield!”. + + 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 + + \ 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 98205cd7a14..9fdb7d83f8f 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -6982,6 +6982,36 @@ Essa expressão retorna um valor de tipo '{0}', mas é descartada de forma implícita. Considere o uso de 'let' para associar o resultado a um nome, por exemplo, 'let result = expression'. Se você pretende usar a expressão como um valor na sequência, use um “yield!” explícito. + + 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 + + \ 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 4e32cbed5d1..9e56782f248 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -6982,6 +6982,36 @@ Это выражение возвращает значение типа "{0}", но оно неявно отбрасывается. Чтобы привязать результат к какому-то имени, используйте "let", например: "let <результат> = <выражение>". Если вы собирались использовать выражение как значение в последовательности, используйте в явном виде "yield!". + + 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 + + \ 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 93cfa3de92d..67e8c1965c0 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -6982,6 +6982,36 @@ Bu ifade '{0}' türünde bir değer döndürür ancak örtük olarak atılır. Sonucu bir ada bağlamak için 'let' kullanabilirsiniz, örn. 'let sonuc = ifade'. İfadeyi dizide bir değer olarak kullanmayı amaçladıysanız açık bir 'yield!' kullanın. + + 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 + + \ 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 f9af6c23c8b..ca95767c04a 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -6982,6 +6982,36 @@ 此表达式返回类型为“{0}”的值,但被隐式放弃。请考虑使用 "let" 将结果绑定到名称,例如 "let result = expression"。如果要使用该表达式作为序列中的值,则使用显式 "yield!"。 + + 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 + + \ 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 63e673fe136..c9bdbbe4f52 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -6982,6 +6982,36 @@ 此運算式會傳回類型為 '{0}' 的值,但會被間接捨棄。請考慮使用 'let' 將結果繫結到名稱。例如 'let result = expression'。若您想要在序列中,以值的形式使用運算式,請直接使用 'yield!'。 + + 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 + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.cs.xlf b/src/fsharp/xlf/FSStrings.cs.xlf index 90e272e863b..1be5ea9aaab 100644 --- a/src/fsharp/xlf/FSStrings.cs.xlf +++ b/src/fsharp/xlf/FSStrings.cs.xlf @@ -1607,6 +1607,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 1c98a1cdb01..8775393d9d6 100644 --- a/src/fsharp/xlf/FSStrings.de.xlf +++ b/src/fsharp/xlf/FSStrings.de.xlf @@ -1607,6 +1607,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 03bc0887740..7bb2d00d541 100644 --- a/src/fsharp/xlf/FSStrings.en.xlf +++ b/src/fsharp/xlf/FSStrings.en.xlf @@ -1607,6 +1607,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 986deafbc5c..8fad5818503 100644 --- a/src/fsharp/xlf/FSStrings.es.xlf +++ b/src/fsharp/xlf/FSStrings.es.xlf @@ -1607,6 +1607,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 4d4cccb39fe..d2cf29066f8 100644 --- a/src/fsharp/xlf/FSStrings.fr.xlf +++ b/src/fsharp/xlf/FSStrings.fr.xlf @@ -1607,6 +1607,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 e26f38b3270..d366d972645 100644 --- a/src/fsharp/xlf/FSStrings.it.xlf +++ b/src/fsharp/xlf/FSStrings.it.xlf @@ -1607,6 +1607,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 7256d1b1a49..2fcdbbb2d45 100644 --- a/src/fsharp/xlf/FSStrings.ja.xlf +++ b/src/fsharp/xlf/FSStrings.ja.xlf @@ -1607,6 +1607,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 2ba29ac4307..53437c9c1a3 100644 --- a/src/fsharp/xlf/FSStrings.ko.xlf +++ b/src/fsharp/xlf/FSStrings.ko.xlf @@ -1607,6 +1607,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 d544bdcc32e..f56de53fa3f 100644 --- a/src/fsharp/xlf/FSStrings.pl.xlf +++ b/src/fsharp/xlf/FSStrings.pl.xlf @@ -1607,6 +1607,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 b1dccf3db10..6d812fb2bc4 100644 --- a/src/fsharp/xlf/FSStrings.pt-BR.xlf +++ b/src/fsharp/xlf/FSStrings.pt-BR.xlf @@ -1607,6 +1607,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 bd45c8d8eee..31bc70d007b 100644 --- a/src/fsharp/xlf/FSStrings.ru.xlf +++ b/src/fsharp/xlf/FSStrings.ru.xlf @@ -1607,6 +1607,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 6ce85a3cc4c..87dc0f84f1b 100644 --- a/src/fsharp/xlf/FSStrings.tr.xlf +++ b/src/fsharp/xlf/FSStrings.tr.xlf @@ -1607,6 +1607,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 235affe46bb..3afc6bee94d 100644 --- a/src/fsharp/xlf/FSStrings.zh-Hans.xlf +++ b/src/fsharp/xlf/FSStrings.zh-Hans.xlf @@ -1607,6 +1607,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 90c5a5a8066..ae07f546c5f 100644 --- a/src/fsharp/xlf/FSStrings.zh-Hant.xlf +++ b/src/fsharp/xlf/FSStrings.zh-Hant.xlf @@ -1607,6 +1607,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 d3f6bb48eda..18b571b46d3 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..23571cab8b5 --- /dev/null +++ b/tests/fsharp/core/anon/lib.fs @@ -0,0 +1,209 @@ + +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) + + // TODO: field reordering.... + //let test3b() = {| a = 1+1; b = 2 |} = {| b = 1; a = 2 |} + + // 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) + + // Copy-and-update may not be used, since C# doesn't allow this on anonymous objects + + // Types _can_ be used outside their assembly, but can _not_ be named in the syntax of types, nor created + + +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..d45bd257165 --- /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 tesvts() = + 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 3c2d9c2d792..75b31fd95cc 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -30,6 +30,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 @@ -228,6 +230,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 -g" cfg.fsc_flags ["lib.fs"] + + copyFile (cfg.FSCBinPath ++ "System.ValueTuple.dll") ("." ++ "System.ValueTuple.dll") + peverify cfg "lib.dll" + + fsc cfg "%s -r:lib.dll -g" 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" @@ -2162,6 +2194,12 @@ module TypecheckTests = [] let ``type check neg101`` () = singleNegTest (testConfig "typecheck/sigs") "neg101" + [] + let ``type check neg103`` () = singleNegTest (testConfig "typecheck/sigs") "neg103" + + [] + let ``type check neg104`` () = singleNegTest (testConfig "typecheck/sigs") "neg104" + [] let ``type check neg_byref_1`` () = singleNegTest (testConfig "typecheck/sigs") "neg_byref_1" diff --git a/tests/fsharp/typecheck/sigs/neg103.bsl b/tests/fsharp/typecheck/sigs/neg103.bsl new file mode 100644 index 00000000000..4c55fca4170 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg103.bsl @@ -0,0 +1,24 @@ + +neg103.fs(5,50,5,61): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["a"; "b"]' and '["a"]' + +neg103.fs(7,41,7,52): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["b"]' and '["a"]' + +neg103.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 + +neg103.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type + '{|b : int|}' +is not compatible with type + '{|a : int|}' + + +neg103.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 + +neg103.fs(13,27,13,62): typecheck error FS0193: Type constraint mismatch. The type + '{|a : int ; b : int|}' +is not compatible with type + '{|a : int|}' + + +neg103.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 + +neg103.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/neg103.fs b/tests/fsharp/typecheck/sigs/neg103.fs new file mode 100644 index 00000000000..660788f83e2 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg103.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/neg103.vsbsl b/tests/fsharp/typecheck/sigs/neg103.vsbsl new file mode 100644 index 00000000000..4c55fca4170 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg103.vsbsl @@ -0,0 +1,24 @@ + +neg103.fs(5,50,5,61): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["a"; "b"]' and '["a"]' + +neg103.fs(7,41,7,52): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["b"]' and '["a"]' + +neg103.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 + +neg103.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type + '{|b : int|}' +is not compatible with type + '{|a : int|}' + + +neg103.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 + +neg103.fs(13,27,13,62): typecheck error FS0193: Type constraint mismatch. The type + '{|a : int ; b : int|}' +is not compatible with type + '{|a : int|}' + + +neg103.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 + +neg103.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/neg104.bsl b/tests/fsharp/typecheck/sigs/neg104.bsl new file mode 100644 index 00000000000..f0ed9fbd026 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg104.bsl @@ -0,0 +1,20 @@ + +neg104.fs(6,38,6,39): parse error FS0010: Unexpected symbol '}' in binding. Expected '|}' or other token. + +neg104.fs(6,29,6,31): parse error FS0605: Unmatched '{|' + +neg104.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. + +neg104.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. + +neg104.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. + +neg104.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. + +neg104.fs(10,25,10,26): parse error FS0010: Unexpected symbol '}' in type definition. Expected '|}' or other token. + +neg104.fs(10,14,10,16): parse error FS0605: Unmatched '{|' + +neg104.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. + +neg104.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/neg104.fs b/tests/fsharp/typecheck/sigs/neg104.fs new file mode 100644 index 00000000000..adbdc0fa986 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg104.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/neg104.vsbsl b/tests/fsharp/typecheck/sigs/neg104.vsbsl new file mode 100644 index 00000000000..c12cacbf608 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg104.vsbsl @@ -0,0 +1,24 @@ + +neg104.fs(6,38,6,39): parse error FS0010: Unexpected symbol '}' in binding. Expected '|}' or other token. + +neg104.fs(6,29,6,31): parse error FS0605: Unmatched '{|' + +neg104.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. + +neg104.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. + +neg104.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. + +neg104.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. + +neg104.fs(10,25,10,26): parse error FS0010: Unexpected symbol '}' in type definition. Expected '|}' or other token. + +neg104.fs(10,14,10,16): parse error FS0605: Unmatched '{|' + +neg104.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. + +neg104.fs(14,1,14,1): parse error FS0010: Incomplete structured construct at or before this point in implementation file + +neg104.fs(10,10,10,11): typecheck error FS0964: Type abbreviations cannot have augmentations + +neg104.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 ee00b0994f9..cf61efda488 100644 --- a/tests/scripts/compiler-perf-results.txt +++ b/tests/scripts/compiler-perf-results.txt @@ -131,3 +131,9 @@ 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 ba63403cb5898596c5e875a14ce22b33ef618c01 221.58 11.19 31.91 48.23 66.05 52.99 https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-to-us 87dafbc17b494c438b6db9e59e064736bd8a44e2 458e6c29d7e059a5a8a7b4cd7858c7d633fb5906 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 235.48 10.83 33.47 47.17 65.56 52.50 +https://github.com/dsyme/visualfsharp.git range1 e49ac8a2f21223e60d0d9597e52ea9e5f8705963 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 259.69 11.98 32.23 47.16 56.83 58.14 +https://github.com/Microsoft/visualfsharp master ac9f2af4329d2ae1c4213bb1d22dc4450b319207 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 250.78 11.70 30.18 46.84 57.18 58.49 +https://github.com/dsyme/visualfsharp.git range1 e49ac8a2f21223e60d0d9597e52ea9e5f8705963 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 250.75 11.73 30.77 46.66 57.97 59.44 +https://github.com/Microsoft/visualfsharp master ac9f2af4329d2ae1c4213bb1d22dc4450b319207 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 251.89 11.89 30.30 46.67 58.00 59.09 +https://github.com/dsyme/visualfsharp.git range1 e49ac8a2f21223e60d0d9597e52ea9e5f8705963 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 252.83 11.66 31.05 47.17 58.80 58.59 +https://github.com/Microsoft/visualfsharp master ac9f2af4329d2ae1c4213bb1d22dc4450b319207 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 250.48 11.44 30.93 46.09 57.41 58.86 diff --git a/tests/service/Common.fs b/tests/service/Common.fs index f174908114a..9765be12118 100644 --- a/tests/service/Common.fs +++ b/tests/service/Common.fs @@ -230,6 +230,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 34822b99fe1..5852a0a4436 100644 --- a/tests/service/ProjectAnalysisTests.fs +++ b/tests/service/ProjectAnalysisTests.fs @@ -4971,6 +4971,88 @@ 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") + let base2 = Path.GetTempFileName() + 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__AnonymousType3999162117`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__AnonymousType3999162117`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__AnonymousType3999162117`1']X)"], (9, 16)); + ("int", ((9, 20), (9, 23)), ["abbrev"], (0, 0)); + ("X", ((9, 16), (9, 17)), ["field"; "anon(0, [//<>f__AnonymousType3999162117`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__AnonymousType3999162117`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__AnonymousType3999162117`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__AnonymousType3999162117`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__AnonymousType3571351395`2']X,Y)"], (18, 25)); + ("Y", ((18, 34), (18, 35)), ["field"; "anon(1, [//<>f__AnonymousType3571351395`2']X,Y)"], (18, 34)); + ("X", ((18, 19), (18, 20)), ["field"; "anon(0, [//<>f__AnonymousType3999162117`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__AnonymousType3999162117`1']X)"], (18, 19)); + ("X", ((18, 54), (18, 59)), ["field"; "anon(0, [//<>f__AnonymousType3571351395`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 From 4335cff62c9ecfa1b50a2817234072d036026fb4 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 13 Mar 2018 19:07:43 +0000 Subject: [PATCH 02/24] stable tests --- tests/service/ProjectAnalysisTests.fs | 39 ++++++++++++++++++--------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/tests/service/ProjectAnalysisTests.fs b/tests/service/ProjectAnalysisTests.fs index 5852a0a4436..6463fbd5490 100644 --- a/tests/service/ProjectAnalysisTests.fs +++ b/tests/service/ProjectAnalysisTests.fs @@ -4977,7 +4977,8 @@ module internal Project41 = open System.IO let fileName1 = Path.ChangeExtension(Path.GetTempFileName(), ".fs") - let base2 = Path.GetTempFileName() + // 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 = """ @@ -5019,37 +5020,49 @@ let ``Test project41 all symbols`` () = | _ -> (0,0) yield (s.Symbol.DisplayName, tups s.RangeAlternate, attribsOfSymbol s.Symbol, pos) ] allSymbolUsesInfo |> shouldEqual - [("X", ((4, 19), (4, 20)), ["field"; "anon(0, [//<>f__AnonymousType3999162117`1']X)"], (4, 19)); + [("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__AnonymousType3999162117`1']X)"], (7, 19)); + ("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__AnonymousType3999162117`1']X)"], (9, 16)); + ("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__AnonymousType3999162117`1']X)"], (9, 16)); + ("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__AnonymousType3999162117`1']X)"], (12, 19)); + ("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__AnonymousType3999162117`1']X)"], (12, 19)); + ("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__AnonymousType3999162117`1']X)"], (9, 16)); + ("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__AnonymousType3571351395`2']X,Y)"], (18, 25)); - ("Y", ((18, 34), (18, 35)), ["field"; "anon(1, [//<>f__AnonymousType3571351395`2']X,Y)"], (18, 34)); - ("X", ((18, 19), (18, 20)), ["field"; "anon(0, [//<>f__AnonymousType3999162117`1']X)"], (18, 19)); + ("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__AnonymousType3999162117`1']X)"], (18, 19)); - ("X", ((18, 54), (18, 59)), ["field"; "anon(0, [//<>f__AnonymousType3571351395`2']X,Y)"], (18, 25)); + ("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))] From 6000c34a39759d52c65a0dd93c35cfa7249394b5 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Wed, 14 Mar 2018 14:08:19 +0000 Subject: [PATCH 03/24] fix build --- tests/fsharp/core/anon/test.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fsharp/core/anon/test.fsx b/tests/fsharp/core/anon/test.fsx index d45bd257165..331d522f071 100644 --- a/tests/fsharp/core/anon/test.fsx +++ b/tests/fsharp/core/anon/test.fsx @@ -53,7 +53,7 @@ module CrossAssemblyTest = tests() module CrossAssemblyTestStruct = - let tesvts() = + 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 From 1ffbee73fa422767513c326fad7b1282a49f60e3 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Wed, 14 Mar 2018 17:29:55 +0000 Subject: [PATCH 04/24] copy and update --- DEVGUIDE.md | 18 +- .../FSharp.Compiler.Private/FSComp.fs | 182 +++++++++--------- .../FSharp.Compiler.Private/FSComp.resx | 3 + src/fsharp/FSComp.txt | 1 + src/fsharp/LexFilter.fs | 9 +- src/fsharp/TypeChecker.fs | 129 ++++++++++--- src/fsharp/ast.fs | 10 +- src/fsharp/pars.fsy | 51 ++--- src/fsharp/service/ServiceParseTreeWalk.fs | 32 ++- src/fsharp/service/ServiceUntypedParse.fs | 5 +- src/fsharp/xlf/FSComp.txt.cs.xlf | 5 + src/fsharp/xlf/FSComp.txt.de.xlf | 5 + src/fsharp/xlf/FSComp.txt.en.xlf | 5 + src/fsharp/xlf/FSComp.txt.es.xlf | 5 + src/fsharp/xlf/FSComp.txt.fr.xlf | 5 + src/fsharp/xlf/FSComp.txt.it.xlf | 5 + src/fsharp/xlf/FSComp.txt.ja.xlf | 5 + src/fsharp/xlf/FSComp.txt.ko.xlf | 5 + src/fsharp/xlf/FSComp.txt.pl.xlf | 5 + src/fsharp/xlf/FSComp.txt.pt-BR.xlf | 5 + src/fsharp/xlf/FSComp.txt.ru.xlf | 5 + src/fsharp/xlf/FSComp.txt.tr.xlf | 5 + src/fsharp/xlf/FSComp.txt.zh-Hans.xlf | 5 + src/fsharp/xlf/FSComp.txt.zh-Hant.xlf | 5 + tests/fsharp/core/anon/lib.fs | 45 ++++- 25 files changed, 392 insertions(+), 163 deletions(-) diff --git a/DEVGUIDE.md b/DEVGUIDE.md index 9fd93452651..b453a7bdbc7 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -215,12 +215,23 @@ For **Release**: - We use the proto compiler to compile the source for `FSharp.Core.dll` in this distribution. - We use the proto compiler to compile the source for `FSharp.Compiler.dll`, `fsc.exe`, `fsi.exe`, and other binaries found in this distribution. -#### Updating FSComp.fs +#### 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`. To do this, build the non-buildfromsource version of FSharp.Compiler.Private (src\fsharp\FSharp.Compiler.Private) then check its obj\ directory for `FSComp.fs` and manually copy that into the buildfromsource directory. + copy /y src\fsharp\FSharp.Compiler.Private\obj\Debug\net40\FSComp.fs src\buildfromsource\FSharp.Compiler.Private\ + copy /y src\fsharp\FSharp.Compiler.Private\obj\Debug\net40\FSComp.resx 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. + #### Configuring proxy server @@ -232,11 +243,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/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs index a88526f0fe7..e78c24d6146 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs @@ -4057,273 +4057,276 @@ type internal SR private() = /// Two anonymous record types are from different assemblies '%s' and '%s' /// (Originally from ..\FSComp.txt:1343) static member tcAnonRecdCcuMismatch(a0 : System.String, a1 : System.String) = (GetStringFunc("tcAnonRecdCcuMismatch",",,,%s,,,%s,,,") a0 a1) - /// One anonymous record type is assembly-bound to '%s' (syntax 'new {| ... |}'), the other is assembly-neutral (syntax '{| ... |}') + /// Two anonymous record types have mismatched sets of field names '%s' and '%s' /// (Originally from ..\FSComp.txt:1344) 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:1346) + /// (Originally from ..\FSComp.txt:1345) static member keywordDescriptionAbstract() = (GetStringFunc("keywordDescriptionAbstract",",,,") ) /// Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. - /// (Originally from ..\FSComp.txt:1347) + /// (Originally from ..\FSComp.txt:1346) 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:1348) + /// (Originally from ..\FSComp.txt:1347) static member keywordDescriptionAs() = (GetStringFunc("keywordDescriptionAs",",,,") ) /// Used to verify code during debugging. - /// (Originally from ..\FSComp.txt:1349) + /// (Originally from ..\FSComp.txt:1348) static member keywordDescriptionAssert() = (GetStringFunc("keywordDescriptionAssert",",,,") ) /// Used as the name of the base class object. - /// (Originally from ..\FSComp.txt:1350) + /// (Originally from ..\FSComp.txt:1349) static member keywordDescriptionBase() = (GetStringFunc("keywordDescriptionBase",",,,") ) /// In verbose syntax, indicates the start of a code block. - /// (Originally from ..\FSComp.txt:1351) + /// (Originally from ..\FSComp.txt:1350) static member keywordDescriptionBegin() = (GetStringFunc("keywordDescriptionBegin",",,,") ) /// In verbose syntax, indicates the start of a class definition. - /// (Originally from ..\FSComp.txt:1352) + /// (Originally from ..\FSComp.txt:1351) 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:1353) + /// (Originally from ..\FSComp.txt:1352) static member keywordDescriptionDefault() = (GetStringFunc("keywordDescriptionDefault",",,,") ) /// Used to declare a delegate. - /// (Originally from ..\FSComp.txt:1354) + /// (Originally from ..\FSComp.txt:1353) static member keywordDescriptionDelegate() = (GetStringFunc("keywordDescriptionDelegate",",,,") ) /// Used in looping constructs or to execute imperative code. - /// (Originally from ..\FSComp.txt:1355) + /// (Originally from ..\FSComp.txt:1354) static member keywordDescriptionDo() = (GetStringFunc("keywordDescriptionDo",",,,") ) /// In verbose syntax, indicates the end of a block of code in a looping expression. - /// (Originally from ..\FSComp.txt:1356) + /// (Originally from ..\FSComp.txt:1355) static member keywordDescriptionDone() = (GetStringFunc("keywordDescriptionDone",",,,") ) /// Used to convert to a type that is lower in the inheritance chain. - /// (Originally from ..\FSComp.txt:1357) + /// (Originally from ..\FSComp.txt:1356) static member keywordDescriptionDowncast() = (GetStringFunc("keywordDescriptionDowncast",",,,") ) /// In a for expression, used when counting in reverse. - /// (Originally from ..\FSComp.txt:1358) + /// (Originally from ..\FSComp.txt:1357) static member keywordDescriptionDownto() = (GetStringFunc("keywordDescriptionDownto",",,,") ) /// Used in conditional branching. A short form of else if. - /// (Originally from ..\FSComp.txt:1359) + /// (Originally from ..\FSComp.txt:1358) static member keywordDescriptionElif() = (GetStringFunc("keywordDescriptionElif",",,,") ) /// Used in conditional branching. - /// (Originally from ..\FSComp.txt:1360) + /// (Originally from ..\FSComp.txt:1359) 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:1361) + /// (Originally from ..\FSComp.txt:1360) static member keywordDescriptionEnd() = (GetStringFunc("keywordDescriptionEnd",",,,") ) /// Used to declare an exception type. - /// (Originally from ..\FSComp.txt:1362) + /// (Originally from ..\FSComp.txt:1361) static member keywordDescriptionException() = (GetStringFunc("keywordDescriptionException",",,,") ) /// Indicates that a declared program element is defined in another binary or assembly. - /// (Originally from ..\FSComp.txt:1363) + /// (Originally from ..\FSComp.txt:1362) static member keywordDescriptionExtern() = (GetStringFunc("keywordDescriptionExtern",",,,") ) /// Used as a Boolean literal. - /// (Originally from ..\FSComp.txt:1364) + /// (Originally from ..\FSComp.txt:1363) 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:1365) + /// (Originally from ..\FSComp.txt:1364) static member keywordDescriptionFinally() = (GetStringFunc("keywordDescriptionFinally",",,,") ) /// Used in looping constructs. - /// (Originally from ..\FSComp.txt:1366) + /// (Originally from ..\FSComp.txt:1365) static member keywordDescriptionFor() = (GetStringFunc("keywordDescriptionFor",",,,") ) /// Used in lambda expressions, also known as anonymous functions. - /// (Originally from ..\FSComp.txt:1367) + /// (Originally from ..\FSComp.txt:1366) 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:1368) + /// (Originally from ..\FSComp.txt:1367) static member keywordDescriptionFunction() = (GetStringFunc("keywordDescriptionFunction",",,,") ) /// Used to reference the top-level .NET namespace. - /// (Originally from ..\FSComp.txt:1369) + /// (Originally from ..\FSComp.txt:1368) static member keywordDescriptionGlobal() = (GetStringFunc("keywordDescriptionGlobal",",,,") ) /// Used in conditional branching constructs. - /// (Originally from ..\FSComp.txt:1370) + /// (Originally from ..\FSComp.txt:1369) static member keywordDescriptionIf() = (GetStringFunc("keywordDescriptionIf",",,,") ) /// Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. - /// (Originally from ..\FSComp.txt:1371) + /// (Originally from ..\FSComp.txt:1370) static member keywordDescriptionIn() = (GetStringFunc("keywordDescriptionIn",",,,") ) /// Used to specify a base class or base interface. - /// (Originally from ..\FSComp.txt:1372) + /// (Originally from ..\FSComp.txt:1371) static member keywordDescriptionInherit() = (GetStringFunc("keywordDescriptionInherit",",,,") ) /// Used to indicate a function that should be integrated directly into the caller's code. - /// (Originally from ..\FSComp.txt:1373) + /// (Originally from ..\FSComp.txt:1372) static member keywordDescriptionInline() = (GetStringFunc("keywordDescriptionInline",",,,") ) /// Used to declare and implement interfaces. - /// (Originally from ..\FSComp.txt:1374) + /// (Originally from ..\FSComp.txt:1373) static member keywordDescriptionInterface() = (GetStringFunc("keywordDescriptionInterface",",,,") ) /// Used to specify that a member is visible inside an assembly but not outside it. - /// (Originally from ..\FSComp.txt:1375) + /// (Originally from ..\FSComp.txt:1374) 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:1376) + /// (Originally from ..\FSComp.txt:1375) static member keywordDescriptionLazy() = (GetStringFunc("keywordDescriptionLazy",",,,") ) /// Used to associate, or bind, a name to a value or function. - /// (Originally from ..\FSComp.txt:1377) + /// (Originally from ..\FSComp.txt:1376) static member keywordDescriptionLet() = (GetStringFunc("keywordDescriptionLet",",,,") ) /// Used in asynchronous workflows to bind a name to the result of an asynchronous computation, or, in other computation expressions, used to bind a name to a result, which is of the computation type. - /// (Originally from ..\FSComp.txt:1378) + /// (Originally from ..\FSComp.txt:1377) static member keywordDescriptionLetBang() = (GetStringFunc("keywordDescriptionLetBang",",,,") ) /// Used to branch by comparing a value to a pattern. - /// (Originally from ..\FSComp.txt:1379) + /// (Originally from ..\FSComp.txt:1378) static member keywordDescriptionMatch() = (GetStringFunc("keywordDescriptionMatch",",,,") ) /// Used to declare a property or method in an object type. - /// (Originally from ..\FSComp.txt:1380) + /// (Originally from ..\FSComp.txt:1379) 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:1381) + /// (Originally from ..\FSComp.txt:1380) static member keywordDescriptionModule() = (GetStringFunc("keywordDescriptionModule",",,,") ) /// Used to declare a variable, that is, a value that can be changed. - /// (Originally from ..\FSComp.txt:1382) + /// (Originally from ..\FSComp.txt:1381) 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:1383) + /// (Originally from ..\FSComp.txt:1382) 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:1384) + /// (Originally from ..\FSComp.txt:1383) 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:1385) + /// (Originally from ..\FSComp.txt:1384) static member keywordDescriptionNot() = (GetStringFunc("keywordDescriptionNot",",,,") ) /// Indicates the absence of an object. Also used in generic parameter constraints. - /// (Originally from ..\FSComp.txt:1386) + /// (Originally from ..\FSComp.txt:1385) 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:1387) + /// (Originally from ..\FSComp.txt:1386) static member keywordDescriptionOf() = (GetStringFunc("keywordDescriptionOf",",,,") ) /// Used to make the contents of a namespace or module available without qualification. - /// (Originally from ..\FSComp.txt:1388) + /// (Originally from ..\FSComp.txt:1387) 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:1389) + /// (Originally from ..\FSComp.txt:1388) 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:1390) + /// (Originally from ..\FSComp.txt:1389) static member keywordDescriptionOverride() = (GetStringFunc("keywordDescriptionOverride",",,,") ) /// Restricts access to a member to code in the same type or module. - /// (Originally from ..\FSComp.txt:1391) + /// (Originally from ..\FSComp.txt:1390) static member keywordDescriptionPrivate() = (GetStringFunc("keywordDescriptionPrivate",",,,") ) /// Allows access to a member from outside the type. - /// (Originally from ..\FSComp.txt:1392) + /// (Originally from ..\FSComp.txt:1391) static member keywordDescriptionPublic() = (GetStringFunc("keywordDescriptionPublic",",,,") ) /// Used to indicate that a function is recursive. - /// (Originally from ..\FSComp.txt:1393) + /// (Originally from ..\FSComp.txt:1392) static member keywordDescriptionRec() = (GetStringFunc("keywordDescriptionRec",",,,") ) /// Used to indicate a value to provide as the result of a computation expression. - /// (Originally from ..\FSComp.txt:1394) + /// (Originally from ..\FSComp.txt:1393) static member keywordDescriptionReturn() = (GetStringFunc("keywordDescriptionReturn",",,,") ) /// Used to indicate a computation expression that, when evaluated, provides the result of the containing computation expression. - /// (Originally from ..\FSComp.txt:1395) + /// (Originally from ..\FSComp.txt:1394) 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:1396) + /// (Originally from ..\FSComp.txt:1395) 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:1397) + /// (Originally from ..\FSComp.txt:1396) 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:1398) + /// (Originally from ..\FSComp.txt:1397) static member keywordDescriptionStruct() = (GetStringFunc("keywordDescriptionStruct",",,,") ) /// Used in conditional expressions. Also used to perform side effects after object construction. - /// (Originally from ..\FSComp.txt:1399) + /// (Originally from ..\FSComp.txt:1398) static member keywordDescriptionThen() = (GetStringFunc("keywordDescriptionThen",",,,") ) /// Used in for loops to indicate a range. - /// (Originally from ..\FSComp.txt:1400) + /// (Originally from ..\FSComp.txt:1399) 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:1401) + /// (Originally from ..\FSComp.txt:1400) 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:1402) + /// (Originally from ..\FSComp.txt:1401) static member keywordDescriptionType() = (GetStringFunc("keywordDescriptionType",",,,") ) /// Used to convert to a type that is higher in the inheritance chain. - /// (Originally from ..\FSComp.txt:1403) + /// (Originally from ..\FSComp.txt:1402) static member keywordDescriptionUpcast() = (GetStringFunc("keywordDescriptionUpcast",",,,") ) /// Used instead of let for values that require Dispose to be called to free resources. - /// (Originally from ..\FSComp.txt:1404) + /// (Originally from ..\FSComp.txt:1403) static member keywordDescriptionUse() = (GetStringFunc("keywordDescriptionUse",",,,") ) /// Used instead of let! in asynchronous workflows and other computation expressions for values that require Dispose to be called to free resources. - /// (Originally from ..\FSComp.txt:1405) + /// (Originally from ..\FSComp.txt:1404) 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:1406) + /// (Originally from ..\FSComp.txt:1405) static member keywordDescriptionVal() = (GetStringFunc("keywordDescriptionVal",",,,") ) /// Indicates the .NET void type. Used when interoperating with other .NET languages. - /// (Originally from ..\FSComp.txt:1407) + /// (Originally from ..\FSComp.txt:1406) 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:1408) + /// (Originally from ..\FSComp.txt:1407) static member keywordDescriptionWhen() = (GetStringFunc("keywordDescriptionWhen",",,,") ) /// Introduces a looping construct. - /// (Originally from ..\FSComp.txt:1409) + /// (Originally from ..\FSComp.txt:1408) 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:1410) + /// (Originally from ..\FSComp.txt:1409) static member keywordDescriptionWith() = (GetStringFunc("keywordDescriptionWith",",,,") ) /// Used in a sequence expression to produce a value for a sequence. - /// (Originally from ..\FSComp.txt:1411) + /// (Originally from ..\FSComp.txt:1410) 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:1412) + /// (Originally from ..\FSComp.txt:1411) 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:1413) + /// (Originally from ..\FSComp.txt:1412) static member keywordDescriptionRightArrow() = (GetStringFunc("keywordDescriptionRightArrow",",,,") ) /// Assigns a value to a variable. - /// (Originally from ..\FSComp.txt:1414) + /// (Originally from ..\FSComp.txt:1413) static member keywordDescriptionLeftArrow() = (GetStringFunc("keywordDescriptionLeftArrow",",,,") ) /// Converts a type to type that is higher in the hierarchy. - /// (Originally from ..\FSComp.txt:1415) + /// (Originally from ..\FSComp.txt:1414) static member keywordDescriptionCast() = (GetStringFunc("keywordDescriptionCast",",,,") ) /// Converts a type to a type that is lower in the hierarchy. - /// (Originally from ..\FSComp.txt:1416) + /// (Originally from ..\FSComp.txt:1415) static member keywordDescriptionDynamicCast() = (GetStringFunc("keywordDescriptionDynamicCast",",,,") ) /// Delimits a typed code quotation. - /// (Originally from ..\FSComp.txt:1417) + /// (Originally from ..\FSComp.txt:1416) static member keywordDescriptionTypedQuotation() = (GetStringFunc("keywordDescriptionTypedQuotation",",,,") ) /// Delimits a untyped code quotation. - /// (Originally from ..\FSComp.txt:1418) + /// (Originally from ..\FSComp.txt:1417) 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:1419) + /// (Originally from ..\FSComp.txt:1418) 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:1420) + /// (Originally from ..\FSComp.txt:1419) 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:1421) + /// (Originally from ..\FSComp.txt:1420) static member descriptionWordIs() = (GetStringFunc("descriptionWordIs",",,,") ) /// This value is not a function and cannot be applied. - /// (Originally from ..\FSComp.txt:1422) + /// (Originally from ..\FSComp.txt:1421) 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:1423) + /// (Originally from ..\FSComp.txt:1422) 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:1424) + /// (Originally from ..\FSComp.txt:1423) static member notAFunctionButMaybeIndexer() = (GetStringFunc("notAFunctionButMaybeIndexer",",,,") ) /// - /// (Originally from ..\FSComp.txt:1425) + /// (Originally from ..\FSComp.txt:1424) 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:1426) + /// (Originally from ..\FSComp.txt:1425) 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:1427) + /// (Originally from ..\FSComp.txt:1426) 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:1428) + /// (Originally from ..\FSComp.txt:1427) 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:1429) + /// (Originally from ..\FSComp.txt:1428) 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:1430) + /// (Originally from ..\FSComp.txt:1429) 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:1431) + /// (Originally from ..\FSComp.txt:1430) static member implicitlyDiscardedSequenceInSequenceExpression(a0 : System.String) = (3222, GetStringFunc("implicitlyDiscardedSequenceInSequenceExpression",",,,%s,,,") a0) /// Invalid anonymous record expression - /// (Originally from ..\FSComp.txt:1432) + /// (Originally from ..\FSComp.txt:1431) static member parsInvalidAnonRecdExpr() = (3223, GetStringFunc("parsInvalidAnonRecdExpr",",,,") ) /// Invalid anonymous record type - /// (Originally from ..\FSComp.txt:1433) + /// (Originally from ..\FSComp.txt:1432) static member parsInvalidAnonRecdType() = (3224, 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:1433) + static member tcCopyAndUpdateNeedsRecordType() = (3225, GetStringFunc("tcCopyAndUpdateNeedsRecordType",",,,") ) /// Call this method once to validate that all known resources are valid; throws if not static member RunStartupValidation() = @@ -5730,4 +5733,5 @@ type internal SR private() = ignore(GetString("implicitlyDiscardedSequenceInSequenceExpression")) 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 2e1d0938ce4..07ea19a9a34 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx @@ -4327,4 +4327,7 @@ 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/FSComp.txt b/src/fsharp/FSComp.txt index a212f7def0b..60d6405efaa 100644 --- a/src/fsharp/FSComp.txt +++ b/src/fsharp/FSComp.txt @@ -1430,3 +1430,4 @@ notAFunctionButMaybeDeclaration,"This value is not a function and cannot be appl 3222,implicitlyDiscardedSequenceInSequenceExpression,"This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'." 3223,parsInvalidAnonRecdExpr,"Invalid anonymous record expression" 3224,parsInvalidAnonRecdType,"Invalid anonymous record type" +3225,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/LexFilter.fs b/src/fsharp/LexFilter.fs index 8d92b6edb64..ed229ff4e83 100755 --- a/src/fsharp/LexFilter.fs +++ b/src/fsharp/LexFilter.fs @@ -674,7 +674,6 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | _,(CtxtSeqBlock _ :: CtxtParen(LBRACE,_) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) -> unindentationLimit false rest - // MAJOR PERMITTED UNDENTATION This is allowing: // if x then y else // let x = 3 + 4 @@ -768,7 +767,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 @@ -998,7 +997,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 @@ -1796,7 +1795,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 }" *) @@ -1897,7 +1896,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/TypeChecker.fs b/src/fsharp/TypeChecker.fs index 77fbb1daaf1..8c186961e1f 100755 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -5821,23 +5821,8 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = let expr = mkAnyTupled cenv.g m tupInfo args' argtys expr, tpenv - | SynExpr.AnonRecd (isStruct, unsortedArgs, m) -> - let unsortedIds = unsortedArgs |> List.map fst |> List.toArray - let anonInfo, sortedArgTys = UnifyAnonRecdTypeAndInferCharacteristics env.eContextInfo cenv env.DisplayEnv m 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 m 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 m anonInfo sortedCheckedArgs sortedArgTys, 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) @@ -6685,9 +6670,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)) @@ -6894,11 +6879,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 @@ -6985,9 +6965,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 + | Some (anonInfo, _) -> evalTupInfoIsStruct anonInfo.TupInfo + | None -> + let tcref, _ = destAppTy cenv.g origExprTy + tcref.IsStructOrEnumTycon + + let wrap, oldveaddr = 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 + | Some (anonInfo, tinst) -> + for (i, id) in Array.indexed anonInfo.SortedIds do + yield id, Choice2Of2 (mkAnonRecdFieldGetViaExprAddr (anonInfo, oldveaddr, tinst, i, mOrigExpr)) + | None -> + 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 diff --git a/src/fsharp/ast.fs b/src/fsharp/ast.fs index 3bc6214ec7c..611c0f91dd6 100644 --- a/src/fsharp/ast.fs +++ b/src/fsharp/ast.fs @@ -523,8 +523,8 @@ and | 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: {| id1=e1; ...; idN=eN |} - /// F# syntax: {| new id1=e1; ...; idN=eN |} - | AnonRecd of isStruct: bool * recordFields:(Ident * SynExpr) list * range:range + /// 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 @@ -2356,10 +2356,12 @@ let rec synExprContainsError inpExpr = | SynExpr.Tuple (_,es,_,_) -> walkExprs es - | SynExpr.AnonRecd (_,flds,_) -> + | SynExpr.AnonRecd (_,origExpr,flds,_) -> + (match origExpr with Some (e,_) -> walkExpr e | None -> false) || walkExprs (List.map snd flds) - | SynExpr.Record (_,_,fs,_) -> + | 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/pars.fsy b/src/fsharp/pars.fsy index bd6f1b12a33..b305f08eca1 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -3989,14 +3989,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()) } /* @@ -4008,7 +4011,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 @@ -4017,28 +4020,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 } @@ -4166,16 +4169,26 @@ braceBarExpr: { $1 false } braceBarExprCore: - | LBRACE_BAR oneOrMoreRecdExprBindings bar_rbrace - { let flds = $2 + | 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,flds,m)) } + (fun isStruct -> SynExpr.AnonRecd(isStruct,orig,flds,m)) } - | LBRACE_BAR oneOrMoreRecdExprBindings recover + | LBRACE_BAR recdExprCore recover { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBraceBar()) - let flds = $2 + 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,flds,m)) } + (fun isStruct -> SynExpr.AnonRecd(isStruct,orig,flds,m)) } | LBRACE_BAR error bar_rbrace { // silent recovery @@ -4185,19 +4198,11 @@ braceBarExprCore: | LBRACE_BAR recover { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBraceBar()) let m = rhs2 parseState 1 1 - (fun isStruct -> SynExpr.AnonRecd(isStruct,[],m)) } + (fun isStruct -> SynExpr.AnonRecd(isStruct,None,[],m)) } | LBRACE_BAR bar_rbrace { let m = rhs2 parseState 1 2 - (fun isStruct -> SynExpr.AnonRecd(isStruct,[],m)) } - -oneOrMoreRecdExprBindings: - | recdBinding recdExprBindings - { (($1, None) :: List.rev $2) |> 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) } - + (fun isStruct -> SynExpr.AnonRecd(isStruct,None,[],m)) } anonLambdaExpr: | FUN atomicPatterns RARROW typedSeqExprBlock diff --git a/src/fsharp/service/ServiceParseTreeWalk.fs b/src/fsharp/service/ServiceParseTreeWalk.fs index 3f1de0e7e84..eb0652c3a33 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 : 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 @@ -194,7 +209,22 @@ module public AstTraversal = | SynExpr.Tuple(_, synExprList, _, _range) | SynExpr.ArrayOrList(_, synExprList, _range) -> synExprList |> List.map (fun x -> dive x x.Range traverseSynExpr) |> pick expr - | SynExpr.AnonRecd(_isStruct, synExprList, _range) -> synExprList |> List.map snd |> 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 = diff --git a/src/fsharp/service/ServiceUntypedParse.fs b/src/fsharp/service/ServiceUntypedParse.fs index 5af088ff525..dc8df504330 100755 --- a/src/fsharp/service/ServiceUntypedParse.fs +++ b/src/fsharp/service/ServiceUntypedParse.fs @@ -227,7 +227,10 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op | None -> () yield! walkExprs (fs |> List.choose p23) - | SynExpr.AnonRecd (_isStruct, fs, _) -> + | SynExpr.AnonRecd (_isStruct, copyExprOpt, fs, _) -> + match copyExprOpt with + | Some (e,_) -> yield! walkExpr true e + | None -> () yield! walkExprs (fs |> List.map snd) | SynExpr.ObjExpr (_,_,bs,is,_,_) -> diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index 13433bae31d..166376a2607 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -7012,6 +7012,11 @@ 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 09ee764bc5a..c1bee3d6c8c 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -7012,6 +7012,11 @@ 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 bb3d873ab9e..0620bd3cc67 100644 --- a/src/fsharp/xlf/FSComp.txt.en.xlf +++ b/src/fsharp/xlf/FSComp.txt.en.xlf @@ -7012,6 +7012,11 @@ 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 e02d0d40831..080b0f3173b 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -7012,6 +7012,11 @@ 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 2d00a2fbd6e..96346eb0581 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -7012,6 +7012,11 @@ 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 a9a9c35e72d..98a7b01e1d6 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -7012,6 +7012,11 @@ 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 c9dc1d8c305..4d08d1598b6 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -7012,6 +7012,11 @@ 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 64d4bc3e904..13eae1e8a3b 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -7012,6 +7012,11 @@ 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 b956238d314..7259abdd073 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -7012,6 +7012,11 @@ 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 9fdb7d83f8f..c0f53fb61c0 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -7012,6 +7012,11 @@ 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 9e56782f248..9ba98b42f03 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -7012,6 +7012,11 @@ 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 67e8c1965c0..e1d5e517ef1 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -7012,6 +7012,11 @@ 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 ca95767c04a..c8370e41d5a 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -7012,6 +7012,11 @@ 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 c9bdbbe4f52..19c53d6514f 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -7012,6 +7012,11 @@ 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/tests/fsharp/core/anon/lib.fs b/tests/fsharp/core/anon/lib.fs index 23571cab8b5..0fee8e30c35 100644 --- a/tests/fsharp/core/anon/lib.fs +++ b/tests/fsharp/core/anon/lib.fs @@ -65,9 +65,6 @@ module KindB1 = check "ceoijew90ewcw6" (FSharp.Reflection.FSharpValue.GetRecordFields({| X = 1 |}).Length) 1 check "ceoijew90ewcw7" (FSharp.Reflection.FSharpValue.GetRecordFields({| X = 1 |}).[0]) (box 1) - // TODO: field reordering.... - //let test3b() = {| a = 1+1; b = 2 |} = {| b = 1; a = 2 |} - // Equality is possible check "ceijoewwekcj" {| a = 1-1 |} {| a = Unchecked.defaultof<_> |} @@ -145,10 +142,44 @@ module KindB2 = check "cew9cwo3" testConstrainedAccess2 (0, 1, 2) - // Copy-and-update may not be used, since C# doesn't allow this on anonymous objects - - // Types _can_ be used outside their assembly, but can _not_ be named in the syntax of types, nor created - +module CopyAndUpdateOfAnonRecord = + let data = {| X = 1 |} + let data2 = {| data with Y = "1" |} + let data3 = {| data with X = "3" |} + check "fewjkvwno31" data.X 1 + check "fewjkvwno32" data2.X 1 + check "fewjkvwno33" data2.Y "1" + check "fewjkvwno34" data3.X "3" + +module CopyAndUpdateOfAnonRecordStruct = + let data = struct {| X = 1 |} + let data2 = struct {| data with Y = "1" |} + let data3 = struct {| data with X = "3" |} + check "fewjkvwno311" data.X 1 + check "fewjkvwno322" data2.X 1 + check "fewjkvwno333" data2.Y "1" + check "fewjkvwno344" data3.X "3" + +module CopyAndUpdateOfAnonRecordFromRecord = + type Base = { X : int } + let data = { X = 1 } + let data2 = {| data with Y = "1" |} + let data3 = {| data with X = "3" |} + check "fewjkvwno315" data.X 1 + check "fewjkvwno326" data2.X 1 + check "fewjkvwno337" data2.Y "1" + check "fewjkvwno348" data3.X "3" + +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 "fewjkvwno33e" data2.Y "1" + check "fewjkvwno34r" data3.X "3" module QuotesNewRecord = From 4f424c23761a52871c7450663fc45d0d4f76ede3 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Wed, 14 Mar 2018 17:57:26 +0000 Subject: [PATCH 05/24] more tests --- tests/fsharp/core/anon/lib.fs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/fsharp/core/anon/lib.fs b/tests/fsharp/core/anon/lib.fs index 0fee8e30c35..abeb7711ab9 100644 --- a/tests/fsharp/core/anon/lib.fs +++ b/tests/fsharp/core/anon/lib.fs @@ -146,29 +146,38 @@ 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 = [] @@ -178,8 +187,8 @@ module CopyAndUpdateOfAnonRecordFromStructRecord = let data3 = {| data with X = "3" |} check "fewjkvwno31q" data.X 1 check "fewjkvwno32w" data2.X 1 - check "fewjkvwno33e" data2.Y "1" - check "fewjkvwno34r" data3.X "3" + check "fewjkvwno33ej" data2.Y "1" + check "fewjkvwno34rs" data3.X "3" module QuotesNewRecord = From 9b9f6bf744d0056f732bd65212180f4304b150cc Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 15 Mar 2018 00:05:44 +0000 Subject: [PATCH 06/24] update ilxgen --- src/fsharp/IlxGen.fs | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index 410c38bd730..9b65b3c966f 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -3640,7 +3640,7 @@ and GenSlotParam m cenv eenv (TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attri IsOptional=optionalFlag || optionalFlag2 CustomAttrs= mkILCustomAttrs (GenAttrs cenv eenv attribs) } -and GenFormalSlotsig m cenv mgbuf eenv (TSlotSig(_,typ,ctps,mtps,paraml,returnTy)) = +and GenFormalSlotsig m cenv eenv (TSlotSig(_,typ,ctps,mtps,paraml,returnTy)) = let paraml = List.concat paraml let ilTy = GenType cenv m eenv.tyenv typ let eenvForSlotSig = EnvForTypars (ctps @ mtps) eenv @@ -3651,7 +3651,7 @@ and GenFormalSlotsig m cenv mgbuf eenv (TSlotSig(_,typ,ctps,mtps,paraml,returnTy and instSlotParam inst (TSlotParam(nm,ty,inFlag,fl2,fl3,attrs)) = TSlotParam(nm,instType inst ty,inFlag,fl2,fl3,attrs) -and GenActualSlotsig m cenv mgbuf eenv (TSlotSig(_,typ,ctps,mtps,ilSlotParams,ilSlotRetTy)) methTyparsOfOverridingMethod (methodParams: Val list) = +and GenActualSlotsig m cenv eenv (TSlotSig(_,typ,ctps,mtps,ilSlotParams,ilSlotRetTy)) methTyparsOfOverridingMethod (methodParams: Val list) = let ilSlotParams = List.concat ilSlotParams let instForSlotSig = mkTyparInst (ctps@mtps) (argsOfAppTy cenv.g typ @ generalizeTypars methTyparsOfOverridingMethod) let ilParams = ilSlotParams |> List.map (instSlotParam instForSlotSig >> GenSlotParam m cenv eenv) @@ -3664,8 +3664,8 @@ and GenActualSlotsig m cenv mgbuf eenv (TSlotSig(_,typ,ctps,mtps,ilSlotParams,il and GenNameOfOverridingMethod cenv (useMethodImpl,(TSlotSig(nameOfOverridenMethod,enclTypOfOverridenMethod,_,_,_,_))) = if useMethodImpl then qualifiedMangledNameOfTyconRef (tcrefOfAppTy cenv.g enclTypOfOverridenMethod) nameOfOverridenMethod else nameOfOverridenMethod -and GenMethodImpl cenv mgbuf eenv (useMethodImpl,(TSlotSig(nameOfOverridenMethod,_,_,_,_,_) as slotsig)) m = - let ilOverrideTy,ilOverrideParams,ilOverrideRet = GenFormalSlotsig m cenv mgbuf eenv slotsig +and GenMethodImpl cenv eenv (useMethodImpl,(TSlotSig(nameOfOverridenMethod,_,_,_,_,_) as slotsig)) m = + let ilOverrideTy,ilOverrideParams,ilOverrideRet = GenFormalSlotsig m cenv eenv slotsig let nameOfOverridingMethod = GenNameOfOverridingMethod cenv (useMethodImpl,slotsig) nameOfOverridingMethod, @@ -3673,7 +3673,7 @@ and GenMethodImpl cenv mgbuf eenv (useMethodImpl,(TSlotSig(nameOfOverridenMethod let ilOverrideTyRef = ilOverrideTy.TypeRef let ilOverrideMethRef = mkILMethRef(ilOverrideTyRef, ILCallingConv.Instance, nameOfOverridenMethod, List.length (DropErasedTypars methTyparsOfOverridingMethod), (typesOfILParams ilOverrideParams), ilOverrideRet.Type) let eenvForOverrideBy = AddTyparsToEnv methTyparsOfOverridingMethod eenv - let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv mgbuf eenvForOverrideBy slotsig methTyparsOfOverridingMethod [] + let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv eenvForOverrideBy slotsig methTyparsOfOverridingMethod [] let ilOverrideMethGenericParams = GenGenericParams cenv eenvForOverrideBy methTyparsOfOverridingMethod let ilOverrideMethGenericArgs = mkILFormalGenericArgs 0 ilOverrideMethGenericParams let ilOverrideBy = mkILInstanceMethSpecInTy(ilTyForOverriding, nameOfOverridingMethod, typesOfILParams ilParamsOfOverridingMethod, ilReturnOfOverridingMethod.Type, ilOverrideMethGenericArgs) @@ -3705,14 +3705,14 @@ and GenObjectMethod cenv eenvinner (cgbuf:CodeGenBuffer) useMethodImpl tmethod = let eenvUnderTypars = AddTyparsToEnv methTyparsOfOverridingMethod eenvinner let methodParams = List.concat methodParams let methodParamsNonSelf = match methodParams with [] -> [] | _::t -> t // drop the 'this' arg when computing better argument names for IL parameters - let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv cgbuf.mgbuf eenvUnderTypars slotsig methTyparsOfOverridingMethod methodParamsNonSelf + let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv eenvUnderTypars slotsig methTyparsOfOverridingMethod methodParamsNonSelf let ilAttribs = GenAttrs cenv eenvinner attribs // Args are stored starting at #1 let eenvForMeth = AddStorageForLocalVals cenv.g (methodParams |> List.mapi (fun i v -> (v,Arg i))) eenvUnderTypars let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],nameOfOverridenMethod,eenvForMeth,0,0,methodBodyExpr,(if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) - let nameOfOverridingMethod,methodImplGenerator = GenMethodImpl cenv cgbuf.mgbuf eenvinner (useMethodImpl,slotsig) methodBodyExpr.Range + let nameOfOverridingMethod,methodImplGenerator = GenMethodImpl cenv eenvinner (useMethodImpl,slotsig) methodBodyExpr.Range let mdef = mkILGenericVirtualMethod @@ -3729,7 +3729,7 @@ and GenObjectMethod cenv eenvinner (cgbuf:CodeGenBuffer) useMethodImpl tmethod = [(useMethodImpl,methodImplGenerator,methTyparsOfOverridingMethod),mdef] and GenObjectExpr cenv cgbuf eenvouter expr (baseType,baseValOpt,basecall,overrides,interfaceImpls,m) sequel = - let cloinfo,_,eenvinner = GetIlxClosureInfo cenv cgbuf.mgbuf m false None eenvouter expr + let cloinfo,_,eenvinner = GetIlxClosureInfo cenv m false None eenvouter expr let cloAttribs = cloinfo.cloAttribs let cloFreeVars = cloinfo.cloFreeVars @@ -3787,7 +3787,7 @@ and GenSequenceExpr cenv (cgbuf:CodeGenBuffer) eenvouter (nextEnumeratorValRef:V // Get the free variables. Make a lambda to pretend that the 'nextEnumeratorValRef' is bound (it is an argument to GenerateNext) let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilCloTypeRef:ILTypeRef,ilCloFreeVars,eenvinner) = - GetIlxClosureFreeVars cenv cgbuf.mgbuf m None eenvouter [] (mkLambda m nextEnumeratorValRef.Deref (generateNextExpr, cenv.g.int32_ty)) + GetIlxClosureFreeVars cenv m None eenvouter [] (mkLambda m nextEnumeratorValRef.Deref (generateNextExpr, cenv.g.int32_ty)) let ilCloSeqElemTy = GenType cenv m eenvinner.tyenv seqElemTy let cloRetTy = mkSeqTy cenv.g seqElemTy @@ -3900,7 +3900,7 @@ and GenLambdaClosure cenv (cgbuf:CodeGenBuffer) eenv isLocalTypeFunc selfv expr | Expr.Lambda (_,_,_,_,_,m,_) | Expr.TyLambda(_,_,_,m,_) -> - let cloinfo,body,eenvinner = GetIlxClosureInfo cenv cgbuf.mgbuf m isLocalTypeFunc selfv eenv expr + let cloinfo,body,eenvinner = GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenv expr let entryPointInfo = match selfv with @@ -3975,7 +3975,7 @@ and GenFreevar cenv m eenvouter tyenvinner (fv:Val) = #endif | _ -> GenType cenv m tyenvinner fv.Type -and GetIlxClosureFreeVars cenv mgbuf m selfv eenvouter takenNames expr = +and GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr = // Choose a base name for the closure let basename = @@ -4070,7 +4070,7 @@ and GetIlxClosureFreeVars cenv mgbuf m selfv eenvouter takenNames expr = (cloAttribs,cloInternalFreeTyvars,cloContractFreeTyvars,cloFreeTyvars,cloFreeVars,ilCloTypeRef,Array.ofList ilCloFreeVars,eenvinner) -and GetIlxClosureInfo cenv mgbuf 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 @@ -4096,7 +4096,7 @@ and GetIlxClosureInfo cenv mgbuf m isLocalTypeFunc selfv eenvouter expr = let takenNames = vs |> List.map (fun v -> v.CompiledName) // Get the free variables and the information about the closure, add the free variables to the environment - let (cloAttribs,cloInternalFreeTyvars,cloContractFreeTyvars,_,cloFreeVars,ilCloTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv mgbuf m selfv eenvouter takenNames expr + let (cloAttribs,cloInternalFreeTyvars,cloContractFreeTyvars,_,cloFreeVars,ilCloTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr // Put the type and value arguments into the environment let rec getClosureArgs eenv ntmargs tvsl (vs:Val list) = @@ -4252,7 +4252,7 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delega // Work out the free type variables for the morphing thunk let takenNames = List.map nameOfVal tmvs - let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilDelegeeTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv cgbuf.mgbuf m None eenvouter takenNames expr + let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilDelegeeTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv m None eenvouter takenNames expr let ilDelegeeGenericParams = GenGenericParams cenv eenvinner cloFreeTyvars let ilDelegeeGenericActualsInner = mkILFormalGenericArgs 0 ilDelegeeGenericParams @@ -4267,7 +4267,7 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delega // The slot sig contains a formal instantiation. When creating delegates we're only // interested in the actual instantiation since we don't have to emit a method impl. - let ilDelegeeParams,ilDelegeeRet = GenActualSlotsig m cenv cgbuf.mgbuf envForDelegeeUnderTypars slotsig methTyparsOfOverridingMethod tmvs + let ilDelegeeParams,ilDelegeeRet = GenActualSlotsig m cenv envForDelegeeUnderTypars slotsig methTyparsOfOverridingMethod tmvs let envForDelegeeMeth = AddStorageForLocalVals cenv.g (List.mapi (fun i v -> (v,Arg (i+numthis))) tmvs) envForDelegeeUnderTypars let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],delegeeMethName,envForDelegeeMeth,1,0,body,(if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) @@ -4741,7 +4741,7 @@ and GenLetRecBindings cenv (cgbuf:CodeGenBuffer) eenv (allBinds: Bindings,m) = | Expr.Lambda _ | Expr.TyLambda _ | Expr.Obj _ -> let isLocalTypeFunc = Option.isSome selfv && (IsNamedLocalTypeFuncVal cenv.g (Option.get selfv) e) let selfv = (match e with Expr.Obj _ -> None | _ when isLocalTypeFunc -> None | _ -> Option.map mkLocalValRef selfv) - let clo,_,eenvclo = GetIlxClosureInfo cenv cgbuf.mgbuf m isLocalTypeFunc selfv {eenv with letBoundVars=(mkLocalValRef boundv)::eenv.letBoundVars} e + let clo,_,eenvclo = GetIlxClosureInfo cenv m isLocalTypeFunc selfv {eenv with letBoundVars=(mkLocalValRef boundv)::eenv.letBoundVars} e clo.cloFreeVars |> List.iter (fun fv -> if Zset.contains fv forwardReferenceSet then match StorageForVal m fv eenvclo with @@ -5688,7 +5688,7 @@ and AllocLocalVal cenv cgbuf v eenv repr scopeMarks = let eenvinner = {eenv with letBoundVars=(mkLocalValRef v)::eenv.letBoundVars} - let cloinfo,_,_ = GetIlxClosureInfo cenv cgbuf.mgbuf v.Range true None eenvinner (Option.get repr) + let cloinfo,_,_ = GetIlxClosureInfo cenv v.Range true None eenvinner (Option.get repr) cloinfo let idx,eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.CompiledName, cenv.g.ilg.typ_Object, false) scopeMarks @@ -6196,7 +6196,7 @@ and GenFieldInit m c = | ConstToILFieldInit fieldInit -> fieldInit | _ -> error(Error(FSComp.SR.ilTypeCannotBeUsedForLiteralField(),m)) -and GenAbstractBinding cenv mgbuf eenv tref (vref:ValRef) = +and GenAbstractBinding cenv eenv tref (vref:ValRef) = assert(vref.IsMember) let m = vref.Range let memberInfo = Option.get vref.MemberInfo @@ -6339,7 +6339,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = // REVIEW: this should be based off tcaug_adhoc_list, which is in declaration order tycon.MembersOfFSharpTyconSorted |> List.sortWith (fun v1 v2 -> rangeOrder.Compare(v1.DefinitionRange,v2.DefinitionRange)) - |> List.map (GenAbstractBinding cenv mgbuf eenv tref) + |> List.map (GenAbstractBinding cenv eenv tref) |> List.unzip3 |> mapTriple (List.concat, List.concat, List.concat) @@ -6369,7 +6369,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let useMethodImpl = true let eenvUnderTypars = EnvForTypars memberParentTypars eenv - let _,methodImplGenerator = GenMethodImpl cenv mgbuf eenvUnderTypars (useMethodImpl,slotsig) m + let _,methodImplGenerator = GenMethodImpl cenv eenvUnderTypars (useMethodImpl,slotsig) m if useMethodImpl then yield methodImplGenerator (ilThisTy,memberMethodTypars) @@ -6665,7 +6665,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = match paraml with | [[tsp]] when isUnitTy cenv.g tsp.Type -> [] (* suppress unit arg *) | paraml -> paraml - GenActualSlotsig m cenv mgbuf eenvinner (TSlotSig(nm,typ,ctps,mtps,paraml,returnTy)) [] [] + GenActualSlotsig m cenv eenvinner (TSlotSig(nm,typ,ctps,mtps,paraml,returnTy)) [] [] yield! mkILDelegateMethods reprAccess cenv.g.ilg (cenv.g.iltyp_AsyncCallback, cenv.g.iltyp_IAsyncResult) (p,r) | _ -> () From f42054a50a02b86afb5143c453d986be7bab5cea Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 16 Mar 2018 12:38:39 +0000 Subject: [PATCH 07/24] adjust test --- tests/fsharp/tests.fs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs index d3d684bc9d6..163ad8e8cc6 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -235,14 +235,14 @@ module CoreTests = let ``anon-FSC_BASIC``() = let cfg = testConfig "core/anon" - fsc cfg "%s -a -o:lib.dll -g" cfg.fsc_flags ["lib.fs"] + fsc cfg "%s -a -o:lib.dll" cfg.fsc_flags ["lib.fs"] copyFile (cfg.FSCBinPath ++ "System.ValueTuple.dll") ("." ++ "System.ValueTuple.dll") - peverify cfg "lib.dll" + //peverify cfg "lib.dll" - fsc cfg "%s -r:lib.dll -g" cfg.fsc_flags ["test.fsx"] + fsc cfg "%s -r:lib.dll" cfg.fsc_flags ["test.fsx"] - peverify cfg "test.exe" + //peverify cfg "test.exe" begin use testOkFile = fileguard cfg "test.ok" From 2b51188f7ddba2d865d22223958eb704ecebbf88 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 17 Mar 2018 02:24:33 +0000 Subject: [PATCH 08/24] conflicts --- tests/scripts/compiler-perf-results.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/scripts/compiler-perf-results.txt b/tests/scripts/compiler-perf-results.txt index cf61efda488..19c42c41f6b 100644 --- a/tests/scripts/compiler-perf-results.txt +++ b/tests/scripts/compiler-perf-results.txt @@ -137,3 +137,8 @@ https://github.com/dsyme/visualfsharp.git range1 e49ac8a2f https://github.com/Microsoft/visualfsharp master ac9f2af4329d2ae1c4213bb1d22dc4450b319207 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 251.89 11.89 30.30 46.67 58.00 59.09 https://github.com/dsyme/visualfsharp.git range1 e49ac8a2f21223e60d0d9597e52ea9e5f8705963 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 252.83 11.66 31.05 47.17 58.80 58.59 https://github.com/Microsoft/visualfsharp master ac9f2af4329d2ae1c4213bb1d22dc4450b319207 ac9f2af4329d2ae1c4213bb1d22dc4450b319207 250.48 11.44 30.93 46.09 57.41 58.86 +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 range1 e49ac8a2f21223e60d0d9597e52ea9e5f8705963 221224e6d20bd835c2b9e01e0a52bf45e740a8d0 MSRC-3617253 275.83 12.79 32.57 53.38 61.94 58.03 +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/dsyme/visualfsharp.git weak1 6be11a0290c689f2331a03fb9762592b24bdacad 95348d0aafd168064d4c2282c59d62ac95bbebdf MSRC-3617253 308.27 10.79 31.51 47.44 58.70 59.71 +https://github.com/Microsoft/visualfsharp master 95348d0aafd168064d4c2282c59d62ac95bbebdf 95348d0aafd168064d4c2282c59d62ac95bbebdf MSRC-3617253 256.40 11.22 32.40 47.49 58.47 59.82 From 7a33c0511016eaa49be8834bf1b9dc188683c8be Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 17 Mar 2018 02:27:34 +0000 Subject: [PATCH 09/24] fix test --- tests/fsharp/tests.fs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs index 163ad8e8cc6..80631821e76 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -237,12 +237,12 @@ module CoreTests = fsc cfg "%s -a -o:lib.dll" cfg.fsc_flags ["lib.fs"] - copyFile (cfg.FSCBinPath ++ "System.ValueTuple.dll") ("." ++ "System.ValueTuple.dll") - //peverify cfg "lib.dll" + 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" + peverify cfg "test.exe" begin use testOkFile = fileguard cfg "test.ok" From c2b02c1d37c34db2af3bf9023aba90cabda0c9ab Mon Sep 17 00:00:00 2001 From: Don Syme Date: Wed, 21 Mar 2018 04:01:18 +0000 Subject: [PATCH 10/24] fix test --- src/fsharp/TypeChecker.fs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fsharp/TypeChecker.fs b/src/fsharp/TypeChecker.fs index 6ddee7e0288..72429dce8d0 100755 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -776,6 +776,12 @@ let UnifyTupleTypeAndInferCharacteristics contextInfo cenv denv m knownTy isExpl tupInfo, ptys else TupInfo.Const 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 From cbb0d514b39ec08488a27fe85203e33f69acf958 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 May 2018 11:32:39 +0100 Subject: [PATCH 11/24] simplify diff --- src/fsharp/IlxGen.fs | 1637 +++++++++++++++++++++--------------------- 1 file changed, 814 insertions(+), 823 deletions(-) diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index a3afe589650..02d9862530c 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -371,24 +371,26 @@ type PtrsOK = | PtrTypesNotOK let rec GenTypeArgAux amap m tyenv tyarg = - GenTypeAuxAux amap m tyenv VoidNotOK PtrTypesNotOK tyarg + GenTypeAux amap m tyenv VoidNotOK PtrTypesNotOK tyarg -and GenTypeArgsAux amap m tyenv tyargs = +and GenTypeArgs amap m tyenv tyargs = List.map (GenTypeArgAux amap m tyenv) (DropErasedTyargs tyargs) -and GenTyAppAux amap m tyenv repr tinst = +and GenTyApp amap m tyenv repr tinst = match repr with | CompiledTypeRepr.ILAsmOpen ty -> - let ilTypeInst = GenTypeArgsAux amap m tyenv tinst + let ilTypeInst = GenTypeArgs amap m tyenv tinst let ty = IL.instILType ilTypeInst ty ty | CompiledTypeRepr.ILAsmNamed (tref, boxity, ilTypeOpt) -> GenILTyAppAux amap m tyenv (tref, boxity, ilTypeOpt) tinst +and GenNamedTyApp amap m tyenv tcref tinst = GenNamedTyAppAux amap m tyenv PtrTypesNotOK tcref tinst + and GenILTyAppAux amap m tyenv (tref, boxity, ilTypeOpt) tinst = match ilTypeOpt with | None -> - let ilTypeInst = GenTypeArgsAux amap m tyenv tinst + let ilTypeInst = GenTypeArgs 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 @@ -404,12 +406,12 @@ and GenNamedTyAppAux (amap:ImportMap) m tyenv ptrsOK tcref tinst = match tcref.TypeReprInfo with // Generate the base type, because that is always the representation of the erased type, unless the assembly is being injected | TProvidedTypeExtensionPoint info when info.IsErased -> - GenTypeAuxAux amap m tyenv VoidNotOK ptrsOK (info.BaseTypeForErased (m,g.obj_ty)) + GenTypeAux amap m tyenv VoidNotOK ptrsOK (info.BaseTypeForErased (m,g.obj_ty)) | _ -> #endif - GenTyAppAux amap m tyenv (GenTyconRef tcref) tinst + GenTyApp amap m tyenv (GenTyconRef tcref) tinst -and GenTypeAuxAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = +and GenTypeAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = let g = amap.g #if DEBUG voidCheck m g voidOK ty @@ -418,7 +420,7 @@ and GenTypeAuxAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = #endif match stripTyEqnsAndMeasureEqns g ty with | TType_app (tcref, tinst) -> GenNamedTyAppAux amap m tyenv ptrsOK tcref tinst - | TType_tuple (tupInfo, args) -> GenTypeAuxAux amap m tyenv VoidNotOK ptrsOK (mkCompiledTupleTy g (evalTupInfoIsStruct tupInfo) args) + | 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 @@ -426,12 +428,12 @@ and GenTypeAuxAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = GenILTyAppAux amap m tyenv (tref, boxity, None) tinst | TType_ucase (ucref, args) -> - let cuspec,idx = GenUnionCaseSpecAux amap m tyenv ucref args + let cuspec,idx = GenUnionCaseSpec amap m tyenv ucref args EraseUnions.GetILTypeForAlternative cuspec idx | TType_forall (tps, tau) -> let tps = DropErasedTypars tps - if tps.IsEmpty then GenTypeAuxAux amap m tyenv VoidNotOK ptrsOK tau + if tps.IsEmpty then GenTypeAux amap m tyenv VoidNotOK ptrsOK tau else EraseClosures.mkILTyFuncTy g.ilxPubCloEnv | TType_var tp -> mkILTyvarTy tyenv.[tp,m] | TType_measure _ -> g.ilg.typ_Int32 @@ -443,7 +445,7 @@ and GenTypeAuxAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = and GenUnionCaseRef (amap: ImportMap) m tyenv i (fspecs:RecdField array) = let g = amap.g fspecs |> Array.mapi (fun j fspec -> - let ilFieldDef = IL.mkILInstanceField(fspec.Name,GenTypeAux amap m tyenv fspec.FormalType, None, ILMemberAccess.Public) + let ilFieldDef = IL.mkILInstanceField(fspec.Name,GenType amap m tyenv fspec.FormalType, None, ILMemberAccess.Public) IlxUnionField { ilFieldDef with // These properties on the "field" of an alternative end up going on a property generated by cu_erase.fs @@ -486,26 +488,26 @@ and ComputeUnionHasHelpers g (tcref : TyconRef) = | _ -> AllHelpers (* not hiddenRepr *) -and GenUnionSpecAux amap m tyenv tcref tyargs = +and GenUnionSpec amap m tyenv tcref tyargs = let curef = GenUnionRef amap m tcref - let tinst = GenTypeArgsAux amap m tyenv tyargs + let tinst = GenTypeArgs amap m tyenv tyargs IlxUnionSpec(curef,tinst) -and GenUnionCaseSpecAux amap m tyenv (ucref:UnionCaseRef) tyargs = - let cuspec = GenUnionSpecAux amap m tyenv ucref.TyconRef tyargs +and GenUnionCaseSpec amap m tyenv (ucref:UnionCaseRef) tyargs = + let cuspec = GenUnionSpec amap m tyenv ucref.TyconRef tyargs cuspec, ucref.Index /// IL void types are only generated for return types -and GenReturnTypeAux amap m tyenv returnTyOpt = +and GenReturnType amap m tyenv returnTyOpt = match returnTyOpt with | None -> ILType.Void - | Some returnTy -> GenTypeAuxAux amap m tyenv VoidNotOK(*1*) PtrTypesOK returnTy (*1: generate void from unit, but not accept void *) + | Some returnTy -> GenTypeAux amap m tyenv VoidNotOK(*1*) PtrTypesOK returnTy (*1: generate void from unit, but not accept void *) -and GenTypeAux amap m tyenv ty = GenTypeAuxAux amap m tyenv VoidNotOK PtrTypesNotOK ty -and GenTypesAux amap m tyenv tys = List.map (GenTypeAux amap m tyenv) tys -and GenParamTypeAux amap m tyenv ty = GenTypeAuxAux amap m tyenv VoidNotOK PtrTypesOK ty -and GenParamTypesAux amap m tyenv tys = tys |> List.map (GenParamTypeAux amap m tyenv) -and GenTypePermitVoidAux amap m tyenv ty = GenTypeAuxAux amap m tyenv VoidOK PtrTypesNotOK ty +and GenType amap m tyenv ty = GenTypeAux amap m tyenv VoidNotOK PtrTypesNotOK ty +and GenTypes amap m tyenv tys = List.map (GenType amap m tyenv) tys +and GenParamType amap m tyenv ty = GenTypeAux amap m tyenv VoidNotOK PtrTypesOK ty +and GenParamTypes amap m tyenv tys = tys |> List.map (GenParamType amap m tyenv) +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 @@ -532,9 +534,9 @@ let GenFieldSpecForStaticField (isInteractive, g, ilContainerTy, vspec:Val, nm, let GenRecdFieldRef m cenv tyenv (rfref:RecdFieldRef) tyargs = let tyenvinner = TypeReprEnv.ForTycon rfref.Tycon - mkILFieldSpecInTy(GenTyAppAux cenv.amap m tyenv rfref.TyconRef.CompiledRepresentation tyargs, + mkILFieldSpecInTy(GenTyApp cenv.amap m tyenv rfref.TyconRef.CompiledRepresentation tyargs, ComputeFieldName rfref.Tycon rfref.RecdField, - GenTypeAux cenv.amap m tyenvinner rfref.RecdField.FormalType) + GenType cenv.amap m tyenvinner rfref.RecdField.FormalType) //-------------------------------------------------------------------------- // Closure summaries @@ -575,827 +577,816 @@ type IlxClosureInfo = //-------------------------------------------------------------------------- -// Generate debugging marks +// Representation of term declarations = Environments for compiling expressions. //-------------------------------------------------------------------------- -let GenILSourceMarker (g: TcGlobals) (m:range) = - ILSourceMarker.Create(document=g.memoize_file m.FileIndex, - line=m.StartLine, - /// NOTE: .NET && VS measure first column as column 1 - column= m.StartColumn+1, - endLine= m.EndLine, - endColumn=m.EndColumn+1) + +[] +type ValStorage = + /// Indicates the value is always null + | Null + /// Indicates the value is stored in a static field. + | StaticField of ILFieldSpec * ValRef * (*hasLiteralAttr:*)bool * ILType * string * ILType * ILMethodRef * ILMethodRef * OptionalShadowLocal + /// Indicates the value is "stored" as a property that recomputes it each time it is referenced. Used for simple constants that do not cause initialization triggers + | StaticProperty of ILMethodSpec * OptionalShadowLocal + /// Indicates the value is "stored" as a IL static method (in a "main" class for a F# + /// compilation unit, or as a member) according to its inferred or specified arity. + | Method of ValReprInfo * ValRef * ILMethodSpec * Range.range * ArgReprInfo list * ArgReprInfo + /// Indicates the value is stored at the given position in the closure environment accessed via "ldarg 0" + | Env of ILType * int * ILFieldSpec * NamedLocalIlxClosureInfo ref option + /// Indicates that the value is an argument of a method being generated + | Arg of int + /// Indicates that the value is stored in local of the method being generated. NamedLocalIlxClosureInfo is normally empty. + /// It is non-empty for 'local type functions', see comments on definition of NamedLocalIlxClosureInfo. + | Local of int * NamedLocalIlxClosureInfo ref option -let GenPossibleILSourceMarker cenv m = - if cenv.opts.generateDebugSymbols then - Some (GenILSourceMarker cenv.g m ) - else - None +and OptionalShadowLocal = + | NoShadowLocal + | ShadowLocal of ValStorage -//-------------------------------------------------------------------------- -// Helpers for merging property definitions -//-------------------------------------------------------------------------- +/// The representation of a NamedLocalClosure is based on a cloinfo. However we can't generate a cloinfo until we've +/// decided the representations of other items in the recursive set. Hence we use two phases to decide representations in +/// a recursive set. Yuck. +and NamedLocalIlxClosureInfo = + | NamedLocalIlxClosureInfoGenerator of (IlxGenEnv -> IlxClosureInfo) + | NamedLocalIlxClosureInfoGenerated of IlxClosureInfo + +and ModuleStorage = + { Vals: Lazy> + SubModules: Lazy> } -let HashRangeSorted (ht: IDictionary<_, (int * _)>) = - [ for KeyValue(_k,v) in ht -> v ] |> List.sortBy fst |> List.map snd +/// BranchCallItems are those where a call to the value can be implemented as +/// a branch. At the moment these are only used for generating branch calls back to +/// the entry label of the method currently being generated. +and BranchCallItem = + | BranchCallClosure of ArityInfo + | BranchCallMethod of + // Argument counts for compiled form of F# method or value + ArityInfo * + // Arg infos for compiled form of F# method or value + (TType * ArgReprInfo) list list * + // Typars for F# method or value + Tast.Typars * + // Typars for F# method or value + int * + // num obj args + int + +and Mark = + | Mark of ILCodeLabel (* places we can branch to *) + member x.CodeLabel = (let (Mark(lab)) = x in lab) -let MergeOptions m o1 o2 = - match o1,o2 with - | Some x, None | None, Some x -> Some x - | None, None -> None - | Some x, Some _ -> -#if DEBUG - // This warning fires on some code that also triggers this warning: - // warning(Error("The implementation of a specified generic interface required a method implementation not fully supported by F# Interactive. In the unlikely event that the resulting class fails to load then compile the interface type into a statically-compiled DLL and reference it using '#r'",m)) - // The code is OK so we don't print this. - errorR(InternalError("MergeOptions: two values given",m)) -#else - ignore m -#endif - Some x +and IlxGenEnv = + { tyenv: TypeReprEnv + someTypeInThisAssembly: ILType + isFinalFile: bool + /// Where to place the stuff we're currently generating + cloc: CompileLocation + /// Hiding information down the signature chain, used to compute what's public to the assembly + sigToImplRemapInfo: (Remap * SignatureHidingInfo) list + /// All values in scope + valsInScope: ValMap> + /// For optimizing direct tail recursion to a loop - mark says where to branch to. Length is 0 or 1. + /// REVIEW: generalize to arbitrary nested local loops?? + innerVals: (ValRef * (BranchCallItem * Mark)) list + /// Full list of enclosing bound values. First non-compiler-generated element is used to help give nice names for closures and other expressions. + letBoundVars: ValRef list + /// The set of IL local variable indexes currently in use by lexically scoped variables, to allow reuse on different branches. + /// Really an integer set. + liveLocals: IntMap + /// Are we under the scope of a try, catch or finally? If so we can't tailcall. SEH = structured exception handling + withinSEH: bool } -let MergePropertyPair m (pd: ILPropertyDef) pdef = - {pd with GetMethod=MergeOptions m pd.GetMethod pdef.GetMethod - SetMethod=MergeOptions m pd.SetMethod pdef.SetMethod} +let ReplaceTyenv tyenv (eenv: IlxGenEnv) = {eenv with tyenv = tyenv } +let EnvForTypars tps eenv = {eenv with tyenv = TypeReprEnv.ForTypars tps } +let AddTyparsToEnv typars (eenv: IlxGenEnv) = {eenv with tyenv = eenv.tyenv.Add typars} -type PropKey = PropKey of string * ILTypes * ILThisConvention +let AddSignatureRemapInfo _msg (rpi, mhi) eenv = + { eenv with sigToImplRemapInfo = (mkRepackageRemapping rpi,mhi) :: eenv.sigToImplRemapInfo } + +//-------------------------------------------------------------------------- +// Print eenv +//-------------------------------------------------------------------------- -let AddPropertyDefToHash (m:range) (ht:Dictionary) (pdef: ILPropertyDef) = - let nm = PropKey(pdef.Name, pdef.Args, pdef.CallingConv) - if ht.ContainsKey nm then - let idx,pd = ht.[nm] - ht.[nm] <- (idx, MergePropertyPair m pd pdef) +let OutputStorage (pps: TextWriter) s = + match s with + | StaticField _ -> pps.Write "(top)" + | StaticProperty _ -> pps.Write "(top)" + | Method _ -> pps.Write "(top)" + | Local _ -> pps.Write "(local)" + | Arg _ -> pps.Write "(arg)" + | Env _ -> pps.Write "(env)" + | Null -> pps.Write "(null)" + +//-------------------------------------------------------------------------- +// Augment eenv with values +//-------------------------------------------------------------------------- + +let AddStorageForVal (g: TcGlobals) (v,s) eenv = + let eenv = { eenv with valsInScope = eenv.valsInScope.Add v s } + // If we're compiling fslib then also bind the value as a non-local path to + // allow us to resolve the compiler-non-local-references that arise from env.fs + // + // Do this by generating a fake "looking from the outside in" non-local value reference for + // v, dereferencing it to find the corresponding signature Val, and adding an entry for the signature val. + // + // A similar code path exists in ilxgen.fs for the tables of "optimization data" for values + if g.compilingFslib then + // Passing an empty remap is sufficient for FSharp.Core.dll because it turns out the remapped type signature can + // still be resolved. + match tryRescopeVal g.fslibCcu Remap.Empty v with + | None -> eenv + | Some vref -> + match vref.TryDeref with + | VNone -> + //let msg = sprintf "could not dereference external value reference to something in FSharp.Core.dll during code generation, v.MangledName = '%s', v.Range = %s" v.MangledName (stringOfRange v.Range) + //System.Diagnostics.Debug.Assert(false, msg) + eenv + | VSome gv -> + { eenv with valsInScope = eenv.valsInScope.Add gv s } else - ht.[nm] <- (ht.Count, pdef) - + eenv -/// Merge a whole group of properties all at once -let MergePropertyDefs m ilPropertyDefs = - let ht = new Dictionary<_,_>(3,HashIdentity.Structural) - ilPropertyDefs |> List.iter (AddPropertyDefToHash m ht) - HashRangeSorted ht +let AddStorageForLocalVals g vals eenv = List.foldBack (fun (v,s) acc -> AddStorageForVal g (v,notlazy s) acc) vals eenv //-------------------------------------------------------------------------- -// Buffers for compiling modules. The entire assembly gets compiled via an AssemblyBuilder +// Lookup eenv //-------------------------------------------------------------------------- + +open Microsoft.FSharp.Compiler.AbstractIL +open Microsoft.FSharp.Compiler.AbstractIL.Internal +open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -/// Information collected imperatively for each type definition -type TypeDefBuilder(tdef, tdefDiscards) = - let gmethods = new ResizeArray(0) - let gfields = new ResizeArray(0) - let gproperties : Dictionary = new Dictionary<_,_>(3,HashIdentity.Structural) - let gevents = new ResizeArray(0) - let gnested = new TypeDefsBuilder() - - member b.Close() = - { tdef with - Methods = mkILMethods (tdef.Methods.AsList @ ResizeArray.toList gmethods) - Fields = mkILFields (tdef.Fields.AsList @ ResizeArray.toList gfields) - Properties = mkILProperties (tdef.Properties.AsList @ HashRangeSorted gproperties ) - Events = mkILEvents (tdef.Events.AsList @ ResizeArray.toList gevents) - NestedTypes = mkILTypeDefs (tdef.NestedTypes.AsList @ gnested.Close()) } +let StorageForVal m v eenv = + let v = + try eenv.valsInScope.[v] + with :? KeyNotFoundException -> + assert false + errorR(Error(FSComp.SR.ilUndefinedValue(showL(vspecAtBindL v)),m)) + notlazy (Arg 668(* random value for post-hoc diagnostic analysis on generated tree *) ) + v.Force() +let StorageForValRef m (v: ValRef) eenv = StorageForVal m v.Deref eenv - member b.AddEventDef(edef) = gevents.Add edef - member b.AddFieldDef(ilFieldDef) = gfields.Add ilFieldDef - member b.AddMethodDef(ilMethodDef) = - let discard = - match tdefDiscards with - | Some (mdefDiscard, _) -> mdefDiscard ilMethodDef - | None -> false - if not discard then - gmethods.Add ilMethodDef - member b.NestedTypeDefs = gnested - member b.GetCurrentFields() = gfields |> Seq.readonly +//-------------------------------------------------------------------------- +// Imported modules and the environment +// +// How a top level value is represented depends on its type. If it's a +// function or is polymorphic, then it gets represented as a +// method (possibly and instance method). Otherwise it gets represented as a +// static field. +//-------------------------------------------------------------------------- - /// Merge Get and Set property nodes, which we generate independently for F# code - /// when we come across their corresponding methods. - member b.AddOrMergePropertyDef(pdef,m) = - let discard = - match tdefDiscards with - | Some (_, pdefDiscard) -> pdefDiscard pdef - | None -> false - if not discard then - AddPropertyDefToHash m gproperties pdef +let IsValRefIsDllImport g (vref:ValRef) = + vref.Attribs |> HasFSharpAttributeOpt g g.attrib_DllImportAttribute - member b.PrependInstructionsToSpecificMethodDef(cond,instrs,tag) = - match ResizeArray.tryFindIndex cond gmethods with - | Some idx -> gmethods.[idx] <- prependInstrsToMethod instrs gmethods.[idx] - | None -> gmethods.Add(mkILClassCtor (mkMethodBody (false,[],1,nonBranchingInstrsToCode instrs,tag))) +let GetMethodSpecForMemberVal amap g (memberInfo:ValMemberInfo) (vref:ValRef) = + let m = vref.Range + let tps,curriedArgInfos,returnTy,retInfo = + assert(vref.ValReprInfo.IsSome) + GetTopValTypeInCompiledForm g (Option.get vref.ValReprInfo) vref.Type m + let tyenvUnderTypars = TypeReprEnv.ForTypars tps + let flatArgInfos = List.concat curriedArgInfos + let isCtor = (memberInfo.MemberFlags.MemberKind = MemberKind.Constructor) + let cctor = (memberInfo.MemberFlags.MemberKind = MemberKind.ClassConstructor) + let parentTcref = vref.TopValDeclaringEntity + let parentTypars = parentTcref.TyparsNoRange + let numParentTypars = parentTypars.Length + if tps.Length < numParentTypars then error(InternalError("CodeGen check: type checking did not ensure that this method is sufficiently generic", m)) + let ctps,mtps = List.chop numParentTypars tps + let isCompiledAsInstance = ValRefIsCompiledAsInstanceMember g vref + let ilActualRetTy = + let ilRetTy = GenReturnType amap m tyenvUnderTypars returnTy + if isCtor || cctor then ILType.Void else ilRetTy -and TypeDefsBuilder() = - let tdefs : Internal.Utilities.Collections.HashMultiMap = HashMultiMap(0, HashIdentity.Structural) - let mutable countDown = System.Int32.MaxValue + let ilTy = GenType amap m tyenvUnderTypars (mkAppTy parentTcref (List.map mkTyparTy ctps)) - member b.Close() = - //The order we emit type definitions is not deterministic since it is using the reverse of a range from a hash table. We should use an approximation of source order. - // Ideally it shouldn't matter which order we use. - // However, for some tests FSI generated code appears sensitive to the order, especially for nested types. - - [ for (b, eliminateIfEmpty) in HashRangeSorted tdefs do - let tdef = b.Close() - // Skip the type if it is empty - if not eliminateIfEmpty - || not tdef.NestedTypes.AsList.IsEmpty - || not tdef.Fields.AsList.IsEmpty - || not tdef.Events.AsList.IsEmpty - || not tdef.Properties.AsList.IsEmpty - || not tdef.Methods.AsList.IsEmpty then - yield tdef ] - - member b.FindTypeDefBuilder(nm) = - try tdefs.[nm] |> snd |> fst - with :? KeyNotFoundException -> failwith ("FindTypeDefBuilder: " + nm + " not found") - - member b.FindNestedTypeDefsBuilder(path) = - List.fold (fun (acc:TypeDefsBuilder) x -> acc.FindTypeDefBuilder(x).NestedTypeDefs) b path - - member b.FindNestedTypeDefBuilder(tref:ILTypeRef) = - b.FindNestedTypeDefsBuilder(tref.Enclosing).FindTypeDefBuilder(tref.Name) - - member b.AddTypeDef(tdef:ILTypeDef, eliminateIfEmpty, addAtEnd, tdefDiscards) = - 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, 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 : Dictionary = Dictionary(HashIdentity.Reference) - let mutable extraBindingsToGenerate = [] - - // A memoization table for generating value types for big constant arrays - let rawDataValueTypeGenerator = - new MemoizationTable<(CompileLocation * int) , ILTypeSpec> - ((fun (cloc,size) -> - let name = CompilerGeneratedName ("T" + string(newUnique()) + "_" + string size + "Bytes") // Type names ending ...$T_37Bytes - let vtdef = mkRawDataValueTypeDef cenv.g.iltyp_ValueType (name,size,0us) - let vtref = NestedTypeRefForCompLoc cloc vtdef.Name - let vtspec = mkILTySpec(vtref,[]) - let vtdef = vtdef.WithAccess(ComputeTypeAccess vtref true) - mgbuf.AddTypeDef(vtref, vtdef, false, true, None) - vtspec), - keyComparer=HashIdentity.Structural) + if isCompiledAsInstance || isCtor then + // Find the 'this' argument type if any + let thisTy,flatArgInfos = + if isCtor then (GetFSharpViewOfReturnType g returnTy),flatArgInfos + else + match flatArgInfos with + | [] -> error(InternalError("This instance method '" + vref.LogicalName + "' has no arguments", m)) + | (h,_):: t -> h,t - let generateAnonType genToStringMethod (isStruct, ilTypeRef, nms) = + let thisTy = if isByrefTy g thisTy then destByrefTy g thisTy else thisTy + let thisArgTys = argsOfAppTy g thisTy + if ctps.Length <> thisArgTys.Length then + warning(InternalError(sprintf "CodeGen check: type checking did not quantify the correct number of type variables for this method, #parentTypars = %d, #ctps = %d, #mtps = %d, #thisArgTys = %d" numParentTypars ctps.Length mtps.Length thisArgTys.Length,m)) + else + List.iter2 + (fun gtp ty2 -> + if not (typeEquiv g (mkTyparTy gtp) ty2) then + warning(InternalError("CodeGen check: type checking did not quantify the correct type variables for this method: generalization list contained " + gtp.Name + "#" + string gtp.Stamp + " and list from 'this' pointer contained " + (showL(typeL ty2)), m))) + ctps + thisArgTys + let methodArgTys,paramInfos = List.unzip flatArgInfos + let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars methodArgTys + let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy mtps) + let mspec = mkILInstanceMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - 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 - CustomAttrs = emptyILCustomAttrs - HasReferenceTypeConstraint=false - HasNotNullableValueTypeConstraint=false - HasDefaultConstructorConstraint= false } ] - - 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 -> - { Name = propName - Attributes = PropertyAttributes.None - SetMethod = None - GetMethod = Some(mkILMethRef(ilTypeRef,ILCallingConv.Instance,"get_" + propName,0,[],fldTy )) - CallingConv = ILCallingConv.Instance.ThisConv - Type = 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 ] + mspec,ctps,mtps,paramInfos,retInfo + else + let methodArgTys,paramInfos = List.unzip flatArgInfos + let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars methodArgTys + let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy mtps) + let mspec = mkILStaticMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) + + mspec,ctps,mtps,paramInfos,retInfo - 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) |] +// Generate the ILFieldSpec for a top-level value - if ilTypeRef.Scope.IsLocalRef then +let ComputeFieldSpecForVal(optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, isInteractive, g, ilTyForProperty, vspec:Val, nm, m, cloc, ilTy, ilGetterMethRef) = + assert vspec.IsCompiledAsTopLevel + let generate() = GenFieldSpecForStaticField (isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy) + match optIntraAssemblyInfo with + | None -> generate() + | Some intraAssemblyInfo -> + if vspec.IsMutable && vspec.IsCompiledAsTopLevel && isStructTy g vspec.Type then + let ok, res = intraAssemblyInfo.StaticFieldInfo.TryGetValue ilGetterMethRef + if ok then + res + else + let res = generate() + intraAssemblyInfo.StaticFieldInfo.[ilGetterMethRef] <- res + res + else + generate() - // 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 IsValCompiledAsMethod g (v:Val) = + match v.ValReprInfo with + | None -> false + | Some topValInfo -> + not (isUnitTy g v.Type && not v.IsMemberOrModuleBinding && not v.IsMutable) && + not v.IsCompiledAsStaticPropertyWithoutField && + match GetTopValTypeInFSharpForm g topValInfo v.Type v.Range with + | [],[],_,_ when not v.IsMember -> false + | _ -> 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) +// This called via 2 routes. +// (a) ComputeAndAddStorageForLocalTopVal +// (b) ComputeStorageForNonLocalTopVal +// +/// This function decides the storage for the val. +/// The decision is based on arityInfo. +let ComputeStorageForTopVal (amap, g, optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, isInteractive, optShadowLocal, vref:ValRef, cloc) = - if isStruct then - tycon.SetIsStructRecordOrUnion(true) + if isUnitTy g vref.Type && not vref.IsMemberOrModuleBinding && not vref.IsMutable then + Null + else + let topValInfo = + match vref.ValReprInfo with + | None -> error(InternalError("ComputeStorageForTopVal: no arity found for " + showL(valRefL vref),vref.Range)) + | Some a -> a + + let m = vref.Range + let nm = vref.CompiledName - 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 ]) + if vref.Deref.IsCompiledAsStaticPropertyWithoutField then + let nm = "get_"+nm + let tyenvUnderTypars = TypeReprEnv.ForTypars [] + let ilRetTy = GenType amap m tyenvUnderTypars vref.Type + let typ = mkILTyForCompLoc cloc + let mspec = mkILStaticMethSpecInTy (typ, nm, [], ilRetTy, []) + + StaticProperty (mspec, optShadowLocal) + else - 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) ] + // Determine when a static field is required. + // + // REVIEW: This call to GetTopValTypeInFSharpForm is only needed to determine if this is a (type) function or a value + // We should just look at the arity + match GetTopValTypeInFSharpForm g topValInfo vref.Type vref.Range with + | [],[], returnTy,_ when not vref.IsMember -> + // Mutable and literal static fields must have stable names and live in the "public" location + // See notes on GenFieldSpecForStaticField above. + let vspec = vref.Deref + let ilTy = GenType amap m TypeReprEnv.Empty returnTy (* TypeReprEnv.Empty ok: not a field in a generic class *) + let ilTyForProperty = mkILTyForCompLoc cloc + let attribs = vspec.Attribs + let hasLiteralAttr = HasFSharpAttribute g g.attrib_LiteralAttribute attribs - 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 + let ilTypeRefForProperty = ilTyForProperty.TypeRef + let ilGetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "get_"+nm, 0, [], ilTy) + let ilSetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "set_"+nm, 0, [ilTy], ILType.Void) - tcaug.SetCompare (mkLocalValRef cvspec1, mkLocalValRef cvspec2) - tcaug.SetCompareWith (mkLocalValRef cvspec3) - tcaug.SetEquals (mkLocalValRef vspec1, mkLocalValRef vspec2) - tcaug.SetHashAndEqualsWith (mkLocalValRef evspec1, mkLocalValRef evspec2, mkLocalValRef evspec3) + let fspec = ComputeFieldSpecForVal(optIntraAssemblyInfo, isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy, ilGetterMethRef) - // Build the ILTypeDef. We don't rely on the normal record generation process because we want very specific field names + StaticField (fspec, vref, hasLiteralAttr, ilTyForProperty, nm, ilTy, ilGetterMethRef, ilSetterMethRef, optShadowLocal) + + | _ -> + match vref.MemberInfo with + | Some memberInfo when not vref.IsExtensionMember -> + let mspec,_,_,paramInfos,retInfo = GetMethodSpecForMemberVal amap g memberInfo vref + Method (topValInfo, vref, mspec, m, paramInfos, retInfo) + | _ -> + let (tps, curriedArgInfos, returnTy, retInfo) = GetTopValTypeInCompiledForm g topValInfo vref.Type m + let tyenvUnderTypars = TypeReprEnv.ForTypars tps + let (methodArgTys,paramInfos) = curriedArgInfos |> List.concat |> List.unzip + let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars methodArgTys + let ilRetTy = GenReturnType amap m tyenvUnderTypars returnTy + let ilLocTy = mkILTyForCompLoc cloc + let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy tps) + let mspec = mkILStaticMethSpecInTy (ilLocTy, nm, ilMethodArgTys, ilRetTy, ilMethodInst) + Method (topValInfo, vref, mspec, m, paramInfos, retInfo) - let ilTypeDefAttribs = mkILCustomAttrs [ cenv.g.CompilerGeneratedAttribute; mkCompilationMappingAttr cenv.g (int SourceConstructFlags.RecordType) ] +let ComputeAndAddStorageForLocalTopVal (amap, g, intraAssemblyFieldTable, isInteractive, optShadowLocal) cloc (v:Val) eenv = + let storage = ComputeStorageForTopVal (amap, g, Some intraAssemblyFieldTable, isInteractive, optShadowLocal, mkLocalValRef v, cloc) + AddStorageForVal g (v,notlazy storage) eenv - let ilInterfaceTys = [ for (ity,_,_) in tcaug.tcaug_interfaces -> GenTypeAux cenv.amap m (TypeReprEnv.ForTypars tps) ity ] +let ComputeStorageForNonLocalTopVal amap g cloc modref (v:Val) = + match v.ValReprInfo with + | None -> error(InternalError("ComputeStorageForNonLocalTopVal, expected an arity for " + v.LogicalName,v.Range)) + | Some _ -> ComputeStorageForTopVal (amap, g, None, false, NoShadowLocal, mkNestedValRef modref v, cloc) - let ilTypeDef = - mkILGenericClass (ilTypeRef.Name, ILTypeDefAccess.Public, ilGenericParams, ilBaseTy, ilInterfaceTys, - mkILMethods (ilCtorDef :: ilMethods), ilFieldDefs, emptyILTypeDefs, - ilProperties, mkILEvents [], ilTypeDefAttribs, - ILTypeInit.BeforeField) - +let rec ComputeStorageForNonLocalModuleOrNamespaceRef amap g cloc acc (modref:ModuleOrNamespaceRef) (modul:ModuleOrNamespace) = + let acc = + (acc, modul.ModuleOrNamespaceType.ModuleAndNamespaceDefinitions) ||> List.fold (fun acc smodul -> + ComputeStorageForNonLocalModuleOrNamespaceRef amap g (CompLocForSubModuleOrNamespace cloc smodul) acc (modref.NestedTyconRef smodul) smodul) - let ilTypeDef = ilTypeDef.WithSealed(true).WithSerializable(true) + let acc = + (acc, modul.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> + AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc modref v)) acc) + acc - let ilTypeDef = { ilTypeDef with MethodImpls=mkILMethodImpls [] } - - 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 ComputeStorageForExternalCcu amap g eenv (ccu:CcuThunk) = + if not ccu.IsFSharp then eenv else + let cloc = CompLocForCcu ccu + let eenv = + List.foldBack + (fun smodul acc -> + let cloc = CompLocForSubModuleOrNamespace cloc smodul + let modref = mkNonLocalCcuRootEntityRef ccu smodul + ComputeStorageForNonLocalModuleOrNamespaceRef amap g cloc acc modref smodul) + ccu.RootModulesAndNamespaces + eenv + let eenv = + let eref = ERefNonLocalPreResolved ccu.Contents (mkNonLocalEntityRef ccu [| |]) + (eenv, ccu.Contents.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> + AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc eref v)) acc) + eenv + +let rec AddBindingsForLocalModuleType allocVal cloc eenv (mty:ModuleOrNamespaceType) = + let eenv = List.fold (fun eenv submodul -> AddBindingsForLocalModuleType allocVal (CompLocForSubModuleOrNamespace cloc submodul) eenv submodul.ModuleOrNamespaceType) eenv mty.ModuleAndNamespaceDefinitions + let eenv = Seq.fold (fun eenv v -> allocVal cloc v eenv) eenv mty.AllValsAndMembers + eenv - let optimizedExtraBindings = extraBindings |> List.map (fun (TBind(a,b,c)) -> TBind(a,cenv.optimizeDuringCodeGen b,c)) +let AddExternalCcusToIlxGenEnv amap g eenv ccus = List.fold (ComputeStorageForExternalCcu amap g) eenv ccus - extraBindingsToGenerate <- optimizedExtraBindings @ extraBindingsToGenerate +let AddBindingsForTycon allocVal (cloc:CompileLocation) (tycon:Tycon) eenv = + let unrealizedSlots = + if tycon.IsFSharpObjectModelTycon + then tycon.FSharpObjectModelTypeInfo.fsobjmodel_vslots + else [] + (eenv,unrealizedSlots) ||> List.fold (fun eenv vref -> allocVal cloc vref.Deref eenv) - (ilCtorRef,ilMethodRefs,ilTy) +let rec AddBindingsForModuleDefs allocVal (cloc:CompileLocation) eenv mdefs = + List.fold (AddBindingsForModuleDef allocVal cloc) eenv mdefs - let mutable explicitEntryPointInfo : ILTypeRef option = None +and AddBindingsForModuleDef allocVal cloc eenv x = + match x with + | TMDefRec(_isRec,tycons,mbinds,_) -> + (* Virtual don't have 'let' bindings and must be added to the environment *) + let eenv = List.foldBack (AddBindingsForTycon allocVal cloc) tycons eenv + let eenv = List.foldBack (AddBindingsForModule allocVal cloc) mbinds eenv + eenv + | TMDefLet(bind,_) -> + allocVal cloc bind.Var eenv + | TMDefDo _ -> + eenv + | TMAbstract(ModuleOrNamespaceExprWithSig(mtyp,_,_)) -> + AddBindingsForLocalModuleType allocVal cloc eenv mtyp + | TMDefs(mdefs) -> + AddBindingsForModuleDefs allocVal cloc eenv mdefs - /// static init fields on script modules. - let mutable scriptInitFspecs : (ILFieldSpec * range) list = [] - - member mgbuf.AddScriptInitFieldSpec(fieldSpec,range) = - scriptInitFspecs <- (fieldSpec,range) :: scriptInitFspecs +and AddBindingsForModule allocVal cloc x eenv = + match x with + | ModuleOrNamespaceBinding.Binding bind -> + allocVal cloc bind.Var eenv + | ModuleOrNamespaceBinding.Module (mspec, mdef) -> + let cloc = + if mspec.IsNamespace then cloc + else CompLocForFixedModule cloc.clocQualifiedNameOfFile cloc.clocTopImplQualifiedName mspec - /// This initializes the script in #load and fsc command-line order causing their - /// sideeffects to be executed. - member mgbuf.AddInitializeScriptsInOrderToEntryPoint() = - // Get the entry point and initialized any scripts in order. - match explicitEntryPointInfo with - | Some tref -> - let IntializeCompiledScript(fspec,m) = - mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.IsEntryPoint), tref, fspec, GenPossibleILSourceMarker cenv m, [], []) - scriptInitFspecs |> List.iter IntializeCompiledScript - | None -> () + AddBindingsForModuleDef allocVal cloc eenv mdef - 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 - rawDataValueTypeGenerator.Apply((cloc,size)) +and AddBindingsForModuleTopVals _g allocVal _cloc eenv vs = + List.foldBack allocVal vs eenv - 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 +// Put the partial results for a generated fragment (i.e. a part of a CCU generated by FSI) +// into the stored results for the whole CCU. +// isIncrementalFragment = true --> "typed input" +// isIncrementalFragment = false --> "#load" +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, _, _, _)) -> + let cloc = { cloc with clocTopImplQualifiedName = qname.Text } + if isIncrementalFragment then + match mexpr with + | ModuleOrNamespaceExprWithSig(_,mdef,_) -> AddBindingsForModuleDef allocVal cloc eenv mdef + (* | ModuleOrNamespaceExprWithSig(mtyp,_,m) -> error(Error("don't expect inner defs to have a constraint",m)) *) + else + AddBindingsForLocalModuleType allocVal cloc eenv mexpr.Type) - member mgbuf.GrabExtraBindingsToGenerate() = - let result = extraBindingsToGenerate - extraBindingsToGenerate <- [] - result +//-------------------------------------------------------------------------- +// Generate debugging marks +//-------------------------------------------------------------------------- - member mgbuf.AddTypeDef(tref:ILTypeRef, tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) = - gtdefs.FindNestedTypeDefsBuilder(tref.Enclosing).AddTypeDef(tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) +let GenILSourceMarker (g: TcGlobals) (m:range) = + ILSourceMarker.Create(document=g.memoize_file m.FileIndex, + line=m.StartLine, + /// NOTE: .NET && VS measure first column as column 1 + column= m.StartColumn+1, + endLine= m.EndLine, + endColumn=m.EndColumn+1) - member mgbuf.GetCurrentFields(tref:ILTypeRef) = - gtdefs.FindNestedTypeDefBuilder(tref).GetCurrentFields() +let GenPossibleILSourceMarker cenv m = + if cenv.opts.generateDebugSymbols then + Some (GenILSourceMarker cenv.g m ) + else + None - member mgbuf.AddReflectedDefinition(vspec : Tast.Val,expr) = - // preserve order by storing index of item - let n = reflectedDefinitions.Count - reflectedDefinitions.Add(vspec, (vspec.CompiledName, n, expr)) - - member mgbuf.ReplaceNameOfReflectedDefinition(vspec, newName) = - match reflectedDefinitions.TryGetValue vspec with - | true, (name, n, expr) when name <> newName -> reflectedDefinitions.[vspec] <- (newName, n, expr) - | _ -> () +//-------------------------------------------------------------------------- +// Helpers for merging property definitions +//-------------------------------------------------------------------------- - member mgbuf.AddMethodDef(tref:ILTypeRef,ilMethodDef) = - gtdefs.FindNestedTypeDefBuilder(tref).AddMethodDef(ilMethodDef) - if ilMethodDef.IsEntryPoint then - explicitEntryPointInfo <- Some(tref) +let HashRangeSorted (ht: IDictionary<_, (int * _)>) = + [ for KeyValue(_k,v) in ht -> v ] |> List.sortBy fst |> List.map snd - member mgbuf.AddExplicitInitToSpecificMethodDef(cond,tref,fspec,sourceOpt,feefee,seqpt) = - // Authoring a .cctor with effects forces the cctor for the 'initialization' module by doing a dummy store & load of a field - // Doing both a store and load keeps FxCop happier because it thinks the field is useful - let instrs = - [ yield! (if condition "NO_ADD_FEEFEE_TO_CCTORS" then [] elif condition "ADD_SEQPT_TO_CCTORS" then seqpt else feefee) // mark start of hidden code - yield mkLdcInt32 0 - yield mkNormalStsfld fspec - yield mkNormalLdsfld fspec - yield AI_pop] - gtdefs.FindNestedTypeDefBuilder(tref).PrependInstructionsToSpecificMethodDef(cond,instrs,sourceOpt) +let MergeOptions m o1 o2 = + match o1,o2 with + | Some x, None | None, Some x -> Some x + | None, None -> None + | Some x, Some _ -> +#if DEBUG + // This warning fires on some code that also triggers this warning: + // warning(Error("The implementation of a specified generic interface required a method implementation not fully supported by F# Interactive. In the unlikely event that the resulting class fails to load then compile the interface type into a statically-compiled DLL and reference it using '#r'",m)) + // The code is OK so we don't print this. + errorR(InternalError("MergeOptions: two values given",m)) +#else + ignore m +#endif + Some x - member mgbuf.AddEventDef(tref,edef) = - gtdefs.FindNestedTypeDefBuilder(tref).AddEventDef(edef) +let MergePropertyPair m (pd: ILPropertyDef) pdef = + {pd with GetMethod=MergeOptions m pd.GetMethod pdef.GetMethod + SetMethod=MergeOptions m pd.SetMethod pdef.SetMethod} - member mgbuf.AddFieldDef(tref,ilFieldDef) = - gtdefs.FindNestedTypeDefBuilder(tref).AddFieldDef(ilFieldDef) +type PropKey = PropKey of string * ILTypes * ILThisConvention - member mgbuf.AddOrMergePropertyDef(tref,pdef,m) = - gtdefs.FindNestedTypeDefBuilder(tref).AddOrMergePropertyDef(pdef,m) +let AddPropertyDefToHash (m:range) (ht:Dictionary) (pdef: ILPropertyDef) = + let nm = PropKey(pdef.Name, pdef.Args, pdef.CallingConv) + if ht.ContainsKey nm then + let idx,pd = ht.[nm] + ht.[nm] <- (idx, MergePropertyPair m pd pdef) + else + ht.[nm] <- (ht.Count, pdef) + - member mgbuf.Close() = - // old implementation adds new element to the head of list so result was accumulated in reversed order - let orderedReflectedDefinitions = - [for (KeyValue(vspec, (name, n, expr))) in reflectedDefinitions -> n, ((name,vspec), expr)] - |> List.sortBy (fst >> (~-)) // invert the result to get 'order-by-descending' behavior (items in list are 0..* so we don't need to worry about int.MinValue) - |> List.map snd - gtdefs.Close(), orderedReflectedDefinitions - member mgbuf.cenv = cenv - member mgbuf.GetExplicitEntryPointInfo() = explicitEntryPointInfo +/// Merge a whole group of properties all at once +let MergePropertyDefs m ilPropertyDefs = + let ht = new Dictionary<_,_>(3,HashIdentity.Structural) + ilPropertyDefs |> List.iter (AddPropertyDefToHash m ht) + HashRangeSorted ht -/// Type generators which walk the types first to make sure all anonymous types are generated -let GenType cenv m tyenv ty = GenTypeAux cenv.amap m tyenv ty -let GenTypes cenv m tyenv tys = GenTypesAux cenv.amap m tyenv tys -let GenUnionCaseSpec cenv m tyenv c tyargs = GenUnionCaseSpecAux cenv.amap m tyenv c tyargs -let GenUnionSpec cenv m tyenv tcref tyargs = GenUnionSpecAux cenv.amap m tyenv tcref tyargs -let GenTypePermitVoid cenv m tyenv ty = GenTypeAuxAux cenv.amap m tyenv VoidOK PtrTypesNotOK ty -let GenTypesPermitVoid cenv m tyenv tys = List.map (GenTypePermitVoid cenv m tyenv) tys -let GenTyApp cenv m tyenv repr tyargs = GenTyAppAux cenv.amap m tyenv repr tyargs -let GenNamedTyApp cenv m tyenv tcref tinst = GenNamedTyAppAux cenv.amap m tyenv PtrTypesNotOK tcref tinst -let GenReturnType cenv m tyenv returnTyOpt = GenReturnTypeAux cenv.amap m tyenv returnTyOpt -let GenParamType cenv m tyenv ty = GenParamTypeAux cenv.amap m tyenv ty -let GenParamTypes cenv m tyenv tys = GenParamTypesAux cenv.amap m tyenv tys -let GenTypeArgs cenv m tyenv tyargs = GenTypeArgsAux cenv.amap m tyenv tyargs -let GenExnType amap m tyenv (ecref:TyconRef) = GenTyAppAux amap m tyenv ecref.CompiledRepresentation [] - //-------------------------------------------------------------------------- -// Representation of term declarations = Environments for compiling expressions. +// Buffers for compiling modules. The entire assembly gets compiled via an AssemblyBuilder //-------------------------------------------------------------------------- - -[] -type ValStorage = - /// Indicates the value is always null - | Null - /// Indicates the value is stored in a static field. - | StaticField of ILFieldSpec * ValRef * (*hasLiteralAttr:*)bool * ILType * string * ILType * ILMethodRef * ILMethodRef * OptionalShadowLocal - /// Indicates the value is "stored" as a property that recomputes it each time it is referenced. Used for simple constants that do not cause initialization triggers - | StaticProperty of ILMethodSpec * OptionalShadowLocal - /// Indicates the value is "stored" as a IL static method (in a "main" class for a F# - /// compilation unit, or as a member) according to its inferred or specified arity. - | Method of ValReprInfo * ValRef * ILMethodSpec * Range.range * ArgReprInfo list * ArgReprInfo - /// Indicates the value is stored at the given position in the closure environment accessed via "ldarg 0" - | Env of ILType * int * ILFieldSpec * NamedLocalIlxClosureInfo ref option - /// Indicates that the value is an argument of a method being generated - | Arg of int - /// Indicates that the value is stored in local of the method being generated. NamedLocalIlxClosureInfo is normally empty. - /// It is non-empty for 'local type functions', see comments on definition of NamedLocalIlxClosureInfo. - | Local of int * NamedLocalIlxClosureInfo ref option +/// Information collected imperatively for each type definition +type TypeDefBuilder(tdef, tdefDiscards) = + let gmethods = new ResizeArray(0) + let gfields = new ResizeArray(0) + let gproperties : Dictionary = new Dictionary<_,_>(3,HashIdentity.Structural) + let gevents = new ResizeArray(0) + let gnested = new TypeDefsBuilder() + + member b.Close() = + { tdef with + Methods = mkILMethods (tdef.Methods.AsList @ ResizeArray.toList gmethods) + Fields = mkILFields (tdef.Fields.AsList @ ResizeArray.toList gfields) + Properties = mkILProperties (tdef.Properties.AsList @ HashRangeSorted gproperties ) + Events = mkILEvents (tdef.Events.AsList @ ResizeArray.toList gevents) + NestedTypes = mkILTypeDefs (tdef.NestedTypes.AsList @ gnested.Close()) } -and OptionalShadowLocal = - | NoShadowLocal - | ShadowLocal of ValStorage -/// The representation of a NamedLocalClosure is based on a cloinfo. However we can't generate a cloinfo until we've -/// decided the representations of other items in the recursive set. Hence we use two phases to decide representations in -/// a recursive set. Yuck. -and NamedLocalIlxClosureInfo = - | NamedLocalIlxClosureInfoGenerator of (IlxGenEnv -> IlxClosureInfo) - | NamedLocalIlxClosureInfoGenerated of IlxClosureInfo - -and ModuleStorage = - { Vals: Lazy> - SubModules: Lazy> } + member b.AddEventDef(edef) = gevents.Add edef + member b.AddFieldDef(ilFieldDef) = gfields.Add ilFieldDef + member b.AddMethodDef(ilMethodDef) = + let discard = + match tdefDiscards with + | Some (mdefDiscard, _) -> mdefDiscard ilMethodDef + | None -> false + if not discard then + gmethods.Add ilMethodDef + member b.NestedTypeDefs = gnested + member b.GetCurrentFields() = gfields |> Seq.readonly -/// BranchCallItems are those where a call to the value can be implemented as -/// a branch. At the moment these are only used for generating branch calls back to -/// the entry label of the method currently being generated. -and BranchCallItem = - | BranchCallClosure of ArityInfo - | BranchCallMethod of - // Argument counts for compiled form of F# method or value - ArityInfo * - // Arg infos for compiled form of F# method or value - (TType * ArgReprInfo) list list * - // Typars for F# method or value - Tast.Typars * - // Typars for F# method or value - int * - // num obj args - int - -and Mark = - | Mark of ILCodeLabel (* places we can branch to *) - member x.CodeLabel = (let (Mark(lab)) = x in lab) + /// Merge Get and Set property nodes, which we generate independently for F# code + /// when we come across their corresponding methods. + member b.AddOrMergePropertyDef(pdef,m) = + let discard = + match tdefDiscards with + | Some (_, pdefDiscard) -> pdefDiscard pdef + | None -> false + if not discard then + AddPropertyDefToHash m gproperties pdef -and IlxGenEnv = - { tyenv: TypeReprEnv - someTypeInThisAssembly: ILType - isFinalFile: bool - /// Where to place the stuff we're currently generating - cloc: CompileLocation - /// Hiding information down the signature chain, used to compute what's public to the assembly - sigToImplRemapInfo: (Remap * SignatureHidingInfo) list - /// All values in scope - valsInScope: ValMap> - /// For optimizing direct tail recursion to a loop - mark says where to branch to. Length is 0 or 1. - /// REVIEW: generalize to arbitrary nested local loops?? - innerVals: (ValRef * (BranchCallItem * Mark)) list - /// Full list of enclosing bound values. First non-compiler-generated element is used to help give nice names for closures and other expressions. - letBoundVars: ValRef list - /// The set of IL local variable indexes currently in use by lexically scoped variables, to allow reuse on different branches. - /// Really an integer set. - liveLocals: IntMap - /// Are we under the scope of a try, catch or finally? If so we can't tailcall. SEH = structured exception handling - withinSEH: bool } + member b.PrependInstructionsToSpecificMethodDef(cond,instrs,tag) = + match ResizeArray.tryFindIndex cond gmethods with + | Some idx -> gmethods.[idx] <- prependInstrsToMethod instrs gmethods.[idx] + | None -> gmethods.Add(mkILClassCtor (mkMethodBody (false,[],1,nonBranchingInstrsToCode instrs,tag))) + + +and TypeDefsBuilder() = + let tdefs : Internal.Utilities.Collections.HashMultiMap = HashMultiMap(0, HashIdentity.Structural) + let mutable countDown = System.Int32.MaxValue + + member b.Close() = + //The order we emit type definitions is not deterministic since it is using the reverse of a range from a hash table. We should use an approximation of source order. + // Ideally it shouldn't matter which order we use. + // However, for some tests FSI generated code appears sensitive to the order, especially for nested types. + + [ for (b, eliminateIfEmpty) in HashRangeSorted tdefs do + let tdef = b.Close() + // Skip the type if it is empty + if not eliminateIfEmpty + || not tdef.NestedTypes.AsList.IsEmpty + || not tdef.Fields.AsList.IsEmpty + || not tdef.Events.AsList.IsEmpty + || not tdef.Properties.AsList.IsEmpty + || not tdef.Methods.AsList.IsEmpty then + yield tdef ] -let ReplaceTyenv tyenv (eenv: IlxGenEnv) = {eenv with tyenv = tyenv } -let EnvForTypars tps eenv = {eenv with tyenv = TypeReprEnv.ForTypars tps } -let AddTyparsToEnv typars (eenv: IlxGenEnv) = {eenv with tyenv = eenv.tyenv.Add typars} + member b.FindTypeDefBuilder(nm) = + try tdefs.[nm] |> snd |> fst + with :? KeyNotFoundException -> failwith ("FindTypeDefBuilder: " + nm + " not found") -let AddSignatureRemapInfo _msg (rpi, mhi) eenv = - { eenv with sigToImplRemapInfo = (mkRepackageRemapping rpi,mhi) :: eenv.sigToImplRemapInfo } - -//-------------------------------------------------------------------------- -// Print eenv -//-------------------------------------------------------------------------- + member b.FindNestedTypeDefsBuilder(path) = + List.fold (fun (acc:TypeDefsBuilder) x -> acc.FindTypeDefBuilder(x).NestedTypeDefs) b path -let OutputStorage (pps: TextWriter) s = - match s with - | StaticField _ -> pps.Write "(top)" - | StaticProperty _ -> pps.Write "(top)" - | Method _ -> pps.Write "(top)" - | Local _ -> pps.Write "(local)" - | Arg _ -> pps.Write "(arg)" - | Env _ -> pps.Write "(env)" - | Null -> pps.Write "(null)" + member b.FindNestedTypeDefBuilder(tref:ILTypeRef) = + b.FindNestedTypeDefsBuilder(tref.Enclosing).FindTypeDefBuilder(tref.Name) -//-------------------------------------------------------------------------- -// Augment eenv with values -//-------------------------------------------------------------------------- + member b.AddTypeDef(tdef:ILTypeDef, eliminateIfEmpty, addAtEnd, tdefDiscards) = + let idx = if addAtEnd then (countDown <- countDown - 1; countDown) else tdefs.Count + tdefs.Add (tdef.Name, (idx, (new TypeDefBuilder(tdef, tdefDiscards), eliminateIfEmpty))) -let AddStorageForVal (g: TcGlobals) (v,s) eenv = - let eenv = { eenv with valsInScope = eenv.valsInScope.Add v s } - // If we're compiling fslib then also bind the value as a non-local path to - // allow us to resolve the compiler-non-local-references that arise from env.fs - // - // Do this by generating a fake "looking from the outside in" non-local value reference for - // v, dereferencing it to find the corresponding signature Val, and adding an entry for the signature val. - // - // A similar code path exists in ilxgen.fs for the tables of "optimization data" for values - if g.compilingFslib then - // Passing an empty remap is sufficient for FSharp.Core.dll because it turns out the remapped type signature can - // still be resolved. - match tryRescopeVal g.fslibCcu Remap.Empty v with - | None -> eenv - | Some vref -> - match vref.TryDeref with - | VNone -> - //let msg = sprintf "could not dereference external value reference to something in FSharp.Core.dll during code generation, v.MangledName = '%s', v.Range = %s" v.MangledName (stringOfRange v.Range) - //System.Diagnostics.Debug.Assert(false, msg) - eenv - | VSome gv -> - { eenv with valsInScope = eenv.valsInScope.Add gv s } - else - eenv +type AnonTypeGenerationTable() = + let dict = Dictionary(HashIdentity.Structural) + member __.Table = dict -let AddStorageForLocalVals g vals eenv = List.foldBack (fun (v,s) acc -> AddStorageForVal g (v,notlazy s) acc) vals eenv +/// Assembly generation buffers +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 : Dictionary = Dictionary(HashIdentity.Reference) + let mutable extraBindingsToGenerate = [] -//-------------------------------------------------------------------------- -// Lookup eenv -//-------------------------------------------------------------------------- - -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library + // A memoization table for generating value types for big constant arrays + let rawDataValueTypeGenerator = + new MemoizationTable<(CompileLocation * int) , ILTypeSpec> + ((fun (cloc,size) -> + let name = CompilerGeneratedName ("T" + string(newUnique()) + "_" + string size + "Bytes") // Type names ending ...$T_37Bytes + let vtdef = mkRawDataValueTypeDef cenv.g.iltyp_ValueType (name,size,0us) + let vtref = NestedTypeRefForCompLoc cloc vtdef.Name + let vtspec = mkILTySpec(vtref,[]) + let vtdef = vtdef.WithAccess(ComputeTypeAccess vtref true) + mgbuf.AddTypeDef(vtref, vtdef, false, true, None) + vtspec), + keyComparer=HashIdentity.Structural) -let StorageForVal m v eenv = - let v = - try eenv.valsInScope.[v] - with :? KeyNotFoundException -> - assert false - errorR(Error(FSComp.SR.ilUndefinedValue(showL(vspecAtBindL v)),m)) - notlazy (Arg 668(* random value for post-hoc diagnostic analysis on generated tree *) ) - v.Force() + 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 StorageForValRef m (v: ValRef) eenv = StorageForVal m v.Deref eenv + let ilGenericParams = + [ for nm in nms -> + { Name = sprintf "<%s>j__TPar" nm + Constraints = [] + Variance=NonVariant + CustomAttrs = emptyILCustomAttrs + HasReferenceTypeConstraint=false + HasNotNullableValueTypeConstraint=false + HasDefaultConstructorConstraint= false } ] -//-------------------------------------------------------------------------- -// Imported modules and the environment -// -// How a top level value is represented depends on its type. If it's a -// function or is polymorphic, then it gets represented as a -// method (possibly and instance method). Otherwise it gets represented as a -// static field. -//-------------------------------------------------------------------------- + let ilTy = mkILFormalNamedTy (if isStruct then ILBoxity.AsValue else ILBoxity.AsObject) ilTypeRef ilGenericParams -let IsValRefIsDllImport g (vref:ValRef) = - vref.Attribs |> HasFSharpAttributeOpt g g.attrib_DllImportAttribute + // 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 -> + { Name = propName + Attributes = PropertyAttributes.None + SetMethod = None + GetMethod = Some(mkILMethRef(ilTypeRef,ILCallingConv.Instance,"get_" + propName,0,[],fldTy )) + CallingConv = ILCallingConv.Instance.ThisConv + Type = 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 GetMethodSpecForMemberVal amap g (memberInfo:ValMemberInfo) (vref:ValRef) = - let m = vref.Range - let tps,curriedArgInfos,returnTy,retInfo = - assert(vref.ValReprInfo.IsSome) - GetTopValTypeInCompiledForm g (Option.get vref.ValReprInfo) vref.Type m - let tyenvUnderTypars = TypeReprEnv.ForTypars tps - let flatArgInfos = List.concat curriedArgInfos - let isCtor = (memberInfo.MemberFlags.MemberKind = MemberKind.Constructor) - let cctor = (memberInfo.MemberFlags.MemberKind = MemberKind.ClassConstructor) - let parentTcref = vref.TopValDeclaringEntity - let parentTypars = parentTcref.TyparsNoRange - let numParentTypars = parentTypars.Length - if tps.Length < numParentTypars then error(InternalError("CodeGen check: type checking did not ensure that this method is sufficiently generic", m)) - let ctps,mtps = List.chop numParentTypars tps - let isCompiledAsInstance = ValRefIsCompiledAsInstanceMember g vref + 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) |] - let ilActualRetTy = - let ilRetTy = GenReturnTypeAux amap m tyenvUnderTypars returnTy - if isCtor || cctor then ILType.Void else ilRetTy + if ilTypeRef.Scope.IsLocalRef then - let ilTy = GenTypeAux amap m tyenvUnderTypars (mkAppTy parentTcref (List.map mkTyparTy ctps)) + // 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) ] - if isCompiledAsInstance || isCtor then - // Find the 'this' argument type if any - let thisTy,flatArgInfos = - if isCtor then (GetFSharpViewOfReturnType g returnTy),flatArgInfos - else - match flatArgInfos with - | [] -> error(InternalError("This instance method '" + vref.LogicalName + "' has no arguments", m)) - | (h,_):: t -> h,t + 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) - let thisTy = if isByrefTy g thisTy then destByrefTy g thisTy else thisTy - let thisArgTys = argsOfAppTy g thisTy - if ctps.Length <> thisArgTys.Length then - warning(InternalError(sprintf "CodeGen check: type checking did not quantify the correct number of type variables for this method, #parentTypars = %d, #ctps = %d, #mtps = %d, #thisArgTys = %d" numParentTypars ctps.Length mtps.Length thisArgTys.Length,m)) - else - List.iter2 - (fun gtp ty2 -> - if not (typeEquiv g (mkTyparTy gtp) ty2) then - warning(InternalError("CodeGen check: type checking did not quantify the correct type variables for this method: generalization list contained " + gtp.Name + "#" + string gtp.Stamp + " and list from 'this' pointer contained " + (showL(typeL ty2)), m))) - ctps - thisArgTys - let methodArgTys,paramInfos = List.unzip flatArgInfos - let ilMethodArgTys = GenParamTypesAux amap m tyenvUnderTypars methodArgTys - let ilMethodInst = GenTypeArgsAux amap m tyenvUnderTypars (List.map mkTyparTy mtps) - let mspec = mkILInstanceMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - - mspec,ctps,mtps,paramInfos,retInfo - else - let methodArgTys,paramInfos = List.unzip flatArgInfos - let ilMethodArgTys = GenParamTypesAux amap m tyenvUnderTypars methodArgTys - let ilMethodInst = GenTypeArgsAux amap m tyenvUnderTypars (List.map mkTyparTy mtps) - let mspec = mkILStaticMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - - mspec,ctps,mtps,paramInfos,retInfo + if isStruct then + tycon.SetIsStructRecordOrUnion(true) -// Generate the ILFieldSpec for a top-level value + 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 ComputeFieldSpecForVal(optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, isInteractive, g, ilTyForProperty, vspec:Val, nm, m, cloc, ilTy, ilGetterMethRef) = - assert vspec.IsCompiledAsTopLevel - let generate() = GenFieldSpecForStaticField (isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy) - match optIntraAssemblyInfo with - | None -> generate() - | Some intraAssemblyInfo -> - if vspec.IsMutable && vspec.IsCompiledAsTopLevel && isStructTy g vspec.Type then - let ok, res = intraAssemblyInfo.StaticFieldInfo.TryGetValue ilGetterMethRef - if ok then - res - else - let res = generate() - intraAssemblyInfo.StaticFieldInfo.[ilGetterMethRef] <- res - res - else - generate() + 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 IsValCompiledAsMethod g (v:Val) = - match v.ValReprInfo with - | None -> false - | Some topValInfo -> - not (isUnitTy g v.Type && not v.IsMemberOrModuleBinding && not v.IsMutable) && - not v.IsCompiledAsStaticPropertyWithoutField && - match GetTopValTypeInFSharpForm g topValInfo v.Type v.Range with - | [],[],_,_ when not v.IsMember -> false - | _ -> true + 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 -// This called via 2 routes. -// (a) ComputeAndAddStorageForLocalTopVal -// (b) ComputeStorageForNonLocalTopVal -// -/// This function decides the storage for the val. -/// The decision is based on arityInfo. -let ComputeStorageForTopVal (amap, g, optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, isInteractive, optShadowLocal, vref:ValRef, cloc) = + tcaug.SetCompare (mkLocalValRef cvspec1, mkLocalValRef cvspec2) + tcaug.SetCompareWith (mkLocalValRef cvspec3) + tcaug.SetEquals (mkLocalValRef vspec1, mkLocalValRef vspec2) + tcaug.SetHashAndEqualsWith (mkLocalValRef evspec1, mkLocalValRef evspec2, mkLocalValRef evspec3) - if isUnitTy g vref.Type && not vref.IsMemberOrModuleBinding && not vref.IsMutable then - Null - else - let topValInfo = - match vref.ValReprInfo with - | None -> error(InternalError("ComputeStorageForTopVal: no arity found for " + showL(valRefL vref),vref.Range)) - | Some a -> a - - let m = vref.Range - let nm = vref.CompiledName + // Build the ILTypeDef. We don't rely on the normal record generation process because we want very specific field names - if vref.Deref.IsCompiledAsStaticPropertyWithoutField then - let nm = "get_"+nm - let tyenvUnderTypars = TypeReprEnv.ForTypars [] - let ilRetTy = GenTypeAux amap m tyenvUnderTypars vref.Type - let typ = mkILTyForCompLoc cloc - let mspec = mkILStaticMethSpecInTy (typ, nm, [], ilRetTy, []) - - StaticProperty (mspec, optShadowLocal) - else + let ilTypeDefAttribs = mkILCustomAttrs [ cenv.g.CompilerGeneratedAttribute; mkCompilationMappingAttr cenv.g (int SourceConstructFlags.RecordType) ] - // Determine when a static field is required. - // - // REVIEW: This call to GetTopValTypeInFSharpForm is only needed to determine if this is a (type) function or a value - // We should just look at the arity - match GetTopValTypeInFSharpForm g topValInfo vref.Type vref.Range with - | [],[], returnTy,_ when not vref.IsMember -> - // Mutable and literal static fields must have stable names and live in the "public" location - // See notes on GenFieldSpecForStaticField above. - let vspec = vref.Deref - let ilTy = GenTypeAux amap m TypeReprEnv.Empty returnTy (* TypeReprEnv.Empty ok: not a field in a generic class *) - let ilTyForProperty = mkILTyForCompLoc cloc - let attribs = vspec.Attribs - let hasLiteralAttr = HasFSharpAttribute g g.attrib_LiteralAttribute attribs + let ilInterfaceTys = [ for (ity,_,_) in tcaug.tcaug_interfaces -> GenType cenv.amap m (TypeReprEnv.ForTypars tps) ity ] - let ilTypeRefForProperty = ilTyForProperty.TypeRef - let ilGetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "get_"+nm, 0, [], ilTy) - let ilSetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "set_"+nm, 0, [ilTy], ILType.Void) + let ilTypeDef = + mkILGenericClass (ilTypeRef.Name, ILTypeDefAccess.Public, ilGenericParams, ilBaseTy, ilInterfaceTys, + mkILMethods (ilCtorDef :: ilMethods), ilFieldDefs, emptyILTypeDefs, + ilProperties, mkILEvents [], ilTypeDefAttribs, + ILTypeInit.BeforeField) + - let fspec = ComputeFieldSpecForVal(optIntraAssemblyInfo, isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy, ilGetterMethRef) + let ilTypeDef = ilTypeDef.WithSealed(true).WithSerializable(true) - StaticField (fspec, vref, hasLiteralAttr, ilTyForProperty, nm, ilTy, ilGetterMethRef, ilSetterMethRef, optShadowLocal) - - | _ -> - match vref.MemberInfo with - | Some memberInfo when not vref.IsExtensionMember -> - let mspec,_,_,paramInfos,retInfo = GetMethodSpecForMemberVal amap g memberInfo vref - Method (topValInfo, vref, mspec, m, paramInfos, retInfo) - | _ -> - let (tps, curriedArgInfos, returnTy, retInfo) = GetTopValTypeInCompiledForm g topValInfo vref.Type m - let tyenvUnderTypars = TypeReprEnv.ForTypars tps - let (methodArgTys,paramInfos) = curriedArgInfos |> List.concat |> List.unzip - let ilMethodArgTys = GenParamTypesAux amap m tyenvUnderTypars methodArgTys - let ilRetTy = GenReturnTypeAux amap m tyenvUnderTypars returnTy - let ilLocTy = mkILTyForCompLoc cloc - let ilMethodInst = GenTypeArgsAux amap m tyenvUnderTypars (List.map mkTyparTy tps) - let mspec = mkILStaticMethSpecInTy (ilLocTy, nm, ilMethodArgTys, ilRetTy, ilMethodInst) - Method (topValInfo, vref, mspec, m, paramInfos, retInfo) + let ilTypeDef = { ilTypeDef with MethodImpls=mkILMethodImpls [] } + + 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 ComputeAndAddStorageForLocalTopVal (amap, g, intraAssemblyFieldTable, isInteractive, optShadowLocal) cloc (v:Val) eenv = - let storage = ComputeStorageForTopVal (amap, g, Some intraAssemblyFieldTable, isInteractive, optShadowLocal, mkLocalValRef v, cloc) - AddStorageForVal g (v,notlazy storage) eenv + let optimizedExtraBindings = extraBindings |> List.map (fun (TBind(a,b,c)) -> TBind(a,cenv.optimizeDuringCodeGen b,c)) -let ComputeStorageForNonLocalTopVal amap g cloc modref (v:Val) = - match v.ValReprInfo with - | None -> error(InternalError("ComputeStorageForNonLocalTopVal, expected an arity for " + v.LogicalName,v.Range)) - | Some _ -> ComputeStorageForTopVal (amap, g, None, false, NoShadowLocal, mkNestedValRef modref v, cloc) + extraBindingsToGenerate <- optimizedExtraBindings @ extraBindingsToGenerate -let rec ComputeStorageForNonLocalModuleOrNamespaceRef amap g cloc acc (modref:ModuleOrNamespaceRef) (modul:ModuleOrNamespace) = - let acc = - (acc, modul.ModuleOrNamespaceType.ModuleAndNamespaceDefinitions) ||> List.fold (fun acc smodul -> - ComputeStorageForNonLocalModuleOrNamespaceRef amap g (CompLocForSubModuleOrNamespace cloc smodul) acc (modref.NestedTyconRef smodul) smodul) + (ilCtorRef,ilMethodRefs,ilTy) - let acc = - (acc, modul.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> - AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc modref v)) acc) - acc + let mutable explicitEntryPointInfo : ILTypeRef option = None -let ComputeStorageForExternalCcu amap g eenv (ccu:CcuThunk) = - if not ccu.IsFSharp then eenv else - let cloc = CompLocForCcu ccu - let eenv = - List.foldBack - (fun smodul acc -> - let cloc = CompLocForSubModuleOrNamespace cloc smodul - let modref = mkNonLocalCcuRootEntityRef ccu smodul - ComputeStorageForNonLocalModuleOrNamespaceRef amap g cloc acc modref smodul) - ccu.RootModulesAndNamespaces - eenv - let eenv = - let eref = ERefNonLocalPreResolved ccu.Contents (mkNonLocalEntityRef ccu [| |]) - (eenv, ccu.Contents.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> - AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc eref v)) acc) - eenv + /// static init fields on script modules. + let mutable scriptInitFspecs : (ILFieldSpec * range) list = [] -let rec AddBindingsForLocalModuleType allocVal cloc eenv (mty:ModuleOrNamespaceType) = - let eenv = List.fold (fun eenv submodul -> AddBindingsForLocalModuleType allocVal (CompLocForSubModuleOrNamespace cloc submodul) eenv submodul.ModuleOrNamespaceType) eenv mty.ModuleAndNamespaceDefinitions - let eenv = Seq.fold (fun eenv v -> allocVal cloc v eenv) eenv mty.AllValsAndMembers - eenv + member mgbuf.AddScriptInitFieldSpec(fieldSpec,range) = + scriptInitFspecs <- (fieldSpec,range) :: scriptInitFspecs + + /// This initializes the script in #load and fsc command-line order causing their + /// sideeffects to be executed. + member mgbuf.AddInitializeScriptsInOrderToEntryPoint() = + // Get the entry point and initialized any scripts in order. + match explicitEntryPointInfo with + | Some tref -> + let IntializeCompiledScript(fspec,m) = + mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.IsEntryPoint), tref, fspec, GenPossibleILSourceMarker cenv m, [], []) + scriptInitFspecs |> List.iter IntializeCompiledScript + | None -> () -let AddExternalCcusToIlxGenEnv amap g eenv ccus = List.fold (ComputeStorageForExternalCcu amap g) eenv ccus + 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 + rawDataValueTypeGenerator.Apply((cloc,size)) -let AddBindingsForTycon allocVal (cloc:CompileLocation) (tycon:Tycon) eenv = - let unrealizedSlots = - if tycon.IsFSharpObjectModelTycon - then tycon.FSharpObjectModelTypeInfo.fsobjmodel_vslots - else [] - (eenv,unrealizedSlots) ||> List.fold (fun eenv vref -> allocVal cloc vref.Deref eenv) + 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 -let rec AddBindingsForModuleDefs allocVal (cloc:CompileLocation) eenv mdefs = - List.fold (AddBindingsForModuleDef allocVal cloc) eenv mdefs + 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 -and AddBindingsForModuleDef allocVal cloc eenv x = - match x with - | TMDefRec(_isRec,tycons,mbinds,_) -> - (* Virtual don't have 'let' bindings and must be added to the environment *) - let eenv = List.foldBack (AddBindingsForTycon allocVal cloc) tycons eenv - let eenv = List.foldBack (AddBindingsForModule allocVal cloc) mbinds eenv - eenv - | TMDefLet(bind,_) -> - allocVal cloc bind.Var eenv - | TMDefDo _ -> - eenv - | TMAbstract(ModuleOrNamespaceExprWithSig(mtyp,_,_)) -> - AddBindingsForLocalModuleType allocVal cloc eenv mtyp - | TMDefs(mdefs) -> - AddBindingsForModuleDefs allocVal cloc eenv mdefs + member mgbuf.GrabExtraBindingsToGenerate() = + let result = extraBindingsToGenerate + extraBindingsToGenerate <- [] + result -and AddBindingsForModule allocVal cloc x eenv = - match x with - | ModuleOrNamespaceBinding.Binding bind -> - allocVal cloc bind.Var eenv - | ModuleOrNamespaceBinding.Module (mspec, mdef) -> - let cloc = - if mspec.IsNamespace then cloc - else CompLocForFixedModule cloc.clocQualifiedNameOfFile cloc.clocTopImplQualifiedName mspec - - AddBindingsForModuleDef allocVal cloc eenv mdef + member mgbuf.AddTypeDef(tref:ILTypeRef, tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) = + gtdefs.FindNestedTypeDefsBuilder(tref.Enclosing).AddTypeDef(tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) -and AddBindingsForModuleTopVals _g allocVal _cloc eenv vs = - List.foldBack allocVal vs eenv + member mgbuf.GetCurrentFields(tref:ILTypeRef) = + gtdefs.FindNestedTypeDefBuilder(tref).GetCurrentFields() + member mgbuf.AddReflectedDefinition(vspec : Tast.Val,expr) = + // preserve order by storing index of item + let n = reflectedDefinitions.Count + reflectedDefinitions.Add(vspec, (vspec.CompiledName, n, expr)) + + member mgbuf.ReplaceNameOfReflectedDefinition(vspec, newName) = + match reflectedDefinitions.TryGetValue vspec with + | true, (name, n, expr) when name <> newName -> reflectedDefinitions.[vspec] <- (newName, n, expr) + | _ -> () -// Put the partial results for a generated fragment (i.e. a part of a CCU generated by FSI) -// into the stored results for the whole CCU. -// isIncrementalFragment = true --> "typed input" -// isIncrementalFragment = false --> "#load" -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, _, _, _)) -> - let cloc = { cloc with clocTopImplQualifiedName = qname.Text } - if isIncrementalFragment then - match mexpr with - | ModuleOrNamespaceExprWithSig(_,mdef,_) -> AddBindingsForModuleDef allocVal cloc eenv mdef - (* | ModuleOrNamespaceExprWithSig(mtyp,_,m) -> error(Error("don't expect inner defs to have a constraint",m)) *) - else - AddBindingsForLocalModuleType allocVal cloc eenv mexpr.Type) + member mgbuf.AddMethodDef(tref:ILTypeRef,ilMethodDef) = + gtdefs.FindNestedTypeDefBuilder(tref).AddMethodDef(ilMethodDef) + if ilMethodDef.IsEntryPoint then + explicitEntryPointInfo <- Some(tref) + member mgbuf.AddExplicitInitToSpecificMethodDef(cond,tref,fspec,sourceOpt,feefee,seqpt) = + // Authoring a .cctor with effects forces the cctor for the 'initialization' module by doing a dummy store & load of a field + // Doing both a store and load keeps FxCop happier because it thinks the field is useful + let instrs = + [ yield! (if condition "NO_ADD_FEEFEE_TO_CCTORS" then [] elif condition "ADD_SEQPT_TO_CCTORS" then seqpt else feefee) // mark start of hidden code + yield mkLdcInt32 0 + yield mkNormalStsfld fspec + yield mkNormalLdsfld fspec + yield AI_pop] + gtdefs.FindNestedTypeDefBuilder(tref).PrependInstructionsToSpecificMethodDef(cond,instrs,sourceOpt) + + member mgbuf.AddEventDef(tref,edef) = + gtdefs.FindNestedTypeDefBuilder(tref).AddEventDef(edef) + + member mgbuf.AddFieldDef(tref,ilFieldDef) = + gtdefs.FindNestedTypeDefBuilder(tref).AddFieldDef(ilFieldDef) + + member mgbuf.AddOrMergePropertyDef(tref,pdef,m) = + gtdefs.FindNestedTypeDefBuilder(tref).AddOrMergePropertyDef(pdef,m) + + member mgbuf.Close() = + // old implementation adds new element to the head of list so result was accumulated in reversed order + let orderedReflectedDefinitions = + [for (KeyValue(vspec, (name, n, expr))) in reflectedDefinitions -> n, ((name,vspec), expr)] + |> List.sortBy (fst >> (~-)) // invert the result to get 'order-by-descending' behavior (items in list are 0..* so we don't need to worry about int.MinValue) + |> List.map snd + gtdefs.Close(), orderedReflectedDefinitions + member mgbuf.cenv = cenv + member mgbuf.GetExplicitEntryPointInfo() = explicitEntryPointInfo + +let GenTypePermitVoid cenv m tyenv ty = GenTypeAux cenv.amap m tyenv VoidOK PtrTypesNotOK ty +let GenTypesPermitVoid cenv m tyenv tys = List.map (GenTypePermitVoid cenv m tyenv) tys +let GenExnType amap m tyenv (ecref:TyconRef) = GenTyApp amap m tyenv ecref.CompiledRepresentation [] + /// 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. @@ -2202,7 +2193,7 @@ and GenSequel cenv cloc cgbuf sequel = //-------------------------------------------------------------------------- and GenConstant cenv cgbuf eenv (c,m,ty) sequel = - let ilTy = GenType cenv m eenv.tyenv ty + let ilTy = GenType cenv.amap m eenv.tyenv ty // Check if we need to generate the value at all match sequelAfterDiscard sequel with | None -> @@ -2244,7 +2235,7 @@ and GenConstant cenv cgbuf eenv (c,m,ty) sequel = and GenUnitTy cenv eenv m = match cenv.ilUnitTy with | None -> - let res = GenType cenv m eenv.tyenv cenv.g.unit_ty + let res = GenType cenv.amap m eenv.tyenv cenv.g.unit_ty cenv.ilUnitTy <- Some res res | Some res -> res @@ -2266,7 +2257,7 @@ and GenAllocTuple cenv cgbuf eenv (tupInfo, args,argtys,m) sequel = let tupInfo = evalTupInfoIsStruct tupInfo let tcref, tys, args, newm = mkCompiledTuple cenv.g tupInfo (argtys,args,m) - let typ = GenNamedTyApp cenv newm eenv.tyenv tcref tys + let typ = GenNamedTyApp cenv.amap newm eenv.tyenv tcref tys let ntyvars = if (tys.Length - 1) < goodTupleFields then (tys.Length - 1) else goodTupleFields let formalTyvars = [ for n in 0 .. ntyvars do yield mkILTyvarTy (uint16 n) ] @@ -2284,14 +2275,14 @@ and GenGetTupleField cenv cgbuf eenv (tupInfo,e,tys,n,m) sequel = if ar <= 0 then failwith "getCompiledTupleItem" elif ar < maxTuple then let tcr' = mkCompiledTupleTyconRef g tupInfo ar - let typ = GenNamedTyApp cenv m eenv.tyenv tcr' tys + let typ = GenNamedTyApp cenv.amap m eenv.tyenv tcr' tys mkGetTupleItemN g m n typ tupInfo e tys.[n] else let tysA,tysB = List.splitAfter (goodTupleFields) tys let tyB = mkCompiledTupleTy g tupInfo tysB let tys' = tysA@[tyB] let tcr' = mkCompiledTupleTyconRef g tupInfo (List.length tys') - let typ' = GenNamedTyApp cenv m eenv.tyenv tcr' tys' + let typ' = GenNamedTyApp cenv.amap m eenv.tyenv tcr' tys' let n' = (min n goodTupleFields) let elast = mkGetTupleItemN g m n' typ' tupInfo e tys'.[n'] if n < goodTupleFields then @@ -2304,7 +2295,7 @@ and GenAllocExn cenv cgbuf eenv (c,args,m) sequel = GenExprs cenv cgbuf eenv args let typ = GenExnType cenv.amap m eenv.tyenv c let flds = recdFieldsOfExnDefRef c - let argtys = flds |> List.map (fun rfld -> GenType cenv m eenv.tyenv rfld.FormalType) + let argtys = flds |> List.map (fun rfld -> GenType cenv.amap m eenv.tyenv rfld.FormalType) let mspec = mkILCtorMethSpecForTy (typ, argtys) CG.EmitInstr cgbuf (pop args.Length) (Push [typ]) @@ -2313,12 +2304,12 @@ and GenAllocExn cenv cgbuf eenv (c,args,m) sequel = and GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel = GenExprs cenv cgbuf eenv args - let cuspec,idx = GenUnionCaseSpec cenv m eenv.tyenv c tyargs + let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv c tyargs CG.EmitInstrs cgbuf (pop args.Length) (Push [cuspec.DeclaringType]) (EraseUnions.mkNewData cenv.g.ilg (cuspec, idx)) GenSequel cenv eenv.cloc cgbuf sequel and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = - let typ = GenNamedTyApp cenv m eenv.tyenv tcref argtys + let typ = GenNamedTyApp cenv.amap m eenv.tyenv tcref argtys // Filter out fields with default initialization let relevantFields = @@ -2341,14 +2332,14 @@ and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = let tyenvinner = TypeReprEnv.ForTyconRef tcref CG.EmitInstr cgbuf (pop args.Length) (Push [typ]) (mkNormalNewobj - (mkILCtorMethSpecForTy (typ,relevantFields |> List.map (fun f -> GenType cenv m tyenvinner f.FormalType) ))) + (mkILCtorMethSpecForTy (typ,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 m eenv.tyenv tyargs + 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 @@ -2356,7 +2347,7 @@ and GenAllocAnonRecd cenv cgbuf eenv (anonInfo: AnonRecdTypeInfo, tyargs, args, 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 m eenv.tyenv tyargs + let ilTypeArgs = GenTypeArgs cenv.amap m eenv.tyenv tyargs let anonMethod = anonMethods.[n] let anonFieldType = ilTypeArgs.[n] GenExpr cenv cgbuf eenv SPSuppress e Continue @@ -2364,7 +2355,7 @@ and GenGetAnonRecdField cenv cgbuf eenv (anonInfo: AnonRecdTypeInfo, e, tyargs, GenSequel cenv eenv.cloc cgbuf sequel and GenNewArraySimple cenv cgbuf eenv (elems,elemTy,m) sequel = - let ilElemTy = GenType cenv m eenv.tyenv elemTy + let ilElemTy = GenType cenv.amap m eenv.tyenv elemTy let ilArrTy = mkILArr1DTy ilElemTy CG.EmitInstrs cgbuf (pop 0) (Push [ilArrTy]) [ (AI_ldc (DT_I4,ILConst.I4 (elems.Length))); I_newarr (ILArrayShape.SingleDimensional,ilElemTy) ] @@ -2401,7 +2392,7 @@ and GenNewArray cenv cgbuf eenv (elems: Expr list,elemTy,m) sequel = | _ -> (function _ -> false), (fun _ _ -> failwith "unreachable") if elems' |> Array.forall (function Expr.Const(c,_,_) -> test c | _ -> false) then - let ilElemTy = GenType cenv m eenv.tyenv elemTy + let ilElemTy = GenType cenv.amap m eenv.tyenv elemTy GenConstArray cenv cgbuf eenv ilElemTy elems' (fun buf -> function Expr.Const(c,_,_) -> write buf c | _ -> failwith "unreachable") GenSequel cenv eenv.cloc cgbuf sequel @@ -2416,7 +2407,7 @@ and GenCoerce cenv cgbuf eenv (e,tgty,m,srcty) sequel = begin if (isInterfaceTy cenv.g tgty) then ( GenExpr cenv cgbuf eenv SPSuppress e Continue - let ilToTy = GenType cenv m eenv.tyenv tgty + let ilToTy = GenType cenv.amap m eenv.tyenv tgty // Section "III.1.8.1.3 Merging stack states" of ECMA-335 implies that no unboxing // is required, but we still push the coerce'd type on to the code gen buffer. CG.EmitInstrs cgbuf (pop 1) (Push [ilToTy]) [] @@ -2428,15 +2419,15 @@ and GenCoerce cenv cgbuf eenv (e,tgty,m,srcty) sequel = else GenExpr cenv cgbuf eenv SPSuppress e Continue if not (isObjTy cenv.g srcty) then - let ilFromTy = GenType cenv m eenv.tyenv srcty + let ilFromTy = GenType cenv.amap m eenv.tyenv srcty CG.EmitInstrs cgbuf (pop 1) (Push [cenv.g.ilg.typ_Object]) [ I_box ilFromTy ] if not (isObjTy cenv.g tgty) then - let ilToTy = GenType cenv m eenv.tyenv tgty + let ilToTy = GenType cenv.amap m eenv.tyenv tgty CG.EmitInstrs cgbuf (pop 1) (Push [ilToTy]) [ I_unbox_any ilToTy ] GenSequel cenv eenv.cloc cgbuf sequel and GenReraise cenv cgbuf eenv (rtnty,m) sequel = - let ilReturnTy = GenType cenv m eenv.tyenv rtnty + let ilReturnTy = GenType cenv.amap m eenv.tyenv rtnty CG.EmitInstrs cgbuf (pop 0) Push0 [I_rethrow] // [See comment related to I_throw]. // Rethrow does not return. Required to push dummy value on the stack. @@ -2451,7 +2442,7 @@ and GenGetExnField cenv cgbuf eenv (e,ecref,fieldNum,m) sequel = CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass typ] let fld = List.item fieldNum exnc.TrueInstanceFieldsAsList - let ftyp = GenType cenv m eenv.tyenv fld.FormalType + let ftyp = GenType cenv.amap m eenv.tyenv fld.FormalType let mspec = mkILNonGenericInstanceMethSpecInTy (typ,"get_" + fld.Name, [], ftyp) CG.EmitInstr cgbuf (pop 1) (Push [ftyp]) (mkNormalCall mspec) @@ -2464,7 +2455,7 @@ and GenSetExnField cenv cgbuf eenv (e,ecref,fieldNum,e2,m) sequel = let typ = GenExnType cenv.amap m eenv.tyenv ecref CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass typ ] let fld = List.item fieldNum exnc.TrueInstanceFieldsAsList - let ftyp = GenType cenv m eenv.tyenv fld.FormalType + let ftyp = GenType cenv.amap m eenv.tyenv fld.FormalType let ilFieldName = ComputeFieldName exnc fld GenExpr cenv cgbuf eenv SPSuppress e2 Continue CG.EmitInstr cgbuf (pop 2) Push0 (mkNormalStfld(mkILFieldSpecInTy (typ,ilFieldName,ftyp))) @@ -2482,7 +2473,7 @@ and UnionCodeGen (cgbuf: CodeGenBuffer) = and GenUnionCaseProof cenv cgbuf eenv (e,ucref,tyargs,m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs + let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let fty = EraseUnions.GetILTypeForAlternative cuspec idx let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef EraseUnions.emitCastData cenv.g.ilg (UnionCodeGen cgbuf) (false,avoidHelpers,cuspec,idx) @@ -2493,7 +2484,7 @@ and GenGetUnionCaseField cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel = assert (ucref.Tycon.IsStructOrEnumTycon || isProvenUnionCaseTy (tyOfExpr cenv.g e)) GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs + let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let fty = actualTypOfIlxUnionField cuspec idx n let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef CG.EmitInstrs cgbuf (pop 1) (Push [fty]) (EraseUnions.mkLdData (avoidHelpers, cuspec, idx, n)) @@ -2503,7 +2494,7 @@ and GenGetUnionCaseFieldAddr cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel = assert (ucref.Tycon.IsStructOrEnumTycon || isProvenUnionCaseTy (tyOfExpr cenv.g e)) GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs + let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let fty = actualTypOfIlxUnionField cuspec idx n let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref fty]) (EraseUnions.mkLdDataAddr (avoidHelpers, cuspec, idx, n)) @@ -2511,7 +2502,7 @@ and GenGetUnionCaseFieldAddr cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel = and GenGetUnionCaseTag cenv cgbuf eenv (e,tcref,tyargs,m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec = GenUnionSpec cenv m eenv.tyenv tcref tyargs + let cuspec = GenUnionSpec cenv.amap m eenv.tyenv tcref tyargs let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib tcref EraseUnions.emitLdDataTag cenv.g.ilg (UnionCodeGen cgbuf) (avoidHelpers, cuspec) CG.EmitInstrs cgbuf (pop 1) (Push [cenv.g.ilg.typ_Int32]) [ ] // push/pop to match the line above @@ -2519,7 +2510,7 @@ and GenGetUnionCaseTag cenv cgbuf eenv (e,tcref,tyargs,m) sequel = and GenSetUnionCaseField cenv cgbuf eenv (e,ucref,tyargs,n,e2,m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs + let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef EraseUnions.emitCastData cenv.g.ilg (UnionCodeGen cgbuf) (false,avoidHelpers,cuspec,idx) CG.EmitInstrs cgbuf (pop 1) (Push [cuspec.DeclaringType]) [ ] // push/pop to match the line above @@ -2752,7 +2743,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = let actualRetTy = applyTys cenv.g vref.Type (tyargs,nowArgs) let _,curriedArgInfos,returnTy,_ = GetTopValTypeInCompiledForm cenv.g topValInfo vref.Type m - let ilTyArgs = GenTypeArgs cenv m eenv.tyenv tyargs + let ilTyArgs = GenTypeArgs cenv.amap m eenv.tyenv tyargs // For instance method calls chop off some type arguments, which are already @@ -2797,7 +2788,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = let callInstr = match valUseFlags with | PossibleConstrainedCall ty -> - let ilThisTy = GenType cenv m eenv.tyenv ty + let ilThisTy = GenType cenv.amap m eenv.tyenv ty I_callconstraint ( isTailCall, ilThisTy,mspec,None) | _ -> if newobj then I_newobj (mspec, None) @@ -2816,7 +2807,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = (eenv,laterArgs) ||> List.mapFold (fun eenv laterArg -> // Only save arguments that have effects if Optimizer.ExprHasEffect cenv.g laterArg then - let ilTy = laterArg |> tyOfExpr cenv.g |> GenType cenv m eenv.tyenv + let ilTy = laterArg |> tyOfExpr cenv.g |> GenType cenv.amap m eenv.tyenv let loc,eenv = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("arg",m), ilTy, false) scopeMarks GenExpr cenv cgbuf eenv SPSuppress laterArg Continue EmitSetLocal cgbuf loc @@ -2826,7 +2817,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = let nargs = mspec.FormalArgTypes.Length CG.EmitInstr cgbuf (pop (nargs + (if mspec.CallingConv.IsStatic || newobj then 0 else 1))) - (if mustGenerateUnitAfterCall || isSuperInit || isSelfInit then Push0 else (Push [(GenType cenv m eenv.tyenv actualRetTy)])) callInstr + (if mustGenerateUnitAfterCall || isSuperInit || isSelfInit then Push0 else (Push [(GenType cenv.amap m eenv.tyenv actualRetTy)])) callInstr // For isSuperInit, load the 'this' pointer as the pretend 'result' of the operation. It will be popped again in most cases if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [mspec.DeclaringType]) [ mkLdarg0 ] @@ -2879,9 +2870,9 @@ and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv typ cloinfo tyargs let ilContractClassTyargs = cloinfo.localTypeFuncContractFreeTypars |> List.map mkTyparTy - |> GenTypeArgs cenv m eenv.tyenv + |> GenTypeArgs cenv.amap m eenv.tyenv - let ilTyArgs = tyargs |> GenTypeArgs cenv m eenv.tyenv + let ilTyArgs = tyargs |> GenTypeArgs cenv.amap m eenv.tyenv let _,(ilContractMethTyargs: ILGenericParameterDefs),(ilContractCloTySpec:ILTypeSpec),ilContractFormalRetTy = GenNamedLocalTypeFuncContractInfo cenv eenv m cloinfo @@ -2896,7 +2887,7 @@ and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv typ cloinfo tyargs let actualRetTy = applyTys cenv.g typ (tyargs,[]) let ilDirectInvokeMethSpec = mkILInstanceMethSpecInTy(ilContractTy, "DirectInvoke", [], ilContractFormalRetTy, ilTyArgs) - let ilActualRetTy = GenType cenv m eenv.tyenv actualRetTy + let ilActualRetTy = GenType cenv.amap m eenv.tyenv actualRetTy CountCallFuncInstructions() CG.EmitInstr cgbuf (pop 1) (Push [ilActualRetTy]) (mkNormalCallvirt ilDirectInvokeMethSpec) actualRetTy @@ -2926,16 +2917,16 @@ and GenIndirectCall cenv cgbuf eenv (functy,tyargs,args,m) sequel = List.fold (fun (formalFuncTyp,sofar) _ -> let dty,rty = destFunTy cenv.g formalFuncTyp - (rty,(fun acc -> sofar (Apps_app(GenType cenv m feenv dty,acc))))) + (rty,(fun acc -> sofar (Apps_app(GenType cenv.amap m feenv dty,acc))))) (formalFuncTyp,id) args - let ilxRetApps = Apps_done (GenType cenv m feenv formalRetTy) + let ilxRetApps = Apps_done (GenType cenv.amap m feenv formalRetTy) - List.foldBack (fun tyarg acc -> Apps_tyapp(GenType cenv m eenv.tyenv tyarg,acc)) tyargs (appBuilder ilxRetApps) + List.foldBack (fun tyarg acc -> Apps_tyapp(GenType cenv.amap m eenv.tyenv tyarg,acc)) tyargs (appBuilder ilxRetApps) let actualRetTy = applyTys cenv.g functy (tyargs, args) - let ilActualRetTy = GenType cenv m eenv.tyenv actualRetTy + let ilActualRetTy = GenType cenv.amap m eenv.tyenv actualRetTy // Check if any byrefs are involved to make sure we don't tailcall let hasByrefArg = @@ -2972,7 +2963,7 @@ and GenTry cenv cgbuf eenv scopeMarks (e1,m,resty,spTry) = let endTryMark = CG.GenerateDelayMark cgbuf "endTryMark" let afterHandler = CG.GenerateDelayMark cgbuf "afterHandler" let eenvinner = {eenvinner with withinSEH = true} - let ilResultTy = GenType cenv m eenvinner.tyenv resty + let ilResultTy = GenType cenv.amap m eenvinner.tyenv resty let whereToSave,eenvinner = AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("tryres",m),ilResultTy, false) (startTryMark,endTryMark) // Generate the body of the try. In the normal case (SequencePointAtTry) we generate a sequence point @@ -3417,7 +3408,7 @@ and GenQuotation cenv cgbuf eenv (ast,conv,m,ety) sequel = let someTypeInModuleExpr = mkTypeOfExpr cenv m eenv.someTypeInThisAssembly let rawTy = mkRawQuotedExprTy cenv.g - let spliceTypeExprs = List.map (GenType cenv m eenv.tyenv >> (mkTypeOfExpr cenv m)) spliceTypes + let spliceTypeExprs = List.map (GenType cenv.amap m eenv.tyenv >> (mkTypeOfExpr cenv m)) spliceTypes let bytesExpr = Expr.Op(TOp.Bytes(astSerializedBytes),[],[],m) @@ -3459,9 +3450,9 @@ and GenILCall cenv cgbuf eenv (virt,valu,newobj,valUseFlags,isDllImport,ilMethRe let makesNoCriticalTailcalls = (newobj || not virt) // Don't tailcall for 'newobj', or 'call' to IL code let tail = CanTailcall(valu,ccallInfo,eenv.withinSEH,hasByrefArg,mustGenerateUnitAfterCall,isDllImport,false,makesNoCriticalTailcalls,sequel) - let ilEnclArgTys = GenTypeArgs cenv m eenv.tyenv enclArgTys - let ilMethArgTys = GenTypeArgs cenv m eenv.tyenv methArgTys - let ilReturnTys = GenTypes cenv m eenv.tyenv returnTys + let ilEnclArgTys = GenTypeArgs cenv.amap m eenv.tyenv enclArgTys + let ilMethArgTys = GenTypeArgs cenv.amap m eenv.tyenv methArgTys + let ilReturnTys = GenTypes cenv.amap m eenv.tyenv returnTys let ilMethSpec = mkILMethSpec (ilMethRef,boxity,ilEnclArgTys,ilMethArgTys) let useICallVirt = virt || useCallVirt cenv boxity ilMethSpec isBaseCall @@ -3474,7 +3465,7 @@ and GenILCall cenv cgbuf eenv (virt,valu,newobj,valUseFlags,isDllImport,ilMethRe else match ccallInfo with | Some objArgTy -> - let ilObjArgTy = GenType cenv m eenv.tyenv objArgTy + let ilObjArgTy = GenType cenv.amap m eenv.tyenv objArgTy [ I_callconstraint(tail,ilObjArgTy,ilMethSpec,None) ] | None -> if useICallVirt then [ I_callvirt(tail,ilMethSpec,None) ] @@ -3538,19 +3529,19 @@ and GenGetValAddr cenv cgbuf eenv (v: ValRef, m) sequel = and GenGetByref cenv cgbuf eenv (v:ValRef,m) sequel = GenGetLocalVRef cenv cgbuf eenv m v None - let ilty = GenType cenv m eenv.tyenv (destByrefTy cenv.g v.Type) + let ilty = GenType cenv.amap m eenv.tyenv (destByrefTy cenv.g v.Type) CG.EmitInstrs cgbuf (pop 1) (Push [ilty]) [ mkNormalLdobj ilty ] GenSequel cenv eenv.cloc cgbuf sequel and GenSetByref cenv cgbuf eenv (v:ValRef,e,m) sequel = GenGetLocalVRef cenv cgbuf eenv m v None GenExpr cenv cgbuf eenv SPSuppress e Continue - let ilty = GenType cenv m eenv.tyenv (destByrefTy cenv.g v.Type) + let ilty = GenType cenv.amap m eenv.tyenv (destByrefTy cenv.g v.Type) CG.EmitInstrs cgbuf (pop 2) Push0 [ mkNormalStobj ilty ] GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel and GenDefaultValue cenv cgbuf eenv (ty,m) = - let ilTy = GenType cenv m eenv.tyenv ty + let ilTy = GenType cenv.amap m eenv.tyenv ty if isRefTy cenv.g ty then CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) AI_ldnull else @@ -3572,7 +3563,7 @@ and GenDefaultValue cenv cgbuf eenv (ty,m) = | Some tcref when (tyconRefEq cenv.g cenv.g.system_Double_tcref tcref) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (iLdcDouble 0.0) | _ -> - let ilTy = GenType cenv m eenv.tyenv ty + let ilTy = GenType cenv.amap m eenv.tyenv ty LocalScope "ilzero" cgbuf (fun scopeMarks -> let locIdx, _ = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("default",m), ilTy, false) scopeMarks // "initobj" (Generated by EmitInitLocal) doesn't work on byref types @@ -3589,7 +3580,7 @@ and GenDefaultValue cenv cgbuf eenv (ty,m) = //-------------------------------------------------------------------------- and GenGenericParam cenv eenv (tp:Typar) = - let subTypeConstraints = tp.Constraints |> List.choose (function | TyparConstraint.CoercesTo(ty,_) -> Some(ty) | _ -> None) |> List.map (GenTypeAuxAux cenv.amap tp.Range eenv.tyenv VoidNotOK PtrTypesNotOK) + let subTypeConstraints = tp.Constraints |> List.choose (function | TyparConstraint.CoercesTo(ty,_) -> Some(ty) | _ -> None) |> List.map (GenTypeAux cenv.amap tp.Range eenv.tyenv VoidNotOK PtrTypesNotOK) let refTypeConstraint = tp.Constraints |> List.exists (function TyparConstraint.IsReferenceType _ -> true | TyparConstraint.SupportsNull _ -> true | _ -> false) let notNullableValueTypeConstraint = tp.Constraints |> List.exists (function TyparConstraint.IsNonNullableStruct _ -> true | _ -> false) let defaultConstructorConstraint = tp.Constraints |> List.exists (function TyparConstraint.RequiresDefaultConstructor _ -> true | _ -> false) @@ -3630,7 +3621,7 @@ and GenSlotParam m cenv eenv (TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attri let inFlag2,outFlag2,optionalFlag2,defaultParamValue,paramMarshal2,attribs = GenParamAttribs cenv attribs { Name=nm - Type= GenParamType cenv m eenv.tyenv ty + Type= GenParamType cenv.amap m eenv.tyenv ty Default=defaultParamValue Marshal=paramMarshal2 IsIn=inFlag || inFlag2 @@ -3640,10 +3631,10 @@ and GenSlotParam m cenv eenv (TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attri and GenFormalSlotsig m cenv eenv (TSlotSig(_,typ,ctps,mtps,paraml,returnTy)) = let paraml = List.concat paraml - let ilTy = GenType cenv m eenv.tyenv typ + let ilTy = GenType cenv.amap m eenv.tyenv typ let eenvForSlotSig = EnvForTypars (ctps @ mtps) eenv let ilParams = paraml |> List.map (GenSlotParam m cenv eenvForSlotSig) - let ilRetTy = GenReturnType cenv m eenvForSlotSig.tyenv returnTy + let ilRetTy = GenReturnType cenv.amap m eenvForSlotSig.tyenv returnTy let ilRet = mkILReturn ilRetTy ilTy, ilParams, ilRet @@ -3655,7 +3646,7 @@ and GenActualSlotsig m cenv eenv (TSlotSig(_,typ,ctps,mtps,ilSlotParams,ilSlotRe let ilParams = ilSlotParams |> List.map (instSlotParam instForSlotSig >> GenSlotParam m cenv eenv) // Use the better names if available let ilParams = if ilParams.Length = methodParams.Length then (ilParams, methodParams) ||> List.map2 (fun p pv -> { p with Name = Some (nameOfVal pv) }) else ilParams - let ilRetTy = GenReturnType cenv m eenv.tyenv (Option.map (instType instForSlotSig) ilSlotRetTy) + let ilRetTy = GenReturnType cenv.amap m eenv.tyenv (Option.map (instType instForSlotSig) ilSlotRetTy) let iLRet = mkILReturn ilRetTy ilParams,iLRet @@ -3761,7 +3752,7 @@ and GenObjectExpr cenv cgbuf eenvouter expr (baseType,baseValOpt,basecall,overri let mimpls = mimpls |> List.choose id // choose the ones that actually have method impls - let interfaceTys = interfaceImpls |> List.map (fst >> GenType cenv m eenvinner.tyenv) + let interfaceTys = interfaceImpls |> List.map (fst >> GenType cenv.amap m eenvinner.tyenv) let attrs = GenAttrs cenv eenvinner cloAttribs let super = (if isInterfaceTy cenv.g baseType then cenv.g.ilg.typ_Object else ilCloRetTy) @@ -3787,13 +3778,13 @@ and GenSequenceExpr cenv (cgbuf:CodeGenBuffer) eenvouter (nextEnumeratorValRef:V let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilCloTypeRef:ILTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv m None eenvouter [] (mkLambda m nextEnumeratorValRef.Deref (generateNextExpr, cenv.g.int32_ty)) - let ilCloSeqElemTy = GenType cenv m eenvinner.tyenv seqElemTy + let ilCloSeqElemTy = GenType cenv.amap m eenvinner.tyenv seqElemTy let cloRetTy = mkSeqTy cenv.g seqElemTy - let ilCloRetTyInner = GenType cenv m eenvinner.tyenv cloRetTy - let ilCloRetTyOuter = GenType cenv m eenvouter.tyenv cloRetTy - let ilCloEnumeratorTy = GenType cenv m eenvinner.tyenv (mkIEnumeratorTy cenv.g seqElemTy) - let ilCloEnumerableTy = GenType cenv m eenvinner.tyenv (mkSeqTy cenv.g seqElemTy) - let ilCloBaseTy = GenType cenv m eenvinner.tyenv (mkAppTy cenv.g.seq_base_tcr [seqElemTy]) + let ilCloRetTyInner = GenType cenv.amap m eenvinner.tyenv cloRetTy + let ilCloRetTyOuter = GenType cenv.amap m eenvouter.tyenv cloRetTy + let ilCloEnumeratorTy = GenType cenv.amap m eenvinner.tyenv (mkIEnumeratorTy cenv.g seqElemTy) + let ilCloEnumerableTy = GenType cenv.amap m eenvinner.tyenv (mkSeqTy cenv.g seqElemTy) + let ilCloBaseTy = GenType cenv.amap m eenvinner.tyenv (mkAppTy cenv.g.seq_base_tcr [seqElemTy]) let ilCloGenericParams = GenGenericParams cenv eenvinner cloFreeTyvars // Create a new closure class with a single "MoveNext" method that implements the iterator. @@ -3961,7 +3952,7 @@ and GenLambda cenv cgbuf eenv isLocalTypeFunc selfv expr sequel = GenSequel cenv eenv.cloc cgbuf sequel and GenTypeOfVal cenv eenv (v:Val) = - GenType cenv v.Range eenv.tyenv v.Type + GenType cenv.amap v.Range eenv.tyenv v.Type and GenFreevar cenv m eenvouter tyenvinner (fv:Val) = match StorageForVal m fv eenvouter with @@ -3971,7 +3962,7 @@ and GenFreevar cenv m eenvouter tyenvinner (fv:Val) = // Check for things that should never make it into the free variable set. Only do this in debug for performance reasons | (StaticField _ | StaticProperty _ | Method _ | Null) -> error(InternalError("GenFreevar: compiler error: unexpected unrealized value",fv.Range)) #endif - | _ -> GenType cenv m tyenvinner fv.Type + | _ -> GenType cenv.amap m tyenvinner fv.Type and GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr = @@ -4112,7 +4103,7 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = let lambdas = Lambdas_lambda (mkILParamNamed(nm,GenTypeOfVal cenv eenv v),l) lambdas,eenv | _ -> - let returnTy' = GenType cenv m eenv.tyenv returnTy + let returnTy' = GenType cenv.amap m eenv.tyenv returnTy Lambdas_return returnTy', eenv // start at arg number 1 as "this" pointer holds the current closure @@ -4122,7 +4113,7 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = let narginfo = vs |> List.map (fun _ -> 1) // Generate the ILX view of the lambdas - let ilReturnTy = GenType cenv m eenvinner.tyenv returnTy + let ilReturnTy = GenType cenv.amap m eenvinner.tyenv returnTy // The general shape is: // {LAM . expr }[free-typars] : overall-type[contract-typars] @@ -4221,14 +4212,14 @@ and GenNamedLocalTypeFuncContractInfo cenv eenv m cloinfo = | e -> [], tyOfExpr cenv.g e let eenvForContract = AddTyparsToEnv tvs eenvForContract let ilContractMethTyargs = GenGenericParams cenv eenvForContract tvs - let ilContractFormalRetTy = GenType cenv m eenvForContract.tyenv contractRetTy + let ilContractFormalRetTy = GenType cenv.amap m eenvForContract.tyenv contractRetTy ilContractGenericParams,ilContractMethTyargs,mkILTySpec(ilContractTypeRef,cloinfo.localTypeFuncILGenericArgs),ilContractFormalRetTy /// Generate a new delegate construction including a closure class if necessary. This is a lot like generating function closures /// and object expression closures, and most of the code is shared. and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delegateTy, _,_,_, _) as slotsig),_attribs,methTyparsOfOverridingMethod,tmvs,body,_),m) sequel = // Get the instantiation of the delegate type - let ilCtxtDelTy = GenType cenv m eenvouter.tyenv delegateTy + let ilCtxtDelTy = GenType cenv.amap m eenvouter.tyenv delegateTy let tmvs = List.concat tmvs // Yuck. TLBIMP.EXE generated APIs use UIntPtr for the delegate ctor. @@ -4345,7 +4336,7 @@ and GenJoinPoint cenv cgbuf pos eenv ty m sequel = // The others (e.g. Continue, LeaveFilter and CmpThenBrOrContinue) can't be done at the end of each branch. We must create a join point. | _ -> - let pushed = GenType cenv m eenv.tyenv ty + let pushed = GenType cenv.amap m eenv.tyenv ty let stackAfterJoin = (pushed :: (cgbuf.GetCurrentStack())) let afterJoin = CG.GenerateDelayMark cgbuf (pos + "_join") // go to the join point @@ -4547,7 +4538,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau match defaultTargetOpt with | None -> rest.Head.CaseTree | Some tg -> tg - let cuspec = GenUnionSpec cenv m eenv.tyenv c.TyconRef tyargs + let cuspec = GenUnionSpec cenv.amap m eenv.tyenv c.TyconRef tyargs let idx = c.Index let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib c.TyconRef GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e (Some (pop 1, Push [cenv.g.ilg.typ_Bool], Choice1Of2 (avoidHelpers, cuspec, idx))) eenv successTree failureTree targets repeatSP targetInfos sequel @@ -4572,7 +4563,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau GenExpr cenv cgbuf eenv SPSuppress e Continue let srcTy = tyOfExpr cenv.g e if isTyparTy cenv.g srcTy then - let ilFromTy = GenType cenv m eenv.tyenv srcTy + let ilFromTy = GenType cenv.amap m eenv.tyenv srcTy CG.EmitInstr cgbuf (pop 1) (Push [cenv.g.ilg.typ_Object]) (I_box ilFromTy) BI_brfalse | DecisionTreeTest.IsInst (_srcty,tgty) -> @@ -4586,7 +4577,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau | DecisionTreeTest.ActivePatternCase _ -> error(InternalError("internal error in codegen: DecisionTreeTest.ActivePatternCase",switchm)) | DecisionTreeTest.UnionCase (hdc,tyargs) -> GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec = GenUnionSpec cenv m eenv.tyenv hdc.TyconRef tyargs + let cuspec = GenUnionSpec cenv.amap m eenv.tyenv hdc.TyconRef tyargs let dests = if cases.Length <> caseLabels.Length then failwith "internal error: DecisionTreeTest.UnionCase" (cases , caseLabels) ||> List.map2 (fun case label -> @@ -5184,7 +5175,7 @@ and GenPropertyForMethodDef compileAsInstance tref mdef (v:Val) (memberInfo:ValM and GenEventForProperty cenv eenvForMeth (mspec:ILMethodSpec) (v:Val) ilAttrsThatGoOnPrimaryItem m returnTy = let evname = v.PropertyName let delegateTy = Infos.FindDelegateTypeOfPropertyEvent cenv.g cenv.amap evname m returnTy - let ilDelegateTy = GenType cenv m eenvForMeth.tyenv delegateTy + let ilDelegateTy = GenType cenv.amap m eenvForMeth.tyenv delegateTy let ilThisTy = mspec.DeclaringType let addMethRef = mkILMethRef (ilThisTy.TypeRef,mspec.CallingConv,"add_" + evname,0,[ilDelegateTy],ILType.Void) let removeMethRef = mkILMethRef (ilThisTy.TypeRef,mspec.CallingConv,"remove_" + evname,0,[ilDelegateTy],ILType.Void) @@ -5451,8 +5442,8 @@ and GenMethodForBinding // Emit the property, but not if its a private method impl if mdef.Access <> ILMemberAccess.Private then let vtyp = ReturnTypeOfPropertyVal cenv.g v - let ilPropTy = GenType cenv m eenvUnderMethTypeTypars.tyenv vtyp - let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv m eenvUnderMethTypeTypars.tyenv + let ilPropTy = GenType cenv.amap m eenvUnderMethTypeTypars.tyenv vtyp + let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv.amap m eenvUnderMethTypeTypars.tyenv let ilPropDef = GenPropertyForMethodDef compileAsInstance tref mdef v memberInfo ilArgTys ilPropTy (mkILCustomAttrs ilAttrsThatGoOnPrimaryItem) compiledName mgbuf.AddOrMergePropertyDef(tref,ilPropDef,m) @@ -5529,7 +5520,7 @@ and GenSetVal cenv cgbuf eenv (vref,e,m) sequel = and GenGetValRefAndSequel cenv cgbuf eenv m (v:ValRef) fetchSequel = let ty = v.Type - GenGetStorageAndSequel cenv cgbuf eenv m (ty, GenType cenv m eenv.tyenv ty) (StorageForValRef m v eenv) fetchSequel + GenGetStorageAndSequel cenv cgbuf eenv m (ty, GenType cenv.amap m eenv.tyenv ty) (StorageForValRef m v eenv) fetchSequel and GenGetVal cenv cgbuf eenv (v:ValRef,m) sequel = GenGetValRefAndSequel cenv cgbuf eenv m v None @@ -5818,16 +5809,16 @@ and GenAttribArg cenv eenv x (ilArgTy:ILType) = // Detect '[| ... |]' nodes | Expr.Op(TOp.Array,[elemTy],args,m),_ -> - let ilElemTy = GenType cenv m eenv.tyenv elemTy + let ilElemTy = GenType cenv.amap m eenv.tyenv elemTy ILAttribElem.Array (ilElemTy, List.map (fun arg -> GenAttribArg cenv eenv arg ilElemTy) args) // Detect 'typeof' calls | TypeOfExpr g ty, _ -> - ILAttribElem.Type (Some (GenType cenv x.Range eenv.tyenv ty)) + ILAttribElem.Type (Some (GenType cenv.amap x.Range eenv.tyenv ty)) // Detect 'typedefof' calls | TypeDefOfExpr g ty, _ -> - ILAttribElem.TypeRef (Some (GenType cenv x.Range eenv.tyenv ty).TypeRef) + ILAttribElem.TypeRef (Some (GenType cenv.amap x.Range eenv.tyenv ty).TypeRef) // Ignore upcasts | Expr.Op(TOp.Coerce,_,[arg2],_),_ -> @@ -5864,7 +5855,7 @@ and GenAttr cenv eenv (Attrib(_,k,args,props,_,_,_)) = let props = props |> List.map (fun (AttribNamedArg(s,ty,fld,AttribExpr(_,expr))) -> let m = expr.Range - let ilTy = GenType cenv m eenv.tyenv ty + let ilTy = GenType cenv.amap m eenv.tyenv ty let cval = GenAttribArg cenv eenv expr ilTy (s,ilTy,fld,cval)) let mspec = @@ -6237,8 +6228,8 @@ and GenAbstractBinding cenv eenv tref (vref:ValRef) = [],[],[edef] else let ilPropDef = - let ilPropTy = GenType cenv m eenvForMeth.tyenv vtyp - let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv m eenvForMeth.tyenv + let ilPropTy = GenType cenv.amap m eenvForMeth.tyenv vtyp + let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv.amap m eenvForMeth.tyenv GenPropertyForMethodDef compileAsInstance tref mdef v memberInfo ilArgTys ilPropTy (mkILCustomAttrs ilAttrs) None let mdef = mdef.WithSpecialName [mdef], [ilPropDef],[] @@ -6299,10 +6290,10 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let eenvinner = ReplaceTyenv (TypeReprEnv.ForTycon tycon) eenv let thisTy = generalizedTyconRef tcref - let ilThisTy = GenType cenv m eenvinner.tyenv thisTy + let ilThisTy = GenType cenv.amap m eenvinner.tyenv thisTy let tref = ilThisTy.TypeRef let ilGenParams = GenGenericParams cenv eenvinner tycon.TyparsNoRange - let ilIntfTys = tycon.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv m eenvinner.tyenv) + let ilIntfTys = tycon.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv.amap m eenvinner.tyenv) let ilTypeName = tref.Name let hidden = IsHiddenTycon eenv.sigToImplRemapInfo tycon @@ -6453,7 +6444,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = ((fspec.IsCompilerGenerated && not tycon.IsEnumTycon) || hiddenRepr || IsHiddenRecdField eenv.sigToImplRemapInfo (tcref.MakeNestedRecdFieldRef fspec)) - let ilType = GenType cenv m eenvinner.tyenv fspec.FormalType + let ilType = GenType cenv.amap m eenvinner.tyenv fspec.FormalType let ilFieldName = ComputeFieldName tycon fspec yield (useGenuineField, ilFieldName, fspec.IsMutable, fspec.IsStatic, fspec.PropertyAttribs, ilType, isPropHidden, fspec) ] @@ -6687,7 +6678,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = | TRecdRepr _ | TFSharpObjectRepr _ as tyconRepr -> let super = superOfTycon cenv.g tycon - let ilBaseTy = GenType cenv m eenvinner.tyenv super + let ilBaseTy = GenType cenv.amap m eenvinner.tyenv super // Build a basic type definition let isObjectType = (match tyconRepr with TFSharpObjectRepr _ -> true | _ -> false) @@ -6890,7 +6881,7 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = let ilMethodDefsForProperties,ilFieldDefs,ilPropertyDefs,fieldNamesAndTypes = [ for i,fld in markup fspecs do let ilPropName = fld.Name - let ilPropType = GenType cenv m eenv.tyenv fld.FormalType + let ilPropType = GenType cenv.amap m eenv.tyenv fld.FormalType let ilMethName = "get_" + fld.Name let ilFieldName = ComputeFieldName exnc fld let ilMethodDef = mkLdfldMethodDef (ilMethName,reprAccess,false,ilThisTy,ilFieldName,ilPropType) @@ -6969,7 +6960,7 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = let ilTypeName = tref.Name - let interfaces = exnc.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv m eenv.tyenv) + let interfaces = exnc.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv.amap m eenv.tyenv) let tdef = mkILGenericClass (ilTypeName,access,[],cenv.g.iltyp_Exception, @@ -7141,7 +7132,7 @@ let LookupGeneratedValue (amap:ImportMap) (ctxt: ExecutionContext) eenv (v:Val) try // Convert the v.Type into a System.Type according to ilxgen and ilreflect. let objTyp = - let ilTy = GenTypeAux amap v.Range TypeReprEnv.Empty v.Type (* TypeReprEnv.Empty ok, not expecting typars *) + let ilTy = GenType amap v.Range TypeReprEnv.Empty v.Type (* TypeReprEnv.Empty ok, not expecting typars *) ctxt.LookupType ilTy // Lookup the compiled v value (as an object). match StorageForVal v.Range v eenv with From 05ceacad426799fe3e4c42c790a6ee064b68fe02 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 May 2018 11:36:15 +0100 Subject: [PATCH 12/24] simplify diff --- src/fsharp/IlxGen.fs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index 02d9862530c..c890093fa1c 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -373,24 +373,22 @@ type PtrsOK = let rec GenTypeArgAux amap m tyenv tyarg = GenTypeAux amap m tyenv VoidNotOK PtrTypesNotOK tyarg -and GenTypeArgs amap m tyenv tyargs = +and GenTypeArgsAux amap m tyenv tyargs = List.map (GenTypeArgAux amap m tyenv) (DropErasedTyargs tyargs) -and GenTyApp amap m tyenv repr tinst = +and GenTyAppAux amap m tyenv repr tinst = match repr with | CompiledTypeRepr.ILAsmOpen ty -> - let ilTypeInst = GenTypeArgs amap m tyenv tinst + let ilTypeInst = GenTypeArgsAux amap m tyenv tinst let ty = IL.instILType ilTypeInst ty ty | CompiledTypeRepr.ILAsmNamed (tref, boxity, ilTypeOpt) -> GenILTyAppAux amap m tyenv (tref, boxity, ilTypeOpt) tinst -and GenNamedTyApp amap m tyenv tcref tinst = GenNamedTyAppAux amap m tyenv PtrTypesNotOK tcref tinst - and GenILTyAppAux amap m tyenv (tref, boxity, ilTypeOpt) tinst = match ilTypeOpt with | None -> - let ilTypeInst = GenTypeArgs amap m tyenv tinst + 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 @@ -409,7 +407,7 @@ and GenNamedTyAppAux (amap:ImportMap) m tyenv ptrsOK tcref tinst = GenTypeAux amap m tyenv VoidNotOK ptrsOK (info.BaseTypeForErased (m,g.obj_ty)) | _ -> #endif - GenTyApp amap m tyenv (GenTyconRef tcref) tinst + GenTyAppAux amap m tyenv (GenTyconRef tcref) tinst and GenTypeAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = let g = amap.g @@ -490,21 +488,29 @@ and ComputeUnionHasHelpers g (tcref : TyconRef) = and GenUnionSpec amap m tyenv tcref tyargs = let curef = GenUnionRef amap m tcref - let tinst = GenTypeArgs amap m tyenv tyargs + let tinst = GenTypeArgsAux amap m tyenv tyargs IlxUnionSpec(curef,tinst) and GenUnionCaseSpec amap m tyenv (ucref:UnionCaseRef) tyargs = let cuspec = GenUnionSpec amap m tyenv ucref.TyconRef tyargs cuspec, ucref.Index +and GenType amap m tyenv ty = + GenTypeAux amap m tyenv VoidNotOK PtrTypesNotOK ty + + +and GenTypes amap m tyenv tys = List.map (GenType amap m tyenv) tys + +and GenTyApp amap m tyenv repr tyargs = GenTyAppAux amap m tyenv repr tyargs +and GenNamedTyApp amap m tyenv tcref tinst = GenNamedTyAppAux amap m tyenv PtrTypesNotOK tcref tinst + /// IL void types are only generated for return types and GenReturnType amap m tyenv returnTyOpt = match returnTyOpt with | None -> ILType.Void | Some returnTy -> GenTypeAux amap m tyenv VoidNotOK(*1*) PtrTypesOK returnTy (*1: generate void from unit, but not accept void *) -and GenType amap m tyenv ty = GenTypeAux amap m tyenv VoidNotOK PtrTypesNotOK ty -and GenTypes amap m tyenv tys = List.map (GenType amap m tyenv) tys +and GenTypeArgs amap m tyenv tyargs = GenTypeArgsAux amap m tyenv tyargs and GenParamType amap m tyenv ty = GenTypeAux amap m tyenv VoidNotOK PtrTypesOK ty and GenParamTypes amap m tyenv tys = tys |> List.map (GenParamType amap m tyenv) and GenTypePermitVoidAux amap m tyenv ty = GenTypeAux amap m tyenv VoidOK PtrTypesNotOK ty From 91a969c89c626162ca778d3f689282ae1c70c5a5 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 May 2018 11:44:38 +0100 Subject: [PATCH 13/24] simplify diff --- src/fsharp/IlxGen.fs | 56 +++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index c890093fa1c..00d763c6978 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -488,7 +488,7 @@ and ComputeUnionHasHelpers g (tcref : TyconRef) = and GenUnionSpec amap m tyenv tcref tyargs = let curef = GenUnionRef amap m tcref - let tinst = GenTypeArgsAux amap m tyenv tyargs + let tinst = GenTypeArgs amap m tyenv tyargs IlxUnionSpec(curef,tinst) and GenUnionCaseSpec amap m tyenv (ucref:UnionCaseRef) tyargs = @@ -500,6 +500,8 @@ and GenType amap m tyenv ty = and GenTypes amap m tyenv tys = List.map (GenType amap m tyenv) tys +and GenTypePermitVoid amap m tyenv ty = (GenTypeAux amap m tyenv VoidOK PtrTypesNotOK ty) +and GenTypesPermitVoid amap m tyenv tys = List.map (GenTypePermitVoid amap m tyenv) tys and GenTyApp amap m tyenv repr tyargs = GenTyAppAux amap m tyenv repr tyargs and GenNamedTyApp amap m tyenv tcref tinst = GenNamedTyAppAux amap m tyenv PtrTypesNotOK tcref tinst @@ -510,9 +512,13 @@ and GenReturnType amap m tyenv returnTyOpt = | None -> ILType.Void | Some returnTy -> GenTypeAux amap m tyenv VoidNotOK(*1*) PtrTypesOK returnTy (*1: generate void from unit, but not accept void *) +and GenParamType amap m tyenv ty = + ty |> GenTypeAux amap m tyenv VoidNotOK PtrTypesOK + +and GenParamTypes amap m tyenv tys = + tys |> List.map (GenTypeAux amap m tyenv VoidNotOK PtrTypesOK) + and GenTypeArgs amap m tyenv tyargs = GenTypeArgsAux amap m tyenv tyargs -and GenParamType amap m tyenv ty = GenTypeAux amap m tyenv VoidNotOK PtrTypesOK ty -and GenParamTypes amap m tyenv tys = tys |> List.map (GenParamType amap m tyenv) 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 @@ -544,6 +550,8 @@ let GenRecdFieldRef m cenv tyenv (rfref:RecdFieldRef) tyargs = ComputeFieldName rfref.Tycon rfref.RecdField, GenType cenv.amap m tyenvinner rfref.RecdField.FormalType) +let GenExnType amap m tyenv (ecref:TyconRef) = GenTyApp amap m tyenv ecref.CompiledRepresentation [] + //-------------------------------------------------------------------------- // Closure summaries //-------------------------------------------------------------------------- @@ -1389,10 +1397,6 @@ type AssemblyBuilder(cenv:cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf member mgbuf.cenv = cenv member mgbuf.GetExplicitEntryPointInfo() = explicitEntryPointInfo -let GenTypePermitVoid cenv m tyenv ty = GenTypeAux cenv.amap m tyenv VoidOK PtrTypesNotOK ty -let GenTypesPermitVoid cenv m tyenv tys = List.map (GenTypePermitVoid cenv m tyenv) tys -let GenExnType amap m tyenv (ecref:TyconRef) = GenTyApp amap m tyenv ecref.CompiledRepresentation [] - /// 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. @@ -3244,8 +3248,8 @@ and GenSequential cenv cgbuf eenv spIn (e1,e2,specialSeqFlag,spSeq,_m) sequel = //-------------------------------------------------------------------------- and GenAsmCode cenv cgbuf eenv (il,tyargs,args,returnTys,m) sequel = - let ilTyArgs = GenTypesPermitVoid cenv m eenv.tyenv tyargs - let ilReturnTys = GenTypesPermitVoid cenv m eenv.tyenv returnTys + let ilTyArgs = GenTypesPermitVoid cenv.amap m eenv.tyenv tyargs + let ilReturnTys = GenTypesPermitVoid cenv.amap m eenv.tyenv returnTys let ilAfterInst = il |> List.filter (function AI_nop -> false | _ -> true) |> List.map (fun i -> @@ -5773,8 +5777,7 @@ and EmitRestoreStack cgbuf (savedStack,savedStackLocals) = //GenAttr: custom attribute generation //------------------------------------------------------------------------- -and GenAttribArg cenv eenv x (ilArgTy:ILType) = - let g = cenv.g +and GenAttribArg amap g eenv x (ilArgTy:ILType) = match x,ilArgTy with @@ -5815,31 +5818,31 @@ and GenAttribArg cenv eenv x (ilArgTy:ILType) = // Detect '[| ... |]' nodes | Expr.Op(TOp.Array,[elemTy],args,m),_ -> - let ilElemTy = GenType cenv.amap m eenv.tyenv elemTy - ILAttribElem.Array (ilElemTy, List.map (fun arg -> GenAttribArg cenv eenv arg ilElemTy) args) + let ilElemTy = GenType amap m eenv.tyenv elemTy + ILAttribElem.Array (ilElemTy, List.map (fun arg -> GenAttribArg amap g eenv arg ilElemTy) args) // Detect 'typeof' calls | TypeOfExpr g ty, _ -> - ILAttribElem.Type (Some (GenType cenv.amap x.Range eenv.tyenv ty)) + ILAttribElem.Type (Some (GenType amap x.Range eenv.tyenv ty)) // Detect 'typedefof' calls | TypeDefOfExpr g ty, _ -> - ILAttribElem.TypeRef (Some (GenType cenv.amap x.Range eenv.tyenv ty).TypeRef) + ILAttribElem.TypeRef (Some (GenType amap x.Range eenv.tyenv ty).TypeRef) // Ignore upcasts | Expr.Op(TOp.Coerce,_,[arg2],_),_ -> - GenAttribArg cenv eenv arg2 ilArgTy + GenAttribArg amap g eenv arg2 ilArgTy // Detect explicit enum values | EnumExpr g arg1, _ -> - GenAttribArg cenv eenv arg1 ilArgTy + GenAttribArg amap g eenv arg1 ilArgTy // Detect bitwise or of attribute flags: one case of constant folding (a more general treatment is needed) | AttribBitwiseOrExpr g (arg1,arg2),_ -> - let v1 = GenAttribArg cenv eenv arg1 ilArgTy - let v2 = GenAttribArg cenv eenv arg2 ilArgTy + let v1 = GenAttribArg amap g eenv arg1 ilArgTy + let v2 = GenAttribArg amap g eenv arg2 ilArgTy match v1,v2 with | ILAttribElem.SByte i1, ILAttribElem.SByte i2 -> ILAttribElem.SByte (i1 ||| i2) | ILAttribElem.Int16 i1, ILAttribElem.Int16 i2-> ILAttribElem.Int16 (i1 ||| i2) @@ -5856,25 +5859,24 @@ and GenAttribArg cenv eenv x (ilArgTy:ILType) = error (InternalError ("invalid custom attribute value (not a constant): " + showL (exprL x),x.Range)) -and GenAttr cenv eenv (Attrib(_,k,args,props,_,_,_)) = - let g = cenv.g +and GenAttr (amap: ImportMap) g eenv (Attrib(_,k,args,props,_,_,_)) = let props = props |> List.map (fun (AttribNamedArg(s,ty,fld,AttribExpr(_,expr))) -> let m = expr.Range - let ilTy = GenType cenv.amap m eenv.tyenv ty - let cval = GenAttribArg cenv eenv expr ilTy + let ilTy = GenType amap m eenv.tyenv ty + let cval = GenAttribArg amap g eenv expr ilTy (s,ilTy,fld,cval)) let mspec = match k with | ILAttrib(mref) -> mkILMethSpec(mref,AsObject,[],[]) | FSAttrib(vref) -> assert(vref.IsMember) - let mspec,_,_,_,_ = GetMethodSpecForMemberVal cenv.amap g (Option.get vref.MemberInfo) vref + let mspec,_,_,_,_ = GetMethodSpecForMemberVal amap g (Option.get vref.MemberInfo) vref mspec - let ilArgs = List.map2 (fun (AttribExpr(_,vexpr)) ty -> GenAttribArg cenv eenv vexpr ty) args mspec.FormalArgTypes + let ilArgs = List.map2 (fun (AttribExpr(_,vexpr)) ty -> GenAttribArg amap g eenv vexpr ty) args mspec.FormalArgTypes mkILCustomAttribMethRef g.ilg (mspec,ilArgs, props) -and GenAttrs cenv eenv attrs = List.map (GenAttr cenv eenv) attrs +and GenAttrs cenv eenv attrs = List.map (GenAttr cenv.amap cenv.g eenv) attrs and GenCompilationArgumentCountsAttr cenv (v:Val) = [ match v.ValReprInfo with @@ -5891,7 +5893,7 @@ and CreatePermissionSets cenv eenv (securityAttributes : Attrib list) = 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 cenv eenv attr + let ilattr = GenAttr cenv.amap cenv.g eenv attr let _, ilNamedArgs = match TryDecodeILAttribute cenv.g tref (mkILCustomAttrs [ilattr]) with | Some(ae,na) -> ae, na From 22918570fb6f4cc05a87e71e38336b911d3be79d Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 May 2018 11:52:58 +0100 Subject: [PATCH 14/24] simplify diff --- src/fsharp/IlxGen.fs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index 00d763c6978..c9cd2726d1f 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -4851,7 +4851,7 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta let tps,ctorThisValOpt,baseValOpt,vsl,body',bodyty = IteratedAdjustArityOfLambda cenv.g cenv.amap topValInfo rhsExpr let methodVars = List.concat vsl CommitStartScope cgbuf startScopeMarkOpt - GenMethodForBinding cenv cgbuf.mgbuf eenv (vspec,mspec,access,paramInfos,retInfo) (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, body', bodyty) + GenMethodForBinding cenv cgbuf eenv (vspec,mspec,access,paramInfos,retInfo) (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, body', bodyty) | StaticProperty (ilGetterMethSpec, optShadowLocal) -> @@ -5256,7 +5256,7 @@ and ComputeMethodImplAttribs cenv (_v:Val) attrs = hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningImplFlag, hasAggressiveInliningImplFlag, attrs and GenMethodForBinding - cenv mgbuf eenv + cenv cgbuf eenv (v:Val,mspec,access,paramInfos,retInfo) (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, body, returnTy) = @@ -5320,7 +5320,7 @@ and GenMethodForBinding // This is the main code generation for most methods false, - MethodBody.IL(CodeGenMethodForExpr cenv mgbuf (SPAlways,tailCallInfo, mspec.Name, eenvForMeth, 0, 0, bodyExpr, sequel)), + MethodBody.IL(CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,tailCallInfo, mspec.Name, eenvForMeth, 0, 0, bodyExpr, sequel)), false // Do not generate DllImport attributes into the code - they are implicit from the P/Invoke @@ -5381,7 +5381,7 @@ and GenMethodForBinding else mdef CountMethodDef() - mgbuf.AddMethodDef(tref,mdef) + cgbuf.mgbuf.AddMethodDef(tref,mdef) match v.MemberInfo with @@ -5418,7 +5418,7 @@ and GenMethodForBinding let mdef = List.fold (fun mdef f -> f mdef) mdef flagFixups // fixup can potentially change name of reflected definition that was already recorded - patch it if necessary - mgbuf.ReplaceNameOfReflectedDefinition(v, mdef.Name) + cgbuf.mgbuf.ReplaceNameOfReflectedDefinition(v, mdef.Name) mdef else mkILGenericNonVirtualMethod (v.CompiledName,access,ilMethTypars,ilParams,ilReturn,ilMethodBody) @@ -5445,7 +5445,7 @@ and GenMethodForBinding // Emit the pseudo-property as an event, but not if its a private method impl if mdef.Access <> ILMemberAccess.Private then let edef = GenEventForProperty cenv eenvForMeth mspec v ilAttrsThatGoOnPrimaryItem m returnTy - mgbuf.AddEventDef(tref,edef) + cgbuf.mgbuf.AddEventDef(tref,edef) // The method def is dropped on the floor here else @@ -5455,7 +5455,7 @@ and GenMethodForBinding let ilPropTy = GenType cenv.amap m eenvUnderMethTypeTypars.tyenv vtyp let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv.amap m eenvUnderMethTypeTypars.tyenv let ilPropDef = GenPropertyForMethodDef compileAsInstance tref mdef v memberInfo ilArgTys ilPropTy (mkILCustomAttrs ilAttrsThatGoOnPrimaryItem) compiledName - mgbuf.AddOrMergePropertyDef(tref,ilPropDef,m) + cgbuf.mgbuf.AddOrMergePropertyDef(tref,ilPropDef,m) // Add the special name flag for all properties let mdef = { mdef.WithSpecialName with CustomAttrs= mkILCustomAttrs ((GenAttrs cenv eenv attrsAppliedToGetterOrSetter) @ sourceNameAttribs @ ilAttrsCompilerGenerated) } From a0f54ce1d7fdd2f55a6a7a1525f9abb926005b3c Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 May 2018 11:54:30 +0100 Subject: [PATCH 15/24] simplify diff --- src/fsharp/IlxGen.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index c9cd2726d1f..865b3c2d535 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -5859,7 +5859,7 @@ and GenAttribArg amap g eenv x (ilArgTy:ILType) = error (InternalError ("invalid custom attribute value (not a constant): " + showL (exprL x),x.Range)) -and GenAttr (amap: ImportMap) g eenv (Attrib(_,k,args,props,_,_,_)) = +and GenAttr amap g eenv (Attrib(_,k,args,props,_,_,_)) = let props = props |> List.map (fun (AttribNamedArg(s,ty,fld,AttribExpr(_,expr))) -> let m = expr.Range From 1f5a26bcd757220a80618e1353c867bef0f9379e Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 May 2018 12:12:12 +0100 Subject: [PATCH 16/24] integrate dev15.8 --- src/fsharp/xlf/FSComp.txt.en.xlf | 5 ++--- src/fsharp/xlf/FSComp.txt.es.xlf | 5 ++--- src/fsharp/xlf/FSComp.txt.fr.xlf | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/fsharp/xlf/FSComp.txt.en.xlf b/src/fsharp/xlf/FSComp.txt.en.xlf index 7104be610f2..c0ce7e314fb 100644 --- a/src/fsharp/xlf/FSComp.txt.en.xlf +++ b/src/fsharp/xlf/FSComp.txt.en.xlf @@ -6982,7 +6982,6 @@ This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. -<<<<<<< HEAD Unmatched '{{|' Unmatched '{{|' @@ -7016,11 +7015,11 @@ 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 -======= + + The file '{0}' changed on disk unexpectedly, please reload. The file '{0}' changed on disk unexpectedly, please reload. ->>>>>>> c5d58714cc945bc489e860acfbd7056fd05cc622 diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index e247d1155de..99e40f18118 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -6982,7 +6982,6 @@ Esta expresión devuelve un valor de tipo “{0}”, pero se descarta de forma implícita. Considere el uso de “let” para enlazar el resultado a un nombre; por ejemplo, “let result = expression”. Si su intención es utilizar la expresión como un valor en la secuencia, utilice “yield” de forma explícita. -<<<<<<< HEAD Unmatched '{{|' Unmatched '{{|' @@ -7016,11 +7015,11 @@ 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 -======= + + The file '{0}' changed on disk unexpectedly, please reload. El archivo "{0}" cambió en el disco de manera inesperada; cárguelo de nuevo. ->>>>>>> c5d58714cc945bc489e860acfbd7056fd05cc622 diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index e9f64c00051..9d8396cc6db 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -6982,7 +6982,6 @@ Cette expression retourne une valeur de type '{0}', mais est implicitement ignorée. Utilisez 'let' pour lier le résultat à un nom, par ex. 'let result = expression'. Si vous voulez utiliser l'expression comme valeur dans la séquence, utilisez un 'yield!' explicite. -<<<<<<< HEAD Unmatched '{{|' Unmatched '{{|' @@ -7016,11 +7015,11 @@ 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 -======= + + The file '{0}' changed on disk unexpectedly, please reload. Changement inattendu du fichier '{0}' sur le disque. Rechargez le fichier. ->>>>>>> c5d58714cc945bc489e860acfbd7056fd05cc622 From ddb3ca87ec8fe91557db0e7d37342687b3dd8f64 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 May 2018 12:29:31 +0100 Subject: [PATCH 17/24] integrate dev15.8 --- .../FSharp.Compiler.Private/FSComp.resx | 1 + src/fsharp/IlxGen.fs | 30 +++++++++---------- src/fsharp/IlxGen.fsi | 2 +- src/fsharp/symbols/Symbols.fs | 2 +- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx index 45f72cf0bfc..2c7b2115d04 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx @@ -4323,6 +4323,7 @@ The file '{0}' changed on disk unexpectedly, please reload. + Invalid anonymous record expression diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index ce1c424b9d3..04bf2352b49 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -1187,10 +1187,11 @@ type AssemblyBuilder(cenv:cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf { Name = sprintf "<%s>j__TPar" nm Constraints = [] Variance=NonVariant - CustomAttrs = emptyILCustomAttrs + CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs HasReferenceTypeConstraint=false HasNotNullableValueTypeConstraint=false - HasDefaultConstructorConstraint= false } ] + HasDefaultConstructorConstraint= false + MetadataIndex = NoMetadataIdx } ] let ilTy = mkILFormalNamedTy (if isStruct then ILBoxity.AsValue else ILBoxity.AsObject) ilTypeRef ilGenericParams @@ -1199,21 +1200,21 @@ type AssemblyBuilder(cenv:cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf mkILFields [ for (_, fldName, fldTy) in flds -> let fdef = mkILInstanceField (fldName, fldTy, None, ILMemberAccess.Private) - { fdef with CustomAttrs = mkILCustomAttrs [ cenv.g.DebuggerBrowsableNeverAttribute ] } ] + 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 -> - { Name = propName - Attributes = PropertyAttributes.None - SetMethod = None - GetMethod = Some(mkILMethRef(ilTypeRef,ILCallingConv.Instance,"get_" + propName,0,[],fldTy )) - CallingConv = ILCallingConv.Instance.ThisConv - Type = fldTy - Init = None - Args = [] - CustomAttrs = mkILCustomAttrs [ mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i ] } ] + 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 -> @@ -1281,11 +1282,8 @@ type AssemblyBuilder(cenv:cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf ilProperties, mkILEvents [], ilTypeDefAttribs, ILTypeInit.BeforeField) - let ilTypeDef = ilTypeDef.WithSealed(true).WithSerializable(true) - let ilTypeDef = { ilTypeDef with MethodImpls=mkILMethodImpls [] } - mgbuf.AddTypeDef(ilTypeRef, ilTypeDef, false, true, None) let extraBindings = @@ -7048,7 +7046,7 @@ type IlxGenResults = ilAssemAttrs : ILAttribute list ilNetModuleAttrs: ILAttribute list topAssemblyAttrs : Attribs - permissionSets : ILPermission list + permissionSets : ILSecurityDecl list quotationResourceInfo: (ILTypeRef list * byte[]) list } diff --git a/src/fsharp/IlxGen.fsi b/src/fsharp/IlxGen.fsi index b0333585751..6d50da1bfd3 100644 --- a/src/fsharp/IlxGen.fsi +++ b/src/fsharp/IlxGen.fsi @@ -65,7 +65,7 @@ type public IlxGenResults = /// The attributes for the assembly in F# form topAssemblyAttrs : Attribs /// The security attributes to attach to the assembly - permissionSets : ILPermission list + permissionSets : ILSecurityDecl list /// The generated IL/ILX resources associated with F# quotations quotationResourceInfo : (ILTypeRef list * byte[]) list } diff --git a/src/fsharp/symbols/Symbols.fs b/src/fsharp/symbols/Symbols.fs index f202280c400..cd7ee0dfbfa 100644 --- a/src/fsharp/symbols/Symbols.fs +++ b/src/fsharp/symbols/Symbols.fs @@ -831,7 +831,7 @@ and FSharpFieldData = | Union (v, _) -> Some v.TyconRef | ILField f -> Some f.DeclaringTyconRef -and FSharpAnonRecordTypeDetails(cenv: cenv, anonInfo: AnonRecdTypeInfo) = +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) From f05a399437aac5c4d552a75420e323ce30558c10 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 1 Jun 2018 19:03:50 +0100 Subject: [PATCH 18/24] integrate dev15.8 --- src/fsharp/IlxGen.fs | 2 +- src/fsharp/TypeChecker.fs | 2 +- src/fsharp/xlf/FSComp.txt.cs.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.de.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.en.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.es.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.fr.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.it.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.ja.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.ko.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.pl.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.pt-BR.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.ru.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.tr.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.zh-Hans.xlf | 35 +++++++++++++++++++++++++++ src/fsharp/xlf/FSComp.txt.zh-Hant.xlf | 35 +++++++++++++++++++++++++++ 16 files changed, 492 insertions(+), 2 deletions(-) diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index e9ff12f4995..21919af855c 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -7114,7 +7114,7 @@ let GenerateCode (cenv, anonTypeTable, eenv, TypedAssemblyAfterOptimization file let ilNetModuleAttrs = GenAttrs cenv eenv moduleAttribs let casApplied = new Dictionary() - let securityAttrs, topAssemblyAttrs = assemAttribs |> List.partition (fun a -> TypeChecker.IsSecurityAttribute cenv.g cenv.amap casApplied a rangeStartup) + 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 diff --git a/src/fsharp/TypeChecker.fs b/src/fsharp/TypeChecker.fs index 1a89e9df94a..b611f96764e 100755 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -9264,7 +9264,7 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela | _ -> // 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 + PropagateThenTcDelayed cenv overallTy env tpenv mExprAndItem (MakeApplicableExprWithFlex cenv env false objExpr') fieldTy ExprAtomicFlag.Atomic delayed | Item.ILField finfo -> // Get or set instance IL field diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index dbf10a3bfbe..257dd5f5915 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -6992,6 +6992,41 @@ Soubor {0} se na disku neočekávaně změnil, opakujte prosím načtení. + + 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 2b2f389f8c0..4109cd68690 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -6992,6 +6992,41 @@ Die Datei "{0}" wurde auf dem Datenträger unerwartet geändert. Laden Sie sie erneut. + + 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 a6d5886d83e..6771f09a02c 100644 --- a/src/fsharp/xlf/FSComp.txt.en.xlf +++ b/src/fsharp/xlf/FSComp.txt.en.xlf @@ -6992,6 +6992,41 @@ The file '{0}' changed on disk unexpectedly, please reload. + + 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 8b9e9460757..3853cbc815e 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -6992,6 +6992,41 @@ El archivo "{0}" cambió en el disco de manera inesperada; cárguelo de nuevo. + + 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 02c238295c2..41f7f38ed36 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -6992,6 +6992,41 @@ Changement inattendu du fichier '{0}' sur le disque. Rechargez le fichier. + + 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 5234a47fed1..4048e90c2b0 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -6992,6 +6992,41 @@ Il file '{0}' è stato modificato su disco in modo imprevisto. Ricaricare. + + 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 f2897a4d7b7..c37f1342174 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -6992,6 +6992,41 @@ ファイル '{0}' がディスク上で予期せず変更されました。再度読み込んでください。 + + 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 d13f1ff6080..af5289589e9 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -6992,6 +6992,41 @@ '{0}' 파일이 디스크에서 예기치 않게 변경되었습니다. 다시 로드하세요. + + 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 78155117999..4d5d5def87e 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -6992,6 +6992,41 @@ Plik „{0}” nieoczekiwanie uległ zmianie na dysku. Załaduj go ponownie. + + 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 6098e8f2323..654a8aade8d 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -6992,6 +6992,41 @@ O arquivo '{0}' foi alterado no disco inesperadamente. Recarregue-o. + + 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 5ea6fd8115f..5ab24a0abac 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -6992,6 +6992,41 @@ Файл "{0}" был неожиданно изменен на диске, повторите загрузку. + + 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 e83e67cdaee..5a87859f3ab 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -6992,6 +6992,41 @@ Diskte '{0}' dosyası beklenmedik şekilde değiştirildi. Lütfen yeniden yükleyin. + + 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 51c322df89e..87d6fb2f11e 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -6992,6 +6992,41 @@ 文件“{0}”在磁盘上意外更改,请重新加载。 + + 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 a3db27ef514..6463fe001b1 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -6992,6 +6992,41 @@ 檔案 '{0}' 在磁碟上意外變更,請重新載入。 + + 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 From 579f31b4685fa3b71cb4c34dacaaa9aed1bae6a8 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 1 Jun 2018 19:10:39 +0100 Subject: [PATCH 19/24] update FSComp --- .../FSharp.Compiler.Private/FSComp.fs | 2809 +++++++++-------- .../FSharp.Compiler.Private/FSComp.resx | 2 +- 2 files changed, 1407 insertions(+), 1404 deletions(-) diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs index 0095154b289..d0b3bf9e4e1 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs @@ -1,4 +1,4 @@ -// This is a generated file; the original input is '../FSComp.txt' +// This is a generated file; the original input is '..\FSComp.txt' namespace FSComp open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators @@ -116,3940 +116,3943 @@ type internal SR private() = // END BOILERPLATE /// The namespace '%s' is not defined. - /// (Originally from ../FSComp.txt:4) + /// (Originally from ..\FSComp.txt:4) static member undefinedNameNamespace(a0 : System.String) = (GetStringFunc("undefinedNameNamespace",",,,%s,,,") a0) /// The namespace or module '%s' is not defined. - /// (Originally from ../FSComp.txt:5) + /// (Originally from ..\FSComp.txt:5) static member undefinedNameNamespaceOrModule(a0 : System.String) = (GetStringFunc("undefinedNameNamespaceOrModule",",,,%s,,,") a0) /// The field, constructor or member '%s' is not defined. - /// (Originally from ../FSComp.txt:6) + /// (Originally from ..\FSComp.txt:6) static member undefinedNameFieldConstructorOrMember(a0 : System.String) = (GetStringFunc("undefinedNameFieldConstructorOrMember",",,,%s,,,") a0) /// The value, constructor, namespace or type '%s' is not defined. - /// (Originally from ../FSComp.txt:7) + /// (Originally from ..\FSComp.txt:7) static member undefinedNameValueConstructorNamespaceOrType(a0 : System.String) = (GetStringFunc("undefinedNameValueConstructorNamespaceOrType",",,,%s,,,") a0) /// The value or constructor '%s' is not defined. - /// (Originally from ../FSComp.txt:8) + /// (Originally from ..\FSComp.txt:8) static member undefinedNameValueOfConstructor(a0 : System.String) = (GetStringFunc("undefinedNameValueOfConstructor",",,,%s,,,") a0) /// The value, namespace, type or module '%s' is not defined. - /// (Originally from ../FSComp.txt:9) + /// (Originally from ..\FSComp.txt:9) static member undefinedNameValueNamespaceTypeOrModule(a0 : System.String) = (GetStringFunc("undefinedNameValueNamespaceTypeOrModule",",,,%s,,,") a0) /// The constructor, module or namespace '%s' is not defined. - /// (Originally from ../FSComp.txt:10) + /// (Originally from ..\FSComp.txt:10) static member undefinedNameConstructorModuleOrNamespace(a0 : System.String) = (GetStringFunc("undefinedNameConstructorModuleOrNamespace",",,,%s,,,") a0) /// The type '%s' is not defined. - /// (Originally from ../FSComp.txt:11) + /// (Originally from ..\FSComp.txt:11) static member undefinedNameType(a0 : System.String) = (GetStringFunc("undefinedNameType",",,,%s,,,") a0) /// The type '%s' is not defined in '%s'. - /// (Originally from ../FSComp.txt:12) + /// (Originally from ..\FSComp.txt:12) static member undefinedNameTypeIn(a0 : System.String, a1 : System.String) = (GetStringFunc("undefinedNameTypeIn",",,,%s,,,%s,,,") a0 a1) /// The record label or namespace '%s' is not defined. - /// (Originally from ../FSComp.txt:13) + /// (Originally from ..\FSComp.txt:13) static member undefinedNameRecordLabelOrNamespace(a0 : System.String) = (GetStringFunc("undefinedNameRecordLabelOrNamespace",",,,%s,,,") a0) /// The record label '%s' is not defined. - /// (Originally from ../FSComp.txt:14) + /// (Originally from ..\FSComp.txt:14) static member undefinedNameRecordLabel(a0 : System.String) = (GetStringFunc("undefinedNameRecordLabel",",,,%s,,,") a0) /// Maybe you want one of the following: - /// (Originally from ../FSComp.txt:15) + /// (Originally from ..\FSComp.txt:15) static member undefinedNameSuggestionsIntro() = (GetStringFunc("undefinedNameSuggestionsIntro",",,,") ) /// The type parameter %s is not defined. - /// (Originally from ../FSComp.txt:16) + /// (Originally from ..\FSComp.txt:16) static member undefinedNameTypeParameter(a0 : System.String) = (GetStringFunc("undefinedNameTypeParameter",",,,%s,,,") a0) /// The pattern discriminator '%s' is not defined. - /// (Originally from ../FSComp.txt:17) + /// (Originally from ..\FSComp.txt:17) static member undefinedNamePatternDiscriminator(a0 : System.String) = (GetStringFunc("undefinedNamePatternDiscriminator",",,,%s,,,") a0) /// Replace with '%s' - /// (Originally from ../FSComp.txt:18) + /// (Originally from ..\FSComp.txt:18) static member replaceWithSuggestion(a0 : System.String) = (GetStringFunc("replaceWithSuggestion",",,,%s,,,") a0) /// Add . for indexer access. - /// (Originally from ../FSComp.txt:19) + /// (Originally from ..\FSComp.txt:19) static member addIndexerDot() = (GetStringFunc("addIndexerDot",",,,") ) /// All elements of a list constructor expression must have the same type. This expression was expected to have type '%s', but here has type '%s'. - /// (Originally from ../FSComp.txt:20) + /// (Originally from ..\FSComp.txt:20) static member listElementHasWrongType(a0 : System.String, a1 : System.String) = (GetStringFunc("listElementHasWrongType",",,,%s,,,%s,,,") a0 a1) /// All elements of an array constructor expression must have the same type. This expression was expected to have type '%s', but here has type '%s'. - /// (Originally from ../FSComp.txt:21) + /// (Originally from ..\FSComp.txt:21) static member arrayElementHasWrongType(a0 : System.String, a1 : System.String) = (GetStringFunc("arrayElementHasWrongType",",,,%s,,,%s,,,") a0 a1) /// The 'if' expression is missing an 'else' branch. The 'then' branch has type '%s'. Because 'if' is an expression, and not a statement, add an 'else' branch which returns a value of the same type. - /// (Originally from ../FSComp.txt:22) + /// (Originally from ..\FSComp.txt:22) static member missingElseBranch(a0 : System.String) = (GetStringFunc("missingElseBranch",",,,%s,,,") a0) /// The 'if' expression needs to have type '%s' to satisfy context type requirements. It currently has type '%s'. - /// (Originally from ../FSComp.txt:23) + /// (Originally from ..\FSComp.txt:23) static member ifExpression(a0 : System.String, a1 : System.String) = (GetStringFunc("ifExpression",",,,%s,,,%s,,,") a0 a1) /// All branches of an 'if' expression must have the same type. This expression was expected to have type '%s', but here has type '%s'. - /// (Originally from ../FSComp.txt:24) + /// (Originally from ..\FSComp.txt:24) static member elseBranchHasWrongType(a0 : System.String, a1 : System.String) = (GetStringFunc("elseBranchHasWrongType",",,,%s,,,%s,,,") a0 a1) /// All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '%s', but this branch returned a value of type '%s'. - /// (Originally from ../FSComp.txt:25) + /// (Originally from ..\FSComp.txt:25) static member followingPatternMatchClauseHasWrongType(a0 : System.String, a1 : System.String) = (GetStringFunc("followingPatternMatchClauseHasWrongType",",,,%s,,,%s,,,") a0 a1) /// A pattern match guard must be of type 'bool', but this 'when' expression is of type '%s'. - /// (Originally from ../FSComp.txt:26) + /// (Originally from ..\FSComp.txt:26) static member patternMatchGuardIsNotBool(a0 : System.String) = (GetStringFunc("patternMatchGuardIsNotBool",",,,%s,,,") a0) /// A ';' is used to separate field values in records. Consider replacing ',' with ';'. - /// (Originally from ../FSComp.txt:27) + /// (Originally from ..\FSComp.txt:27) static member commaInsteadOfSemicolonInRecord() = (GetStringFunc("commaInsteadOfSemicolonInRecord",",,,") ) /// The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. - /// (Originally from ../FSComp.txt:28) + /// (Originally from ..\FSComp.txt:28) static member derefInsteadOfNot() = (GetStringFunc("derefInsteadOfNot",",,,") ) /// The non-generic type '%s' does not expect any type arguments, but here is given %d type argument(s) - /// (Originally from ../FSComp.txt:29) + /// (Originally from ..\FSComp.txt:29) static member buildUnexpectedTypeArgs(a0 : System.String, a1 : System.Int32) = (GetStringFunc("buildUnexpectedTypeArgs",",,,%s,,,%d,,,") a0 a1) /// Consider using 'return!' instead of 'return'. - /// (Originally from ../FSComp.txt:30) + /// (Originally from ..\FSComp.txt:30) static member returnUsedInsteadOfReturnBang() = (GetStringFunc("returnUsedInsteadOfReturnBang",",,,") ) /// Consider using 'yield!' instead of 'yield'. - /// (Originally from ../FSComp.txt:31) + /// (Originally from ..\FSComp.txt:31) static member yieldUsedInsteadOfYieldBang() = (GetStringFunc("yieldUsedInsteadOfYieldBang",",,,") ) /// \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. - /// (Originally from ../FSComp.txt:32) + /// (Originally from ..\FSComp.txt:32) static member tupleRequiredInAbstractMethod() = (GetStringFunc("tupleRequiredInAbstractMethod",",,,") ) /// Invalid warning number '%s' - /// (Originally from ../FSComp.txt:33) + /// (Originally from ..\FSComp.txt:33) static member buildInvalidWarningNumber(a0 : System.String) = (203, GetStringFunc("buildInvalidWarningNumber",",,,%s,,,") a0) /// Invalid version string '%s' - /// (Originally from ../FSComp.txt:34) + /// (Originally from ..\FSComp.txt:34) static member buildInvalidVersionString(a0 : System.String) = (204, GetStringFunc("buildInvalidVersionString",",,,%s,,,") a0) /// Invalid version file '%s' - /// (Originally from ../FSComp.txt:35) + /// (Originally from ..\FSComp.txt:35) static member buildInvalidVersionFile(a0 : System.String) = (205, GetStringFunc("buildInvalidVersionFile",",,,%s,,,") a0) /// Microsoft (R) F# Compiler version %s - /// (Originally from ../FSComp.txt:36) + /// (Originally from ..\FSComp.txt:36) static member buildProductName(a0 : System.String) = (GetStringFunc("buildProductName",",,,%s,,,") a0) /// F# Compiler for F# %s - /// (Originally from ../FSComp.txt:37) + /// (Originally from ..\FSComp.txt:37) static member buildProductNameCommunity(a0 : System.String) = (GetStringFunc("buildProductNameCommunity",",,,%s,,,") a0) /// Problem with filename '%s': %s - /// (Originally from ../FSComp.txt:38) + /// (Originally from ..\FSComp.txt:38) static member buildProblemWithFilename(a0 : System.String, a1 : System.String) = (206, GetStringFunc("buildProblemWithFilename",",,,%s,,,%s,,,") a0 a1) /// No inputs specified - /// (Originally from ../FSComp.txt:39) + /// (Originally from ..\FSComp.txt:39) static member buildNoInputsSpecified() = (207, GetStringFunc("buildNoInputsSpecified",",,,") ) /// The '--pdb' option requires the '--debug' option to be used - /// (Originally from ../FSComp.txt:40) + /// (Originally from ..\FSComp.txt:40) static member buildPdbRequiresDebug() = (209, GetStringFunc("buildPdbRequiresDebug",",,,") ) /// The search directory '%s' is invalid - /// (Originally from ../FSComp.txt:41) + /// (Originally from ..\FSComp.txt:41) static member buildInvalidSearchDirectory(a0 : System.String) = (210, GetStringFunc("buildInvalidSearchDirectory",",,,%s,,,") a0) /// The search directory '%s' could not be found - /// (Originally from ../FSComp.txt:42) + /// (Originally from ..\FSComp.txt:42) static member buildSearchDirectoryNotFound(a0 : System.String) = (211, GetStringFunc("buildSearchDirectoryNotFound",",,,%s,,,") a0) /// '%s' is not a valid filename - /// (Originally from ../FSComp.txt:43) + /// (Originally from ..\FSComp.txt:43) static member buildInvalidFilename(a0 : System.String) = (212, GetStringFunc("buildInvalidFilename",",,,%s,,,") a0) /// '%s' is not a valid assembly name - /// (Originally from ../FSComp.txt:44) + /// (Originally from ..\FSComp.txt:44) static member buildInvalidAssemblyName(a0 : System.String) = (213, GetStringFunc("buildInvalidAssemblyName",",,,%s,,,") a0) /// Unrecognized privacy setting '%s' for managed resource, valid options are 'public' and 'private' - /// (Originally from ../FSComp.txt:45) + /// (Originally from ..\FSComp.txt:45) static member buildInvalidPrivacy(a0 : System.String) = (214, GetStringFunc("buildInvalidPrivacy",",,,%s,,,") a0) /// Multiple references to '%s.dll' are not permitted - /// (Originally from ../FSComp.txt:46) + /// (Originally from ..\FSComp.txt:46) static member buildMultipleReferencesNotAllowed(a0 : System.String) = (215, GetStringFunc("buildMultipleReferencesNotAllowed",",,,%s,,,") a0) /// Could not read version from mscorlib.dll - /// (Originally from ../FSComp.txt:47) + /// (Originally from ..\FSComp.txt:47) static member buildCouldNotReadVersionInfoFromMscorlib() = (GetStringFunc("buildCouldNotReadVersionInfoFromMscorlib",",,,") ) /// Unable to read assembly '%s' - /// (Originally from ../FSComp.txt:48) + /// (Originally from ..\FSComp.txt:48) static member buildCannotReadAssembly(a0 : System.String) = (218, GetStringFunc("buildCannotReadAssembly",",,,%s,,,") a0) /// Assembly resolution failure at or near this location - /// (Originally from ../FSComp.txt:49) + /// (Originally from ..\FSComp.txt:49) static member buildAssemblyResolutionFailed() = (220, GetStringFunc("buildAssemblyResolutionFailed",",,,") ) /// The declarations in this file will be placed in an implicit module '%s' based on the file name '%s'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. - /// (Originally from ../FSComp.txt:50) + /// (Originally from ..\FSComp.txt:50) static member buildImplicitModuleIsNotLegalIdentifier(a0 : System.String, a1 : System.String) = (221, GetStringFunc("buildImplicitModuleIsNotLegalIdentifier",",,,%s,,,%s,,,") a0 a1) /// Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. - /// (Originally from ../FSComp.txt:51) + /// (Originally from ..\FSComp.txt:51) static member buildMultiFileRequiresNamespaceOrModule() = (222, GetStringFunc("buildMultiFileRequiresNamespaceOrModule",",,,") ) /// Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. - /// (Originally from ../FSComp.txt:52) + /// (Originally from ..\FSComp.txt:52) static member noEqualSignAfterModule() = (222, GetStringFunc("noEqualSignAfterModule",",,,") ) /// This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. - /// (Originally from ../FSComp.txt:53) + /// (Originally from ..\FSComp.txt:53) static member buildMultipleToplevelModules() = (223, GetStringFunc("buildMultipleToplevelModules",",,,") ) /// Option requires parameter: %s - /// (Originally from ../FSComp.txt:54) + /// (Originally from ..\FSComp.txt:54) static member buildOptionRequiresParameter(a0 : System.String) = (224, GetStringFunc("buildOptionRequiresParameter",",,,%s,,,") a0) /// Source file '%s' could not be found - /// (Originally from ../FSComp.txt:55) + /// (Originally from ..\FSComp.txt:55) static member buildCouldNotFindSourceFile(a0 : System.String) = (225, GetStringFunc("buildCouldNotFindSourceFile",",,,%s,,,") a0) /// The file extension of '%s' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. - /// (Originally from ../FSComp.txt:56) + /// (Originally from ..\FSComp.txt:56) static member buildInvalidSourceFileExtension(a0 : System.String) = (226, GetStringFunc("buildInvalidSourceFileExtension",",,,%s,,,") a0) /// Could not resolve assembly '%s' - /// (Originally from ../FSComp.txt:57) + /// (Originally from ..\FSComp.txt:57) static member buildCouldNotResolveAssembly(a0 : System.String) = (227, GetStringFunc("buildCouldNotResolveAssembly",",,,%s,,,") a0) /// Could not resolve assembly '%s' required by '%s' - /// (Originally from ../FSComp.txt:58) + /// (Originally from ..\FSComp.txt:58) static member buildCouldNotResolveAssemblyRequiredByFile(a0 : System.String, a1 : System.String) = (228, GetStringFunc("buildCouldNotResolveAssemblyRequiredByFile",",,,%s,,,%s,,,") a0 a1) /// Error opening binary file '%s': %s - /// (Originally from ../FSComp.txt:59) + /// (Originally from ..\FSComp.txt:59) static member buildErrorOpeningBinaryFile(a0 : System.String, a1 : System.String) = (229, GetStringFunc("buildErrorOpeningBinaryFile",",,,%s,,,%s,,,") a0 a1) /// The F#-compiled DLL '%s' needs to be recompiled to be used with this version of F# - /// (Originally from ../FSComp.txt:60) + /// (Originally from ..\FSComp.txt:60) static member buildDifferentVersionMustRecompile(a0 : System.String) = (231, GetStringFunc("buildDifferentVersionMustRecompile",",,,%s,,,") a0) /// Invalid directive. Expected '#I \"\"'. - /// (Originally from ../FSComp.txt:61) + /// (Originally from ..\FSComp.txt:61) static member buildInvalidHashIDirective() = (232, GetStringFunc("buildInvalidHashIDirective",",,,") ) /// Invalid directive. Expected '#r \"\"'. - /// (Originally from ../FSComp.txt:62) + /// (Originally from ..\FSComp.txt:62) static member buildInvalidHashrDirective() = (233, GetStringFunc("buildInvalidHashrDirective",",,,") ) /// Invalid directive. Expected '#load \"\" ... \"\"'. - /// (Originally from ../FSComp.txt:63) + /// (Originally from ..\FSComp.txt:63) static member buildInvalidHashloadDirective() = (234, GetStringFunc("buildInvalidHashloadDirective",",,,") ) /// Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. - /// (Originally from ../FSComp.txt:64) + /// (Originally from ..\FSComp.txt:64) static member buildInvalidHashtimeDirective() = (235, GetStringFunc("buildInvalidHashtimeDirective",",,,") ) /// Directives inside modules are ignored - /// (Originally from ../FSComp.txt:65) + /// (Originally from ..\FSComp.txt:65) static member buildDirectivesInModulesAreIgnored() = (236, GetStringFunc("buildDirectivesInModulesAreIgnored",",,,") ) /// A signature for the file or module '%s' has already been specified - /// (Originally from ../FSComp.txt:66) + /// (Originally from ..\FSComp.txt:66) static member buildSignatureAlreadySpecified(a0 : System.String) = (237, GetStringFunc("buildSignatureAlreadySpecified",",,,%s,,,") a0) /// An implementation of file or module '%s' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. - /// (Originally from ../FSComp.txt:67) + /// (Originally from ..\FSComp.txt:67) static member buildImplementationAlreadyGivenDetail(a0 : System.String) = (238, GetStringFunc("buildImplementationAlreadyGivenDetail",",,,%s,,,") a0) /// An implementation of the file or module '%s' has already been given - /// (Originally from ../FSComp.txt:68) + /// (Originally from ..\FSComp.txt:68) static member buildImplementationAlreadyGiven(a0 : System.String) = (239, GetStringFunc("buildImplementationAlreadyGiven",",,,%s,,,") a0) /// The signature file '%s' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. - /// (Originally from ../FSComp.txt:69) + /// (Originally from ..\FSComp.txt:69) static member buildSignatureWithoutImplementation(a0 : System.String) = (240, GetStringFunc("buildSignatureWithoutImplementation",",,,%s,,,") a0) /// '%s' is not a valid integer argument - /// (Originally from ../FSComp.txt:70) + /// (Originally from ..\FSComp.txt:70) static member buildArgInvalidInt(a0 : System.String) = (241, GetStringFunc("buildArgInvalidInt",",,,%s,,,") a0) /// '%s' is not a valid floating point argument - /// (Originally from ../FSComp.txt:71) + /// (Originally from ..\FSComp.txt:71) static member buildArgInvalidFloat(a0 : System.String) = (242, GetStringFunc("buildArgInvalidFloat",",,,%s,,,") a0) /// Unrecognized option: '%s' - /// (Originally from ../FSComp.txt:72) + /// (Originally from ..\FSComp.txt:72) static member buildUnrecognizedOption(a0 : System.String) = (243, GetStringFunc("buildUnrecognizedOption",",,,%s,,,") a0) /// Invalid module or namespace name - /// (Originally from ../FSComp.txt:73) + /// (Originally from ..\FSComp.txt:73) static member buildInvalidModuleOrNamespaceName() = (244, GetStringFunc("buildInvalidModuleOrNamespaceName",",,,") ) /// Error reading/writing metadata for the F# compiled DLL '%s'. Was the DLL compiled with an earlier version of the F# compiler? (error: '%s'). - /// (Originally from ../FSComp.txt:74) + /// (Originally from ..\FSComp.txt:74) static member pickleErrorReadingWritingMetadata(a0 : System.String, a1 : System.String) = (GetStringFunc("pickleErrorReadingWritingMetadata",",,,%s,,,%s,,,") a0 a1) /// The type/module '%s' is not a concrete module or type - /// (Originally from ../FSComp.txt:75) + /// (Originally from ..\FSComp.txt:75) static member tastTypeOrModuleNotConcrete(a0 : System.String) = (245, GetStringFunc("tastTypeOrModuleNotConcrete",",,,%s,,,") a0) /// The type '%s' has an inline assembly code representation - /// (Originally from ../FSComp.txt:76) + /// (Originally from ..\FSComp.txt:76) static member tastTypeHasAssemblyCodeRepresentation(a0 : System.String) = (GetStringFunc("tastTypeHasAssemblyCodeRepresentation",",,,%s,,,") a0) /// A namespace and a module named '%s' both occur in two parts of this assembly - /// (Originally from ../FSComp.txt:77) + /// (Originally from ..\FSComp.txt:77) static member tastNamespaceAndModuleWithSameNameInAssembly(a0 : System.String) = (247, GetStringFunc("tastNamespaceAndModuleWithSameNameInAssembly",",,,%s,,,") a0) /// Two modules named '%s' occur in two parts of this assembly - /// (Originally from ../FSComp.txt:78) + /// (Originally from ..\FSComp.txt:78) static member tastTwoModulesWithSameNameInAssembly(a0 : System.String) = (248, GetStringFunc("tastTwoModulesWithSameNameInAssembly",",,,%s,,,") a0) /// Two type definitions named '%s' occur in namespace '%s' in two parts of this assembly - /// (Originally from ../FSComp.txt:79) + /// (Originally from ..\FSComp.txt:79) static member tastDuplicateTypeDefinitionInAssembly(a0 : System.String, a1 : System.String) = (249, GetStringFunc("tastDuplicateTypeDefinitionInAssembly",",,,%s,,,%s,,,") a0 a1) /// A module and a type definition named '%s' occur in namespace '%s' in two parts of this assembly - /// (Originally from ../FSComp.txt:80) + /// (Originally from ..\FSComp.txt:80) static member tastConflictingModuleAndTypeDefinitionInAssembly(a0 : System.String, a1 : System.String) = (250, GetStringFunc("tastConflictingModuleAndTypeDefinitionInAssembly",",,,%s,,,%s,,,") a0 a1) /// Invalid member signature encountered because of an earlier error - /// (Originally from ../FSComp.txt:81) + /// (Originally from ..\FSComp.txt:81) static member tastInvalidMemberSignature() = (251, GetStringFunc("tastInvalidMemberSignature",",,,") ) /// This value does not have a valid property setter type - /// (Originally from ../FSComp.txt:82) + /// (Originally from ..\FSComp.txt:82) static member tastValueDoesNotHaveSetterType() = (252, GetStringFunc("tastValueDoesNotHaveSetterType",",,,") ) /// Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. - /// (Originally from ../FSComp.txt:83) + /// (Originally from ..\FSComp.txt:83) static member tastInvalidFormForPropertyGetter() = (253, GetStringFunc("tastInvalidFormForPropertyGetter",",,,") ) /// Invalid form for a property setter. At least one argument is required. - /// (Originally from ../FSComp.txt:84) + /// (Originally from ..\FSComp.txt:84) static member tastInvalidFormForPropertySetter() = (254, GetStringFunc("tastInvalidFormForPropertySetter",",,,") ) /// Unexpected use of a byref-typed variable - /// (Originally from ../FSComp.txt:85) + /// (Originally from ..\FSComp.txt:85) static member tastUnexpectedByRef() = (255, GetStringFunc("tastUnexpectedByRef",",,,") ) /// A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' /// (Originally from ..\FSComp.txt:86) static member tastValueMustBeMutable() = (256, GetStringFunc("tastValueMustBeMutable",",,,") ) /// Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. - /// (Originally from ../FSComp.txt:87) + /// (Originally from ..\FSComp.txt:87) static member tastInvalidMutationOfConstant() = (257, GetStringFunc("tastInvalidMutationOfConstant",",,,") ) /// The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed - /// (Originally from ../FSComp.txt:88) + /// (Originally from ..\FSComp.txt:88) static member tastValueHasBeenCopied() = (GetStringFunc("tastValueHasBeenCopied",",,,") ) /// Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding - /// (Originally from ../FSComp.txt:89) + /// (Originally from ..\FSComp.txt:89) static member tastRecursiveValuesMayNotBeInConstructionOfTuple() = (259, GetStringFunc("tastRecursiveValuesMayNotBeInConstructionOfTuple",",,,") ) /// Recursive values cannot appear directly as a construction of the type '%s' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. - /// (Originally from ../FSComp.txt:90) + /// (Originally from ..\FSComp.txt:90) static member tastRecursiveValuesMayNotAppearInConstructionOfType(a0 : System.String) = (260, GetStringFunc("tastRecursiveValuesMayNotAppearInConstructionOfType",",,,%s,,,") a0) /// Recursive values cannot be directly assigned to the non-mutable field '%s' of the type '%s' within a recursive binding. Consider using a mutable field instead. - /// (Originally from ../FSComp.txt:91) + /// (Originally from ..\FSComp.txt:91) static member tastRecursiveValuesMayNotBeAssignedToNonMutableField(a0 : System.String, a1 : System.String) = (261, GetStringFunc("tastRecursiveValuesMayNotBeAssignedToNonMutableField",",,,%s,,,%s,,,") a0 a1) /// Unexpected decode of AutoOpenAttribute - /// (Originally from ../FSComp.txt:92) + /// (Originally from ..\FSComp.txt:92) static member tastUnexpectedDecodeOfAutoOpenAttribute() = (GetStringFunc("tastUnexpectedDecodeOfAutoOpenAttribute",",,,") ) /// Unexpected decode of InternalsVisibleToAttribute - /// (Originally from ../FSComp.txt:93) + /// (Originally from ..\FSComp.txt:93) static member tastUnexpectedDecodeOfInternalsVisibleToAttribute() = (GetStringFunc("tastUnexpectedDecodeOfInternalsVisibleToAttribute",",,,") ) /// Unexpected decode of InterfaceDataVersionAttribute - /// (Originally from ../FSComp.txt:94) + /// (Originally from ..\FSComp.txt:94) static member tastUnexpectedDecodeOfInterfaceDataVersionAttribute() = (GetStringFunc("tastUnexpectedDecodeOfInterfaceDataVersionAttribute",",,,") ) /// Active patterns cannot return more than 7 possibilities - /// (Originally from ../FSComp.txt:95) + /// (Originally from ..\FSComp.txt:95) static member tastActivePatternsLimitedToSeven() = (265, GetStringFunc("tastActivePatternsLimitedToSeven",",,,") ) /// This is not a valid constant expression or custom attribute value - /// (Originally from ../FSComp.txt:96) + /// (Originally from ..\FSComp.txt:96) static member tastNotAConstantExpression() = (267, GetStringFunc("tastNotAConstantExpression",",,,") ) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe mutability attributes differ - /// (Originally from ../FSComp.txt:97) + /// (Originally from ..\FSComp.txt:97) static member ValueNotContainedMutabilityAttributesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityAttributesDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe names differ - /// (Originally from ../FSComp.txt:98) + /// (Originally from ..\FSComp.txt:98) static member ValueNotContainedMutabilityNamesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityNamesDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled names differ - /// (Originally from ../FSComp.txt:99) + /// (Originally from ..\FSComp.txt:99) static member ValueNotContainedMutabilityCompiledNamesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityCompiledNamesDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe display names differ - /// (Originally from ../FSComp.txt:100) + /// (Originally from ..\FSComp.txt:100) static member ValueNotContainedMutabilityDisplayNamesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityDisplayNamesDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe accessibility specified in the signature is more than that specified in the implementation - /// (Originally from ../FSComp.txt:101) + /// (Originally from ..\FSComp.txt:101) static member ValueNotContainedMutabilityAccessibilityMore(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityAccessibilityMore",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe inline flags differ - /// (Originally from ../FSComp.txt:102) + /// (Originally from ..\FSComp.txt:102) static member ValueNotContainedMutabilityInlineFlagsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityInlineFlagsDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe literal constant values and/or attributes differ - /// (Originally from ../FSComp.txt:103) + /// (Originally from ..\FSComp.txt:103) static member ValueNotContainedMutabilityLiteralConstantValuesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityLiteralConstantValuesDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. - /// (Originally from ../FSComp.txt:104) + /// (Originally from ..\FSComp.txt:104) static member ValueNotContainedMutabilityOneIsTypeFunction(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityOneIsTypeFunction",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe respective type parameter counts differ - /// (Originally from ../FSComp.txt:105) + /// (Originally from ..\FSComp.txt:105) static member ValueNotContainedMutabilityParameterCountsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityParameterCountsDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe types differ - /// (Originally from ../FSComp.txt:106) + /// (Originally from ..\FSComp.txt:106) static member ValueNotContainedMutabilityTypesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityTypesDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is an extension member and the other is not - /// (Originally from ../FSComp.txt:107) + /// (Originally from ..\FSComp.txt:107) static member ValueNotContainedMutabilityExtensionsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityExtensionsDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nAn arity was not inferred for this value - /// (Originally from ../FSComp.txt:108) + /// (Originally from ..\FSComp.txt:108) static member ValueNotContainedMutabilityArityNotInferred(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityArityNotInferred",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe number of generic parameters in the signature and implementation differ (the signature declares %s but the implementation declares %s - /// (Originally from ../FSComp.txt:109) + /// (Originally from ..\FSComp.txt:109) static member ValueNotContainedMutabilityGenericParametersDiffer(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String, a4 : System.String) = (GetStringFunc("ValueNotContainedMutabilityGenericParametersDiffer",",,,%s,,,%s,,,%s,,,%s,,,%s,,,") a0 a1 a2 a3 a4) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [] attribute. - /// (Originally from ../FSComp.txt:110) + /// (Originally from ..\FSComp.txt:110) static member ValueNotContainedMutabilityGenericParametersAreDifferentKinds(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityGenericParametersAreDifferentKinds",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe arities in the signature and implementation differ. The signature specifies that '%s' is function definition or lambda expression accepting at least %s argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval %s: int -> (int -> int)\ninstead of\n\tval %s: int -> int -> int. - /// (Originally from ../FSComp.txt:111) + /// (Originally from ..\FSComp.txt:111) static member ValueNotContainedMutabilityAritiesDiffer(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String, a4 : System.String, a5 : System.String, a6 : System.String) = (GetStringFunc("ValueNotContainedMutabilityAritiesDiffer",",,,%s,,,%s,,,%s,,,%s,,,%s,,,%s,,,%s,,,") a0 a1 a2 a3 a4 a5 a6) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe CLI member names differ - /// (Originally from ../FSComp.txt:112) + /// (Originally from ..\FSComp.txt:112) static member ValueNotContainedMutabilityDotNetNamesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityDotNetNamesDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is static and the other isn't - /// (Originally from ../FSComp.txt:113) + /// (Originally from ..\FSComp.txt:113) static member ValueNotContainedMutabilityStaticsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityStaticsDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is virtual and the other isn't - /// (Originally from ../FSComp.txt:114) + /// (Originally from ..\FSComp.txt:114) static member ValueNotContainedMutabilityVirtualsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityVirtualsDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is abstract and the other isn't - /// (Originally from ../FSComp.txt:115) + /// (Originally from ..\FSComp.txt:115) static member ValueNotContainedMutabilityAbstractsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityAbstractsDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is final and the other isn't - /// (Originally from ../FSComp.txt:116) + /// (Originally from ..\FSComp.txt:116) static member ValueNotContainedMutabilityFinalsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityFinalsDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is marked as an override and the other isn't - /// (Originally from ../FSComp.txt:117) + /// (Originally from ..\FSComp.txt:117) static member ValueNotContainedMutabilityOverridesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityOverridesDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is a constructor/property and the other is not - /// (Originally from ../FSComp.txt:118) + /// (Originally from ..\FSComp.txt:118) static member ValueNotContainedMutabilityOneIsConstructor(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityOneIsConstructor",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member - /// (Originally from ../FSComp.txt:119) + /// (Originally from ..\FSComp.txt:119) static member ValueNotContainedMutabilityStaticButInstance(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityStaticButInstance",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member - /// (Originally from ../FSComp.txt:120) + /// (Originally from ..\FSComp.txt:120) static member ValueNotContainedMutabilityInstanceButStatic(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ValueNotContainedMutabilityInstanceButStatic",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The %s definitions in the signature and implementation are not compatible because the names differ. The type is called '%s' in the signature file but '%s' in implementation. - /// (Originally from ../FSComp.txt:121) + /// (Originally from ..\FSComp.txt:121) static member DefinitionsInSigAndImplNotCompatibleNamesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (290, GetStringFunc("DefinitionsInSigAndImplNotCompatibleNamesDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the respective type parameter counts differ - /// (Originally from ../FSComp.txt:122) + /// (Originally from ..\FSComp.txt:122) static member DefinitionsInSigAndImplNotCompatibleParameterCountsDiffer(a0 : System.String, a1 : System.String) = (291, GetStringFunc("DefinitionsInSigAndImplNotCompatibleParameterCountsDiffer",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation - /// (Originally from ../FSComp.txt:123) + /// (Originally from ..\FSComp.txt:123) static member DefinitionsInSigAndImplNotCompatibleAccessibilityDiffer(a0 : System.String, a1 : System.String) = (292, GetStringFunc("DefinitionsInSigAndImplNotCompatibleAccessibilityDiffer",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the signature requires that the type supports the interface %s but the interface has not been implemented - /// (Originally from ../FSComp.txt:124) + /// (Originally from ..\FSComp.txt:124) static member DefinitionsInSigAndImplNotCompatibleMissingInterface(a0 : System.String, a1 : System.String, a2 : System.String) = (293, GetStringFunc("DefinitionsInSigAndImplNotCompatibleMissingInterface",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not - /// (Originally from ../FSComp.txt:125) + /// (Originally from ..\FSComp.txt:125) static member DefinitionsInSigAndImplNotCompatibleImplementationSaysNull(a0 : System.String, a1 : System.String) = (294, GetStringFunc("DefinitionsInSigAndImplNotCompatibleImplementationSaysNull",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not - /// (Originally from ../FSComp.txt:126) + /// (Originally from ..\FSComp.txt:126) static member DefinitionsInSigAndImplNotCompatibleImplementationSaysNull2(a0 : System.String, a1 : System.String) = (294, GetStringFunc("DefinitionsInSigAndImplNotCompatibleImplementationSaysNull2",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not - /// (Originally from ../FSComp.txt:127) + /// (Originally from ..\FSComp.txt:127) static member DefinitionsInSigAndImplNotCompatibleSignatureSaysNull(a0 : System.String, a1 : System.String) = (295, GetStringFunc("DefinitionsInSigAndImplNotCompatibleSignatureSaysNull",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not - /// (Originally from ../FSComp.txt:128) + /// (Originally from ..\FSComp.txt:128) static member DefinitionsInSigAndImplNotCompatibleSignatureSaysNull2(a0 : System.String, a1 : System.String) = (295, GetStringFunc("DefinitionsInSigAndImplNotCompatibleSignatureSaysNull2",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [] attribute to the signature. - /// (Originally from ../FSComp.txt:129) + /// (Originally from ..\FSComp.txt:129) static member DefinitionsInSigAndImplNotCompatibleImplementationSealed(a0 : System.String, a1 : System.String) = (296, GetStringFunc("DefinitionsInSigAndImplNotCompatibleImplementationSealed",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [] attribute to the implementation. - /// (Originally from ../FSComp.txt:130) + /// (Originally from ..\FSComp.txt:130) static member DefinitionsInSigAndImplNotCompatibleImplementationIsNotSealed(a0 : System.String, a1 : System.String) = (297, GetStringFunc("DefinitionsInSigAndImplNotCompatibleImplementationIsNotSealed",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [] attribute to the signature. - /// (Originally from ../FSComp.txt:131) + /// (Originally from ..\FSComp.txt:131) static member DefinitionsInSigAndImplNotCompatibleImplementationIsAbstract(a0 : System.String, a1 : System.String) = (298, GetStringFunc("DefinitionsInSigAndImplNotCompatibleImplementationIsAbstract",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [] attribute to the implementation. - /// (Originally from ../FSComp.txt:132) + /// (Originally from ..\FSComp.txt:132) static member DefinitionsInSigAndImplNotCompatibleSignatureIsAbstract(a0 : System.String, a1 : System.String) = (299, GetStringFunc("DefinitionsInSigAndImplNotCompatibleSignatureIsAbstract",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the types have different base types - /// (Originally from ../FSComp.txt:133) + /// (Originally from ..\FSComp.txt:133) static member DefinitionsInSigAndImplNotCompatibleTypesHaveDifferentBaseTypes(a0 : System.String, a1 : System.String) = (300, GetStringFunc("DefinitionsInSigAndImplNotCompatibleTypesHaveDifferentBaseTypes",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the number of %ss differ - /// (Originally from ../FSComp.txt:134) + /// (Originally from ..\FSComp.txt:134) static member DefinitionsInSigAndImplNotCompatibleNumbersDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (301, GetStringFunc("DefinitionsInSigAndImplNotCompatibleNumbersDiffer",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the signature defines the %s '%s' but the implementation does not (or does, but not in the same order) - /// (Originally from ../FSComp.txt:135) + /// (Originally from ..\FSComp.txt:135) static member DefinitionsInSigAndImplNotCompatibleSignatureDefinesButImplDoesNot(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (302, GetStringFunc("DefinitionsInSigAndImplNotCompatibleSignatureDefinesButImplDoesNot",",,,%s,,,%s,,,%s,,,%s,,,") a0 a1 a2 a3) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation defines the %s '%s' but the signature does not (or does, but not in the same order) - /// (Originally from ../FSComp.txt:136) + /// (Originally from ..\FSComp.txt:136) static member DefinitionsInSigAndImplNotCompatibleImplDefinesButSignatureDoesNot(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (303, GetStringFunc("DefinitionsInSigAndImplNotCompatibleImplDefinesButSignatureDoesNot",",,,%s,,,%s,,,%s,,,%s,,,") a0 a1 a2 a3) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation - /// (Originally from ../FSComp.txt:137) + /// (Originally from ..\FSComp.txt:137) static member DefinitionsInSigAndImplNotCompatibleImplDefinesStruct(a0 : System.String, a1 : System.String) = (304, GetStringFunc("DefinitionsInSigAndImplNotCompatibleImplDefinesStruct",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature - /// (Originally from ../FSComp.txt:138) + /// (Originally from ..\FSComp.txt:138) static member DefinitionsInSigAndImplNotCompatibleDotNetTypeRepresentationIsHidden(a0 : System.String, a1 : System.String) = (305, GetStringFunc("DefinitionsInSigAndImplNotCompatibleDotNetTypeRepresentationIsHidden",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because a type representation is being hidden by a signature - /// (Originally from ../FSComp.txt:139) + /// (Originally from ..\FSComp.txt:139) static member DefinitionsInSigAndImplNotCompatibleTypeIsHidden(a0 : System.String, a1 : System.String) = (306, GetStringFunc("DefinitionsInSigAndImplNotCompatibleTypeIsHidden",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the types are of different kinds - /// (Originally from ../FSComp.txt:140) + /// (Originally from ..\FSComp.txt:140) static member DefinitionsInSigAndImplNotCompatibleTypeIsDifferentKind(a0 : System.String, a1 : System.String) = (307, GetStringFunc("DefinitionsInSigAndImplNotCompatibleTypeIsDifferentKind",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the IL representations differ - /// (Originally from ../FSComp.txt:141) + /// (Originally from ..\FSComp.txt:141) static member DefinitionsInSigAndImplNotCompatibleILDiffer(a0 : System.String, a1 : System.String) = (308, GetStringFunc("DefinitionsInSigAndImplNotCompatibleILDiffer",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the representations differ - /// (Originally from ../FSComp.txt:142) + /// (Originally from ..\FSComp.txt:142) static member DefinitionsInSigAndImplNotCompatibleRepresentationsDiffer(a0 : System.String, a1 : System.String) = (309, GetStringFunc("DefinitionsInSigAndImplNotCompatibleRepresentationsDiffer",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the field %s was present in the implementation but not in the signature - /// (Originally from ../FSComp.txt:143) + /// (Originally from ..\FSComp.txt:143) static member DefinitionsInSigAndImplNotCompatibleFieldWasPresent(a0 : System.String, a1 : System.String, a2 : System.String) = (311, GetStringFunc("DefinitionsInSigAndImplNotCompatibleFieldWasPresent",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation - /// (Originally from ../FSComp.txt:144) + /// (Originally from ..\FSComp.txt:144) static member DefinitionsInSigAndImplNotCompatibleFieldOrderDiffer(a0 : System.String, a1 : System.String) = (312, GetStringFunc("DefinitionsInSigAndImplNotCompatibleFieldOrderDiffer",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the field %s was required by the signature but was not specified by the implementation - /// (Originally from ../FSComp.txt:145) + /// (Originally from ..\FSComp.txt:145) static member DefinitionsInSigAndImplNotCompatibleFieldRequiredButNotSpecified(a0 : System.String, a1 : System.String, a2 : System.String) = (313, GetStringFunc("DefinitionsInSigAndImplNotCompatibleFieldRequiredButNotSpecified",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the field '%s' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. - /// (Originally from ../FSComp.txt:146) + /// (Originally from ..\FSComp.txt:146) static member DefinitionsInSigAndImplNotCompatibleFieldIsInImplButNotSig(a0 : System.String, a1 : System.String, a2 : System.String) = (314, GetStringFunc("DefinitionsInSigAndImplNotCompatibleFieldIsInImplButNotSig",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the abstract member '%s' was required by the signature but was not specified by the implementation - /// (Originally from ../FSComp.txt:147) + /// (Originally from ..\FSComp.txt:147) static member DefinitionsInSigAndImplNotCompatibleAbstractMemberMissingInImpl(a0 : System.String, a1 : System.String, a2 : System.String) = (315, GetStringFunc("DefinitionsInSigAndImplNotCompatibleAbstractMemberMissingInImpl",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the abstract member '%s' was present in the implementation but not in the signature - /// (Originally from ../FSComp.txt:148) + /// (Originally from ..\FSComp.txt:148) static member DefinitionsInSigAndImplNotCompatibleAbstractMemberMissingInSig(a0 : System.String, a1 : System.String, a2 : System.String) = (316, GetStringFunc("DefinitionsInSigAndImplNotCompatibleAbstractMemberMissingInSig",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the signature declares a %s while the implementation declares a %s - /// (Originally from ../FSComp.txt:149) + /// (Originally from ..\FSComp.txt:149) static member DefinitionsInSigAndImplNotCompatibleSignatureDeclaresDiffer(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (317, GetStringFunc("DefinitionsInSigAndImplNotCompatibleSignatureDeclaresDiffer",",,,%s,,,%s,,,%s,,,%s,,,") a0 a1 a2 a3) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the abbreviations differ: %s versus %s - /// (Originally from ../FSComp.txt:150) + /// (Originally from ..\FSComp.txt:150) static member DefinitionsInSigAndImplNotCompatibleAbbreviationsDiffer(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (318, GetStringFunc("DefinitionsInSigAndImplNotCompatibleAbbreviationsDiffer",",,,%s,,,%s,,,%s,,,%s,,,") a0 a1 a2 a3) /// The %s definitions for type '%s' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. - /// (Originally from ../FSComp.txt:151) + /// (Originally from ..\FSComp.txt:151) static member DefinitionsInSigAndImplNotCompatibleAbbreviationHiddenBySig(a0 : System.String, a1 : System.String) = (319, GetStringFunc("DefinitionsInSigAndImplNotCompatibleAbbreviationHiddenBySig",",,,%s,,,%s,,,") a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not - /// (Originally from ../FSComp.txt:152) + /// (Originally from ..\FSComp.txt:152) static member DefinitionsInSigAndImplNotCompatibleSigHasAbbreviation(a0 : System.String, a1 : System.String) = (320, GetStringFunc("DefinitionsInSigAndImplNotCompatibleSigHasAbbreviation",",,,%s,,,%s,,,") a0 a1) /// The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe names differ - /// (Originally from ../FSComp.txt:153) + /// (Originally from ..\FSComp.txt:153) static member ModuleContainsConstructorButNamesDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("ModuleContainsConstructorButNamesDiffer",",,,%s,,,%s,,,") a0 a1) /// The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe respective number of data fields differ - /// (Originally from ../FSComp.txt:154) + /// (Originally from ..\FSComp.txt:154) static member ModuleContainsConstructorButDataFieldsDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("ModuleContainsConstructorButDataFieldsDiffer",",,,%s,,,%s,,,") a0 a1) /// The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe types of the fields differ - /// (Originally from ../FSComp.txt:155) + /// (Originally from ..\FSComp.txt:155) static member ModuleContainsConstructorButTypesOfFieldsDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("ModuleContainsConstructorButTypesOfFieldsDiffer",",,,%s,,,%s,,,") a0 a1) /// The module contains the constructor\n %s \nbut its signature specifies\n %s \nthe accessibility specified in the signature is more than that specified in the implementation - /// (Originally from ../FSComp.txt:156) + /// (Originally from ..\FSComp.txt:156) static member ModuleContainsConstructorButAccessibilityDiffers(a0 : System.String, a1 : System.String) = (GetStringFunc("ModuleContainsConstructorButAccessibilityDiffers",",,,%s,,,%s,,,") a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nThe names differ - /// (Originally from ../FSComp.txt:157) + /// (Originally from ..\FSComp.txt:157) static member FieldNotContainedNamesDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("FieldNotContainedNamesDiffer",",,,%s,,,%s,,,") a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nthe accessibility specified in the signature is more than that specified in the implementation - /// (Originally from ../FSComp.txt:158) + /// (Originally from ..\FSComp.txt:158) static member FieldNotContainedAccessibilitiesDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("FieldNotContainedAccessibilitiesDiffer",",,,%s,,,%s,,,") a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'static' modifiers differ - /// (Originally from ../FSComp.txt:159) + /// (Originally from ..\FSComp.txt:159) static member FieldNotContainedStaticsDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("FieldNotContainedStaticsDiffer",",,,%s,,,%s,,,") a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'mutable' modifiers differ - /// (Originally from ../FSComp.txt:160) + /// (Originally from ..\FSComp.txt:160) static member FieldNotContainedMutablesDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("FieldNotContainedMutablesDiffer",",,,%s,,,%s,,,") a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'literal' modifiers differ - /// (Originally from ../FSComp.txt:161) + /// (Originally from ..\FSComp.txt:161) static member FieldNotContainedLiteralsDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("FieldNotContainedLiteralsDiffer",",,,%s,,,%s,,,") a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nThe types differ - /// (Originally from ../FSComp.txt:162) + /// (Originally from ..\FSComp.txt:162) static member FieldNotContainedTypesDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("FieldNotContainedTypesDiffer",",,,%s,,,%s,,,") a0 a1) /// The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '%s' and '%s'. Consider using type annotations to resolve the ambiguity - /// (Originally from ../FSComp.txt:163) + /// (Originally from ..\FSComp.txt:163) static member typrelCannotResolveImplicitGenericInstantiation(a0 : System.String, a1 : System.String) = (331, GetStringFunc("typrelCannotResolveImplicitGenericInstantiation",",,,%s,,,%s,,,") a0 a1) /// Could not resolve the ambiguity inherent in the use of a 'printf'-style format string - /// (Originally from ../FSComp.txt:164) + /// (Originally from ..\FSComp.txt:164) static member typrelCannotResolveAmbiguityInPrintf() = (333, GetStringFunc("typrelCannotResolveAmbiguityInPrintf",",,,") ) /// Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position - /// (Originally from ../FSComp.txt:165) + /// (Originally from ..\FSComp.txt:165) static member typrelCannotResolveAmbiguityInEnum() = (334, GetStringFunc("typrelCannotResolveAmbiguityInEnum",",,,") ) /// Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position - /// (Originally from ../FSComp.txt:166) + /// (Originally from ..\FSComp.txt:166) static member typrelCannotResolveAmbiguityInDelegate() = (335, GetStringFunc("typrelCannotResolveAmbiguityInDelegate",",,,") ) /// Invalid value - /// (Originally from ../FSComp.txt:167) + /// (Originally from ..\FSComp.txt:167) static member typrelInvalidValue() = (337, GetStringFunc("typrelInvalidValue",",,,") ) /// The signature and implementation are not compatible because the respective type parameter counts differ - /// (Originally from ../FSComp.txt:168) + /// (Originally from ..\FSComp.txt:168) static member typrelSigImplNotCompatibleParamCountsDiffer() = (338, GetStringFunc("typrelSigImplNotCompatibleParamCountsDiffer",",,,") ) /// The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation - /// (Originally from ../FSComp.txt:169) + /// (Originally from ..\FSComp.txt:169) static member typrelSigImplNotCompatibleCompileTimeRequirementsDiffer() = (339, GetStringFunc("typrelSigImplNotCompatibleCompileTimeRequirementsDiffer",",,,") ) /// The signature and implementation are not compatible because the declaration of the type parameter '%s' requires a constraint of the form %s - /// (Originally from ../FSComp.txt:170) + /// (Originally from ..\FSComp.txt:170) static member typrelSigImplNotCompatibleConstraintsDiffer(a0 : System.String, a1 : System.String) = (340, GetStringFunc("typrelSigImplNotCompatibleConstraintsDiffer",",,,%s,,,%s,,,") a0 a1) /// The signature and implementation are not compatible because the type parameter '%s' has a constraint of the form %s but the implementation does not. Either remove this constraint from the signature or add it to the implementation. - /// (Originally from ../FSComp.txt:171) + /// (Originally from ..\FSComp.txt:171) static member typrelSigImplNotCompatibleConstraintsDifferRemove(a0 : System.String, a1 : System.String) = (341, GetStringFunc("typrelSigImplNotCompatibleConstraintsDifferRemove",",,,%s,,,%s,,,") a0 a1) /// The type '%s' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' - /// (Originally from ../FSComp.txt:172) + /// (Originally from ..\FSComp.txt:172) static member typrelTypeImplementsIComparableShouldOverrideObjectEquals(a0 : System.String) = (342, GetStringFunc("typrelTypeImplementsIComparableShouldOverrideObjectEquals",",,,%s,,,") a0) /// The type '%s' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly - /// (Originally from ../FSComp.txt:173) + /// (Originally from ..\FSComp.txt:173) static member typrelTypeImplementsIComparableDefaultObjectEqualsProvided(a0 : System.String) = (343, GetStringFunc("typrelTypeImplementsIComparableDefaultObjectEqualsProvided",",,,%s,,,") a0) /// The struct, record or union type '%s' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type - /// (Originally from ../FSComp.txt:174) + /// (Originally from ..\FSComp.txt:174) static member typrelExplicitImplementationOfGetHashCodeOrEquals(a0 : System.String) = (344, GetStringFunc("typrelExplicitImplementationOfGetHashCodeOrEquals",",,,%s,,,") a0) /// The struct, record or union type '%s' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' - /// (Originally from ../FSComp.txt:175) + /// (Originally from ..\FSComp.txt:175) static member typrelExplicitImplementationOfGetHashCode(a0 : System.String) = (345, GetStringFunc("typrelExplicitImplementationOfGetHashCode",",,,%s,,,") a0) /// The struct, record or union type '%s' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' - /// (Originally from ../FSComp.txt:176) + /// (Originally from ..\FSComp.txt:176) static member typrelExplicitImplementationOfEquals(a0 : System.String) = (346, GetStringFunc("typrelExplicitImplementationOfEquals",",,,%s,,,") a0) /// The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s - /// (Originally from ../FSComp.txt:177) + /// (Originally from ..\FSComp.txt:177) static member ExceptionDefsNotCompatibleHiddenBySignature(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleHiddenBySignature",",,,%s,,,%s,,,") a0 a1) /// The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s - /// (Originally from ../FSComp.txt:178) + /// (Originally from ..\FSComp.txt:178) static member ExceptionDefsNotCompatibleDotNetRepresentationsDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleDotNetRepresentationsDiffer",",,,%s,,,%s,,,") a0 a1) /// The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ../FSComp.txt:179) + /// (Originally from ..\FSComp.txt:179) static member ExceptionDefsNotCompatibleAbbreviationHiddenBySignature(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleAbbreviationHiddenBySignature",",,,%s,,,%s,,,") a0 a1) /// The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ../FSComp.txt:180) + /// (Originally from ..\FSComp.txt:180) static member ExceptionDefsNotCompatibleSignaturesDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleSignaturesDiffer",",,,%s,,,%s,,,") a0 a1) /// The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ../FSComp.txt:181) + /// (Originally from ..\FSComp.txt:181) static member ExceptionDefsNotCompatibleExceptionDeclarationsDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleExceptionDeclarationsDiffer",",,,%s,,,%s,,,") a0 a1) /// The exception definitions are not compatible because the field '%s' was required by the signature but was not specified by the implementation. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ../FSComp.txt:182) + /// (Originally from ..\FSComp.txt:182) static member ExceptionDefsNotCompatibleFieldInSigButNotImpl(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleFieldInSigButNotImpl",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The exception definitions are not compatible because the field '%s' was present in the implementation but not in the signature. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ../FSComp.txt:183) + /// (Originally from ..\FSComp.txt:183) static member ExceptionDefsNotCompatibleFieldInImplButNotSig(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleFieldInImplButNotSig",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ../FSComp.txt:184) + /// (Originally from ..\FSComp.txt:184) static member ExceptionDefsNotCompatibleFieldOrderDiffers(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleFieldOrderDiffers",",,,%s,,,%s,,,") a0 a1) /// The namespace or module attributes differ between signature and implementation - /// (Originally from ../FSComp.txt:185) + /// (Originally from ..\FSComp.txt:185) static member typrelModuleNamespaceAttributesDifferInSigAndImpl() = (355, GetStringFunc("typrelModuleNamespaceAttributesDifferInSigAndImpl",",,,") ) /// This method is over-constrained in its type parameters - /// (Originally from ../FSComp.txt:186) + /// (Originally from ..\FSComp.txt:186) static member typrelMethodIsOverconstrained() = (356, GetStringFunc("typrelMethodIsOverconstrained",",,,") ) /// No implementations of '%s' had the correct number of arguments and type parameters. The required signature is '%s'. - /// (Originally from ../FSComp.txt:187) + /// (Originally from ..\FSComp.txt:187) static member typrelOverloadNotFound(a0 : System.String, a1 : System.String) = (357, GetStringFunc("typrelOverloadNotFound",",,,%s,,,%s,,,") a0 a1) /// The override for '%s' was ambiguous - /// (Originally from ../FSComp.txt:188) + /// (Originally from ..\FSComp.txt:188) static member typrelOverrideWasAmbiguous(a0 : System.String) = (358, GetStringFunc("typrelOverrideWasAmbiguous",",,,%s,,,") a0) /// More than one override implements '%s' - /// (Originally from ../FSComp.txt:189) + /// (Originally from ..\FSComp.txt:189) static member typrelMoreThenOneOverride(a0 : System.String) = (359, GetStringFunc("typrelMoreThenOneOverride",",,,%s,,,") a0) /// The method '%s' is sealed and cannot be overridden - /// (Originally from ../FSComp.txt:190) + /// (Originally from ..\FSComp.txt:190) static member typrelMethodIsSealed(a0 : System.String) = (360, GetStringFunc("typrelMethodIsSealed",",,,%s,,,") a0) /// The override '%s' implements more than one abstract slot, e.g. '%s' and '%s' - /// (Originally from ../FSComp.txt:191) + /// (Originally from ..\FSComp.txt:191) static member typrelOverrideImplementsMoreThenOneSlot(a0 : System.String, a1 : System.String, a2 : System.String) = (361, GetStringFunc("typrelOverrideImplementsMoreThenOneSlot",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Duplicate or redundant interface - /// (Originally from ../FSComp.txt:192) + /// (Originally from ..\FSComp.txt:192) static member typrelDuplicateInterface() = (362, GetStringFunc("typrelDuplicateInterface",",,,") ) /// The interface '%s' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. - /// (Originally from ../FSComp.txt:193) + /// (Originally from ..\FSComp.txt:193) static member typrelNeedExplicitImplementation(a0 : System.String) = (363, GetStringFunc("typrelNeedExplicitImplementation",",,,%s,,,") a0) /// A named argument has been assigned more than one value - /// (Originally from ../FSComp.txt:194) + /// (Originally from ..\FSComp.txt:194) static member typrelNamedArgumentHasBeenAssignedMoreThenOnce() = (364, GetStringFunc("typrelNamedArgumentHasBeenAssignedMoreThenOnce",",,,") ) /// No implementation was given for '%s' - /// (Originally from ../FSComp.txt:195) + /// (Originally from ..\FSComp.txt:195) static member typrelNoImplementationGiven(a0 : System.String) = (365, GetStringFunc("typrelNoImplementationGiven",",,,%s,,,") a0) /// No implementation was given for '%s'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. - /// (Originally from ../FSComp.txt:196) + /// (Originally from ..\FSComp.txt:196) static member typrelNoImplementationGivenWithSuggestion(a0 : System.String) = (366, GetStringFunc("typrelNoImplementationGivenWithSuggestion",",,,%s,,,") a0) /// The member '%s' does not have the correct number of arguments. The required signature is '%s'. - /// (Originally from ../FSComp.txt:197) + /// (Originally from ..\FSComp.txt:197) static member typrelMemberDoesNotHaveCorrectNumberOfArguments(a0 : System.String, a1 : System.String) = (367, GetStringFunc("typrelMemberDoesNotHaveCorrectNumberOfArguments",",,,%s,,,%s,,,") a0 a1) /// The member '%s' does not have the correct number of method type parameters. The required signature is '%s'. - /// (Originally from ../FSComp.txt:198) + /// (Originally from ..\FSComp.txt:198) static member typrelMemberDoesNotHaveCorrectNumberOfTypeParameters(a0 : System.String, a1 : System.String) = (368, GetStringFunc("typrelMemberDoesNotHaveCorrectNumberOfTypeParameters",",,,%s,,,%s,,,") a0 a1) /// The member '%s' does not have the correct kinds of generic parameters. The required signature is '%s'. - /// (Originally from ../FSComp.txt:199) + /// (Originally from ..\FSComp.txt:199) static member typrelMemberDoesNotHaveCorrectKindsOfGenericParameters(a0 : System.String, a1 : System.String) = (369, GetStringFunc("typrelMemberDoesNotHaveCorrectKindsOfGenericParameters",",,,%s,,,%s,,,") a0 a1) /// The member '%s' cannot be used to implement '%s'. The required signature is '%s'. - /// (Originally from ../FSComp.txt:200) + /// (Originally from ..\FSComp.txt:200) static member typrelMemberCannotImplement(a0 : System.String, a1 : System.String, a2 : System.String) = (370, GetStringFunc("typrelMemberCannotImplement",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Error while parsing embedded IL - /// (Originally from ../FSComp.txt:201) + /// (Originally from ..\FSComp.txt:201) static member astParseEmbeddedILError() = (371, GetStringFunc("astParseEmbeddedILError",",,,") ) /// Error while parsing embedded IL type - /// (Originally from ../FSComp.txt:202) + /// (Originally from ..\FSComp.txt:202) static member astParseEmbeddedILTypeError() = (372, GetStringFunc("astParseEmbeddedILTypeError",",,,") ) /// This indexer notation has been removed from the F# language - /// (Originally from ../FSComp.txt:203) + /// (Originally from ..\FSComp.txt:203) static member astDeprecatedIndexerNotation() = (GetStringFunc("astDeprecatedIndexerNotation",",,,") ) /// Invalid expression on left of assignment - /// (Originally from ../FSComp.txt:204) + /// (Originally from ..\FSComp.txt:204) static member astInvalidExprLeftHandOfAssignment() = (374, GetStringFunc("astInvalidExprLeftHandOfAssignment",",,,") ) /// The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. - /// (Originally from ../FSComp.txt:205) + /// (Originally from ..\FSComp.txt:205) static member augNoRefEqualsOnStruct() = (376, GetStringFunc("augNoRefEqualsOnStruct",",,,") ) /// This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' - /// (Originally from ../FSComp.txt:206) + /// (Originally from ..\FSComp.txt:206) static member augInvalidAttrs() = (377, GetStringFunc("augInvalidAttrs",",,,") ) /// The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute - /// (Originally from ../FSComp.txt:207) + /// (Originally from ..\FSComp.txt:207) static member augNoEqualityNeedsNoComparison() = (378, GetStringFunc("augNoEqualityNeedsNoComparison",",,,") ) /// The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute - /// (Originally from ../FSComp.txt:208) + /// (Originally from ..\FSComp.txt:208) static member augStructCompNeedsStructEquality() = (379, GetStringFunc("augStructCompNeedsStructEquality",",,,") ) /// The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes - /// (Originally from ../FSComp.txt:209) + /// (Originally from ..\FSComp.txt:209) static member augStructEqNeedsNoCompOrStructComp() = (380, GetStringFunc("augStructEqNeedsNoCompOrStructComp",",,,") ) /// A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes - /// (Originally from ../FSComp.txt:210) + /// (Originally from ..\FSComp.txt:210) static member augTypeCantHaveRefEqAndStructAttrs() = (381, GetStringFunc("augTypeCantHaveRefEqAndStructAttrs",",,,") ) /// Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes - /// (Originally from ../FSComp.txt:211) + /// (Originally from ..\FSComp.txt:211) static member augOnlyCertainTypesCanHaveAttrs() = (382, GetStringFunc("augOnlyCertainTypesCanHaveAttrs",",,,") ) /// A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' - /// (Originally from ../FSComp.txt:212) + /// (Originally from ..\FSComp.txt:212) static member augRefEqCantHaveObjEquals() = (383, GetStringFunc("augRefEqCantHaveObjEquals",",,,") ) /// A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' - /// (Originally from ../FSComp.txt:213) + /// (Originally from ..\FSComp.txt:213) static member augCustomEqNeedsObjEquals() = (384, GetStringFunc("augCustomEqNeedsObjEquals",",,,") ) /// A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' - /// (Originally from ../FSComp.txt:214) + /// (Originally from ..\FSComp.txt:214) static member augCustomCompareNeedsIComp() = (385, GetStringFunc("augCustomCompareNeedsIComp",",,,") ) /// A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes - /// (Originally from ../FSComp.txt:215) + /// (Originally from ..\FSComp.txt:215) static member augNoEqNeedsNoObjEquals() = (386, GetStringFunc("augNoEqNeedsNoObjEquals",",,,") ) /// A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes - /// (Originally from ../FSComp.txt:216) + /// (Originally from ..\FSComp.txt:216) static member augNoCompCantImpIComp() = (386, GetStringFunc("augNoCompCantImpIComp",",,,") ) /// The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes - /// (Originally from ../FSComp.txt:217) + /// (Originally from ..\FSComp.txt:217) static member augCustomEqNeedsNoCompOrCustomComp() = (387, GetStringFunc("augCustomEqNeedsNoCompOrCustomComp",",,,") ) /// Positional specifiers are not permitted in format strings - /// (Originally from ../FSComp.txt:218) + /// (Originally from ..\FSComp.txt:218) static member forPositionalSpecifiersNotPermitted() = (GetStringFunc("forPositionalSpecifiersNotPermitted",",,,") ) /// Missing format specifier - /// (Originally from ../FSComp.txt:219) + /// (Originally from ..\FSComp.txt:219) static member forMissingFormatSpecifier() = (GetStringFunc("forMissingFormatSpecifier",",,,") ) /// '%s' flag set twice - /// (Originally from ../FSComp.txt:220) + /// (Originally from ..\FSComp.txt:220) static member forFlagSetTwice(a0 : System.String) = (GetStringFunc("forFlagSetTwice",",,,%s,,,") a0) /// Prefix flag (' ' or '+') set twice - /// (Originally from ../FSComp.txt:221) + /// (Originally from ..\FSComp.txt:221) static member forPrefixFlagSpacePlusSetTwice() = (GetStringFunc("forPrefixFlagSpacePlusSetTwice",",,,") ) /// The # formatting modifier is invalid in F# - /// (Originally from ../FSComp.txt:222) + /// (Originally from ..\FSComp.txt:222) static member forHashSpecifierIsInvalid() = (GetStringFunc("forHashSpecifierIsInvalid",",,,") ) /// Bad precision in format specifier - /// (Originally from ../FSComp.txt:223) + /// (Originally from ..\FSComp.txt:223) static member forBadPrecision() = (GetStringFunc("forBadPrecision",",,,") ) /// Bad width in format specifier - /// (Originally from ../FSComp.txt:224) + /// (Originally from ..\FSComp.txt:224) static member forBadWidth() = (GetStringFunc("forBadWidth",",,,") ) /// '%s' format does not support '0' flag - /// (Originally from ../FSComp.txt:225) + /// (Originally from ..\FSComp.txt:225) static member forDoesNotSupportZeroFlag(a0 : System.String) = (GetStringFunc("forDoesNotSupportZeroFlag",",,,%s,,,") a0) /// Precision missing after the '.' - /// (Originally from ../FSComp.txt:226) + /// (Originally from ..\FSComp.txt:226) static member forPrecisionMissingAfterDot() = (GetStringFunc("forPrecisionMissingAfterDot",",,,") ) /// '%s' format does not support precision - /// (Originally from ../FSComp.txt:227) + /// (Originally from ..\FSComp.txt:227) static member forFormatDoesntSupportPrecision(a0 : System.String) = (GetStringFunc("forFormatDoesntSupportPrecision",",,,%s,,,") a0) /// Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %%d, %%x, %%o or %%u instead, which are overloaded to work with all basic integer types. - /// (Originally from ../FSComp.txt:228) + /// (Originally from ..\FSComp.txt:228) static member forBadFormatSpecifier() = (GetStringFunc("forBadFormatSpecifier",",,,") ) /// The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %%d, %%x, %%o or %%u instead, which are overloaded to work with all basic integer types. - /// (Originally from ../FSComp.txt:229) + /// (Originally from ..\FSComp.txt:229) static member forLIsUnnecessary() = (GetStringFunc("forLIsUnnecessary",",,,") ) /// The 'h' or 'H' in this format specifier is unnecessary. You can use %%d, %%x, %%o or %%u instead, which are overloaded to work with all basic integer types. - /// (Originally from ../FSComp.txt:230) + /// (Originally from ..\FSComp.txt:230) static member forHIsUnnecessary() = (GetStringFunc("forHIsUnnecessary",",,,") ) /// '%s' does not support prefix '%s' flag - /// (Originally from ../FSComp.txt:231) + /// (Originally from ..\FSComp.txt:231) static member forDoesNotSupportPrefixFlag(a0 : System.String, a1 : System.String) = (GetStringFunc("forDoesNotSupportPrefixFlag",",,,%s,,,%s,,,") a0 a1) /// Bad format specifier: '%s' - /// (Originally from ../FSComp.txt:232) + /// (Originally from ..\FSComp.txt:232) static member forBadFormatSpecifierGeneral(a0 : System.String) = (GetStringFunc("forBadFormatSpecifierGeneral",",,,%s,,,") a0) /// System.Environment.Exit did not exit - /// (Originally from ../FSComp.txt:233) + /// (Originally from ..\FSComp.txt:233) static member elSysEnvExitDidntExit() = (GetStringFunc("elSysEnvExitDidntExit",",,,") ) /// The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined - /// (Originally from ../FSComp.txt:234) + /// (Originally from ..\FSComp.txt:234) static member elDeprecatedOperator() = (GetStringFunc("elDeprecatedOperator",",,,") ) /// A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. - /// (Originally from ../FSComp.txt:235) + /// (Originally from ..\FSComp.txt:235) static member chkProtectedOrBaseCalled() = (405, GetStringFunc("chkProtectedOrBaseCalled",",,,") ) /// The byref-typed variable '%s' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. - /// (Originally from ../FSComp.txt:236) + /// (Originally from ..\FSComp.txt:236) static member chkByrefUsedInInvalidWay(a0 : System.String) = (406, GetStringFunc("chkByrefUsedInInvalidWay",",,,%s,,,") a0) /// The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. - /// (Originally from ../FSComp.txt:237) + /// (Originally from ..\FSComp.txt:237) static member chkBaseUsedInInvalidWay() = (408, GetStringFunc("chkBaseUsedInInvalidWay",",,,") ) /// The variable '%s' is used in an invalid way - /// (Originally from ../FSComp.txt:238) + /// (Originally from ..\FSComp.txt:238) static member chkVariableUsedInInvalidWay(a0 : System.String) = (GetStringFunc("chkVariableUsedInInvalidWay",",,,%s,,,") a0) /// The type '%s' is less accessible than the value, member or type '%s' it is used in. - /// (Originally from ../FSComp.txt:239) + /// (Originally from ..\FSComp.txt:239) static member chkTypeLessAccessibleThanType(a0 : System.String, a1 : System.String) = (410, GetStringFunc("chkTypeLessAccessibleThanType",",,,%s,,,%s,,,") a0 a1) /// 'System.Void' can only be used as 'typeof' in F# - /// (Originally from ../FSComp.txt:240) + /// (Originally from ..\FSComp.txt:240) static member chkSystemVoidOnlyInTypeof() = (411, GetStringFunc("chkSystemVoidOnlyInTypeof",",,,") ) /// A type instantiation involves a byref type. This is not permitted by the rules of Common IL. - /// (Originally from ../FSComp.txt:241) + /// (Originally from ..\FSComp.txt:241) static member chkErrorUseOfByref() = (412, GetStringFunc("chkErrorUseOfByref",",,,") ) /// Calls to 'reraise' may only occur directly in a handler of a try-with - /// (Originally from ../FSComp.txt:242) + /// (Originally from ..\FSComp.txt:242) static member chkErrorContainsCallToRethrow() = (413, GetStringFunc("chkErrorContainsCallToRethrow",",,,") ) /// Expression-splicing operators may only be used within quotations - /// (Originally from ../FSComp.txt:243) + /// (Originally from ..\FSComp.txt:243) static member chkSplicingOnlyInQuotations() = (414, GetStringFunc("chkSplicingOnlyInQuotations",",,,") ) /// First-class uses of the expression-splicing operator are not permitted - /// (Originally from ../FSComp.txt:244) + /// (Originally from ..\FSComp.txt:244) static member chkNoFirstClassSplicing() = (415, GetStringFunc("chkNoFirstClassSplicing",",,,") ) /// First-class uses of the address-of operators are not permitted - /// (Originally from ../FSComp.txt:245) + /// (Originally from ..\FSComp.txt:245) static member chkNoFirstClassAddressOf() = (416, GetStringFunc("chkNoFirstClassAddressOf",",,,") ) /// First-class uses of the 'reraise' function is not permitted - /// (Originally from ../FSComp.txt:246) + /// (Originally from ..\FSComp.txt:246) static member chkNoFirstClassRethrow() = (417, GetStringFunc("chkNoFirstClassRethrow",",,,") ) /// The byref typed value '%s' cannot be used at this point - /// (Originally from ../FSComp.txt:247) + /// (Originally from ..\FSComp.txt:247) static member chkNoByrefAtThisPoint(a0 : System.String) = (418, GetStringFunc("chkNoByrefAtThisPoint",",,,%s,,,") a0) /// 'base' values may only be used to make direct calls to the base implementations of overridden members - /// (Originally from ../FSComp.txt:248) + /// (Originally from ..\FSComp.txt:248) static member chkLimitationsOfBaseKeyword() = (419, GetStringFunc("chkLimitationsOfBaseKeyword",",,,") ) /// Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. - /// (Originally from ../FSComp.txt:249) + /// (Originally from ..\FSComp.txt:249) static member chkObjCtorsCantUseExceptionHandling() = (420, GetStringFunc("chkObjCtorsCantUseExceptionHandling",",,,") ) /// The address of the variable '%s' cannot be used at this point - /// (Originally from ../FSComp.txt:250) + /// (Originally from ..\FSComp.txt:250) static member chkNoAddressOfAtThisPoint(a0 : System.String) = (421, GetStringFunc("chkNoAddressOfAtThisPoint",",,,%s,,,") a0) /// The address of the static field '%s' cannot be used at this point - /// (Originally from ../FSComp.txt:251) + /// (Originally from ..\FSComp.txt:251) static member chkNoAddressStaticFieldAtThisPoint(a0 : System.String) = (422, GetStringFunc("chkNoAddressStaticFieldAtThisPoint",",,,%s,,,") a0) /// The address of the field '%s' cannot be used at this point - /// (Originally from ../FSComp.txt:252) + /// (Originally from ..\FSComp.txt:252) static member chkNoAddressFieldAtThisPoint(a0 : System.String) = (423, GetStringFunc("chkNoAddressFieldAtThisPoint",",,,%s,,,") a0) /// The address of an array element cannot be used at this point - /// (Originally from ../FSComp.txt:253) + /// (Originally from ..\FSComp.txt:253) static member chkNoAddressOfArrayElementAtThisPoint() = (424, GetStringFunc("chkNoAddressOfArrayElementAtThisPoint",",,,") ) /// The type of a first-class function cannot contain byrefs - /// (Originally from ../FSComp.txt:254) + /// (Originally from ..\FSComp.txt:254) static member chkFirstClassFuncNoByref() = (425, GetStringFunc("chkFirstClassFuncNoByref",",,,") ) /// A method return type would contain byrefs which is not permitted - /// (Originally from ../FSComp.txt:255) + /// (Originally from ..\FSComp.txt:255) static member chkReturnTypeNoByref() = (426, GetStringFunc("chkReturnTypeNoByref",",,,") ) /// Invalid custom attribute value (not a constant or literal) - /// (Originally from ../FSComp.txt:256) + /// (Originally from ..\FSComp.txt:256) static member chkInvalidCustAttrVal() = (428, GetStringFunc("chkInvalidCustAttrVal",",,,") ) /// The attribute type '%s' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. - /// (Originally from ../FSComp.txt:257) + /// (Originally from ..\FSComp.txt:257) static member chkAttrHasAllowMultiFalse(a0 : System.String) = (429, GetStringFunc("chkAttrHasAllowMultiFalse",",,,%s,,,") a0) /// The member '%s' is used in an invalid way. A use of '%s' has been inferred prior to its definition at or near '%s'. This is an invalid forward reference. - /// (Originally from ../FSComp.txt:258) + /// (Originally from ..\FSComp.txt:258) static member chkMemberUsedInInvalidWay(a0 : System.String, a1 : System.String, a2 : System.String) = (430, GetStringFunc("chkMemberUsedInInvalidWay",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// A byref typed value would be stored here. Top-level let-bound byref values are not permitted. - /// (Originally from ../FSComp.txt:259) + /// (Originally from ..\FSComp.txt:259) static member chkNoByrefAsTopValue() = (431, GetStringFunc("chkNoByrefAsTopValue",",,,") ) /// [] terms cannot contain uses of the prefix splice operator '%%' - /// (Originally from ../FSComp.txt:260) + /// (Originally from ..\FSComp.txt:260) static member chkReflectedDefCantSplice() = (432, GetStringFunc("chkReflectedDefCantSplice",",,,") ) /// A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. - /// (Originally from ../FSComp.txt:261) + /// (Originally from ..\FSComp.txt:261) static member chkEntryPointUsage() = (433, GetStringFunc("chkEntryPointUsage",",,,") ) /// compiled form of the union case - /// (Originally from ../FSComp.txt:262) + /// (Originally from ..\FSComp.txt:262) static member chkUnionCaseCompiledForm() = (GetStringFunc("chkUnionCaseCompiledForm",",,,") ) /// default augmentation of the union case - /// (Originally from ../FSComp.txt:263) + /// (Originally from ..\FSComp.txt:263) static member chkUnionCaseDefaultAugmentation() = (GetStringFunc("chkUnionCaseDefaultAugmentation",",,,") ) /// The property '%s' has the same name as a method in type '%s'. - /// (Originally from ../FSComp.txt:264) + /// (Originally from ..\FSComp.txt:264) static member chkPropertySameNameMethod(a0 : System.String, a1 : System.String) = (434, GetStringFunc("chkPropertySameNameMethod",",,,%s,,,%s,,,") a0 a1) /// The property '%s' of type '%s' has a getter and a setter that do not match. If one is abstract then the other must be as well. - /// (Originally from ../FSComp.txt:265) + /// (Originally from ..\FSComp.txt:265) static member chkGetterSetterDoNotMatchAbstract(a0 : System.String, a1 : System.String) = (435, GetStringFunc("chkGetterSetterDoNotMatchAbstract",",,,%s,,,%s,,,") a0 a1) /// The property '%s' has the same name as another property in type '%s', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. - /// (Originally from ../FSComp.txt:266) + /// (Originally from ..\FSComp.txt:266) static member chkPropertySameNameIndexer(a0 : System.String, a1 : System.String) = (436, GetStringFunc("chkPropertySameNameIndexer",",,,%s,,,%s,,,") a0 a1) /// A type would store a byref typed value. This is not permitted by Common IL. - /// (Originally from ../FSComp.txt:267) + /// (Originally from ..\FSComp.txt:267) static member chkCantStoreByrefValue() = (437, GetStringFunc("chkCantStoreByrefValue",",,,") ) /// Duplicate method. The method '%s' has the same name and signature as another method in type '%s'. - /// (Originally from ../FSComp.txt:269) + /// (Originally from ..\FSComp.txt:269) static member chkDuplicateMethod(a0 : System.String, a1 : System.String) = (438, GetStringFunc("chkDuplicateMethod",",,,%s,,,%s,,,") a0 a1) /// Duplicate method. The method '%s' has the same name and signature as another method in type '%s' once tuples, functions, units of measure and/or provided types are erased. - /// (Originally from ../FSComp.txt:270) + /// (Originally from ..\FSComp.txt:270) static member chkDuplicateMethodWithSuffix(a0 : System.String, a1 : System.String) = (438, GetStringFunc("chkDuplicateMethodWithSuffix",",,,%s,,,%s,,,") a0 a1) /// The method '%s' has curried arguments but has the same name as another method in type '%s'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. - /// (Originally from ../FSComp.txt:271) + /// (Originally from ..\FSComp.txt:271) static member chkDuplicateMethodCurried(a0 : System.String, a1 : System.String) = (439, GetStringFunc("chkDuplicateMethodCurried",",,,%s,,,%s,,,") a0 a1) /// Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments - /// (Originally from ../FSComp.txt:272) + /// (Originally from ..\FSComp.txt:272) static member chkCurriedMethodsCantHaveOutParams() = (440, GetStringFunc("chkCurriedMethodsCantHaveOutParams",",,,") ) /// Duplicate property. The property '%s' has the same name and signature as another property in type '%s'. - /// (Originally from ../FSComp.txt:273) + /// (Originally from ..\FSComp.txt:273) static member chkDuplicateProperty(a0 : System.String, a1 : System.String) = (441, GetStringFunc("chkDuplicateProperty",",,,%s,,,%s,,,") a0 a1) /// Duplicate property. The property '%s' has the same name and signature as another property in type '%s' once tuples, functions, units of measure and/or provided types are erased. - /// (Originally from ../FSComp.txt:274) + /// (Originally from ..\FSComp.txt:274) static member chkDuplicatePropertyWithSuffix(a0 : System.String, a1 : System.String) = (441, GetStringFunc("chkDuplicatePropertyWithSuffix",",,,%s,,,%s,,,") a0 a1) /// Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type. - /// (Originally from ../FSComp.txt:275) + /// (Originally from ..\FSComp.txt:275) static member chkDuplicateMethodInheritedType(a0 : System.String) = (442, GetStringFunc("chkDuplicateMethodInheritedType",",,,%s,,,") a0) /// Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. - /// (Originally from ../FSComp.txt:276) + /// (Originally from ..\FSComp.txt:276) static member chkDuplicateMethodInheritedTypeWithSuffix(a0 : System.String) = (442, GetStringFunc("chkDuplicateMethodInheritedTypeWithSuffix",",,,%s,,,") a0) /// This type implements the same interface at different generic instantiations '%s' and '%s'. This is not permitted in this version of F#. - /// (Originally from ../FSComp.txt:277) + /// (Originally from ..\FSComp.txt:277) static member chkMultipleGenericInterfaceInstantiations(a0 : System.String, a1 : System.String) = (443, GetStringFunc("chkMultipleGenericInterfaceInstantiations",",,,%s,,,%s,,,") a0 a1) /// The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check - /// (Originally from ../FSComp.txt:278) + /// (Originally from ..\FSComp.txt:278) static member chkValueWithDefaultValueMustHaveDefaultValue() = (444, GetStringFunc("chkValueWithDefaultValueMustHaveDefaultValue",",,,") ) /// The type abbreviation contains byrefs. This is not permitted by F#. - /// (Originally from ../FSComp.txt:279) + /// (Originally from ..\FSComp.txt:279) static member chkNoByrefInTypeAbbrev() = (445, GetStringFunc("chkNoByrefInTypeAbbrev",",,,") ) /// The variable '%s' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. - /// (Originally from ../FSComp.txt:280) + /// (Originally from ..\FSComp.txt:280) static member crefBoundVarUsedInSplice(a0 : System.String) = (446, GetStringFunc("crefBoundVarUsedInSplice",",,,%s,,,") a0) /// Quotations cannot contain uses of generic expressions - /// (Originally from ../FSComp.txt:281) + /// (Originally from ..\FSComp.txt:281) static member crefQuotationsCantContainGenericExprs() = (447, GetStringFunc("crefQuotationsCantContainGenericExprs",",,,") ) /// Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. - /// (Originally from ../FSComp.txt:282) + /// (Originally from ..\FSComp.txt:282) static member crefQuotationsCantContainGenericFunctions() = (448, GetStringFunc("crefQuotationsCantContainGenericFunctions",",,,") ) /// Quotations cannot contain object expressions - /// (Originally from ../FSComp.txt:283) + /// (Originally from ..\FSComp.txt:283) static member crefQuotationsCantContainObjExprs() = (449, GetStringFunc("crefQuotationsCantContainObjExprs",",,,") ) /// Quotations cannot contain expressions that take the address of a field - /// (Originally from ../FSComp.txt:284) + /// (Originally from ..\FSComp.txt:284) static member crefQuotationsCantContainAddressOf() = (450, GetStringFunc("crefQuotationsCantContainAddressOf",",,,") ) /// Quotations cannot contain expressions that fetch static fields - /// (Originally from ../FSComp.txt:285) + /// (Originally from ..\FSComp.txt:285) static member crefQuotationsCantContainStaticFieldRef() = (451, GetStringFunc("crefQuotationsCantContainStaticFieldRef",",,,") ) /// Quotations cannot contain inline assembly code or pattern matching on arrays - /// (Originally from ../FSComp.txt:286) + /// (Originally from ..\FSComp.txt:286) static member crefQuotationsCantContainInlineIL() = (452, GetStringFunc("crefQuotationsCantContainInlineIL",",,,") ) /// Quotations cannot contain descending for loops - /// (Originally from ../FSComp.txt:287) + /// (Originally from ..\FSComp.txt:287) static member crefQuotationsCantContainDescendingForLoops() = (453, GetStringFunc("crefQuotationsCantContainDescendingForLoops",",,,") ) /// Quotations cannot contain expressions that fetch union case indexes - /// (Originally from ../FSComp.txt:288) + /// (Originally from ..\FSComp.txt:288) static member crefQuotationsCantFetchUnionIndexes() = (454, GetStringFunc("crefQuotationsCantFetchUnionIndexes",",,,") ) /// Quotations cannot contain expressions that set union case fields - /// (Originally from ../FSComp.txt:289) + /// (Originally from ..\FSComp.txt:289) static member crefQuotationsCantSetUnionFields() = (455, GetStringFunc("crefQuotationsCantSetUnionFields",",,,") ) /// Quotations cannot contain expressions that set fields in exception values - /// (Originally from ../FSComp.txt:290) + /// (Originally from ..\FSComp.txt:290) static member crefQuotationsCantSetExceptionFields() = (456, GetStringFunc("crefQuotationsCantSetExceptionFields",",,,") ) /// Quotations cannot contain expressions that require byref pointers - /// (Originally from ../FSComp.txt:291) + /// (Originally from ..\FSComp.txt:291) static member crefQuotationsCantRequireByref() = (457, GetStringFunc("crefQuotationsCantRequireByref",",,,") ) /// Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call - /// (Originally from ../FSComp.txt:292) + /// (Originally from ..\FSComp.txt:292) static member crefQuotationsCantCallTraitMembers() = (458, GetStringFunc("crefQuotationsCantCallTraitMembers",",,,") ) /// Quotations cannot contain this kind of constant - /// (Originally from ../FSComp.txt:293) + /// (Originally from ..\FSComp.txt:293) static member crefQuotationsCantContainThisConstant() = (459, GetStringFunc("crefQuotationsCantContainThisConstant",",,,") ) /// Quotations cannot contain this kind of pattern match - /// (Originally from ../FSComp.txt:294) + /// (Originally from ..\FSComp.txt:294) static member crefQuotationsCantContainThisPatternMatch() = (460, GetStringFunc("crefQuotationsCantContainThisPatternMatch",",,,") ) /// Quotations cannot contain array pattern matching - /// (Originally from ../FSComp.txt:295) + /// (Originally from ..\FSComp.txt:295) static member crefQuotationsCantContainArrayPatternMatching() = (461, GetStringFunc("crefQuotationsCantContainArrayPatternMatching",",,,") ) /// Quotations cannot contain this kind of type - /// (Originally from ../FSComp.txt:296) + /// (Originally from ..\FSComp.txt:296) static member crefQuotationsCantContainThisType() = (462, GetStringFunc("crefQuotationsCantContainThisType",",,,") ) /// The declared type parameter '%s' cannot be used here since the type parameter cannot be resolved at compile time - /// (Originally from ../FSComp.txt:297) + /// (Originally from ..\FSComp.txt:297) static member csTypeCannotBeResolvedAtCompileTime(a0 : System.String) = (GetStringFunc("csTypeCannotBeResolvedAtCompileTime",",,,%s,,,") a0) /// This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. - /// (Originally from ../FSComp.txt:298) + /// (Originally from ..\FSComp.txt:298) static member csCodeLessGeneric() = (464, GetStringFunc("csCodeLessGeneric",",,,") ) /// Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. - /// (Originally from ../FSComp.txt:299) + /// (Originally from ..\FSComp.txt:299) static member csTypeInferenceMaxDepth() = (465, GetStringFunc("csTypeInferenceMaxDepth",",,,") ) /// Expected arguments to an instance member - /// (Originally from ../FSComp.txt:300) + /// (Originally from ..\FSComp.txt:300) static member csExpectedArguments() = (GetStringFunc("csExpectedArguments",",,,") ) /// This indexer expects %d arguments but is here given %d - /// (Originally from ../FSComp.txt:301) + /// (Originally from ..\FSComp.txt:301) static member csIndexArgumentMismatch(a0 : System.Int32, a1 : System.Int32) = (GetStringFunc("csIndexArgumentMismatch",",,,%d,,,%d,,,") a0 a1) /// Expecting a type supporting the operator '%s' but given a function type. You may be missing an argument to a function. - /// (Originally from ../FSComp.txt:302) + /// (Originally from ..\FSComp.txt:302) static member csExpectTypeWithOperatorButGivenFunction(a0 : System.String) = (GetStringFunc("csExpectTypeWithOperatorButGivenFunction",",,,%s,,,") a0) /// Expecting a type supporting the operator '%s' but given a tuple type - /// (Originally from ../FSComp.txt:303) + /// (Originally from ..\FSComp.txt:303) static member csExpectTypeWithOperatorButGivenTuple(a0 : System.String) = (GetStringFunc("csExpectTypeWithOperatorButGivenTuple",",,,%s,,,") a0) /// None of the types '%s' support the operator '%s' - /// (Originally from ../FSComp.txt:304) + /// (Originally from ..\FSComp.txt:304) static member csTypesDoNotSupportOperator(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypesDoNotSupportOperator",",,,%s,,,%s,,,") a0 a1) /// The type '%s' does not support the operator '%s' - /// (Originally from ../FSComp.txt:305) + /// (Originally from ..\FSComp.txt:305) static member csTypeDoesNotSupportOperator(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypeDoesNotSupportOperator",",,,%s,,,%s,,,") a0 a1) /// None of the types '%s' support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - /// (Originally from ../FSComp.txt:306) + /// (Originally from ..\FSComp.txt:306) static member csTypesDoNotSupportOperatorNullable(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypesDoNotSupportOperatorNullable",",,,%s,,,%s,,,") a0 a1) /// The type '%s' does not support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - /// (Originally from ../FSComp.txt:307) + /// (Originally from ..\FSComp.txt:307) static member csTypeDoesNotSupportOperatorNullable(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypeDoesNotSupportOperatorNullable",",,,%s,,,%s,,,") a0 a1) /// The type '%s' does not support a conversion to the type '%s' - /// (Originally from ../FSComp.txt:308) + /// (Originally from ..\FSComp.txt:308) static member csTypeDoesNotSupportConversion(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypeDoesNotSupportConversion",",,,%s,,,%s,,,") a0 a1) /// The type '%s' has a method '%s' (full name '%s'), but the method is static - /// (Originally from ../FSComp.txt:309) + /// (Originally from ..\FSComp.txt:309) static member csMethodFoundButIsStatic(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("csMethodFoundButIsStatic",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The type '%s' has a method '%s' (full name '%s'), but the method is not static - /// (Originally from ../FSComp.txt:310) + /// (Originally from ..\FSComp.txt:310) static member csMethodFoundButIsNotStatic(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("csMethodFoundButIsNotStatic",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The constraints 'struct' and 'not struct' are inconsistent - /// (Originally from ../FSComp.txt:311) + /// (Originally from ..\FSComp.txt:311) static member csStructConstraintInconsistent() = (472, GetStringFunc("csStructConstraintInconsistent",",,,") ) /// The type '%s' does not have 'null' as a proper value - /// (Originally from ../FSComp.txt:312) + /// (Originally from ..\FSComp.txt:312) static member csTypeDoesNotHaveNull(a0 : System.String) = (GetStringFunc("csTypeDoesNotHaveNull",",,,%s,,,") a0) /// The type '%s' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. - /// (Originally from ../FSComp.txt:313) + /// (Originally from ..\FSComp.txt:313) static member csNullableTypeDoesNotHaveNull(a0 : System.String) = (GetStringFunc("csNullableTypeDoesNotHaveNull",",,,%s,,,") a0) /// The type '%s' does not support the 'comparison' constraint because it has the 'NoComparison' attribute - /// (Originally from ../FSComp.txt:314) + /// (Originally from ..\FSComp.txt:314) static member csTypeDoesNotSupportComparison1(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportComparison1",",,,%s,,,") a0) /// The type '%s' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface - /// (Originally from ../FSComp.txt:315) + /// (Originally from ..\FSComp.txt:315) static member csTypeDoesNotSupportComparison2(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportComparison2",",,,%s,,,") a0) /// The type '%s' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison - /// (Originally from ../FSComp.txt:316) + /// (Originally from ..\FSComp.txt:316) static member csTypeDoesNotSupportComparison3(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportComparison3",",,,%s,,,") a0) /// The type '%s' does not support the 'equality' constraint because it has the 'NoEquality' attribute - /// (Originally from ../FSComp.txt:317) + /// (Originally from ..\FSComp.txt:317) static member csTypeDoesNotSupportEquality1(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportEquality1",",,,%s,,,") a0) /// The type '%s' does not support the 'equality' constraint because it is a function type - /// (Originally from ../FSComp.txt:318) + /// (Originally from ..\FSComp.txt:318) static member csTypeDoesNotSupportEquality2(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportEquality2",",,,%s,,,") a0) /// The type '%s' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality - /// (Originally from ../FSComp.txt:319) + /// (Originally from ..\FSComp.txt:319) static member csTypeDoesNotSupportEquality3(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportEquality3",",,,%s,,,") a0) /// The type '%s' is not a CLI enum type - /// (Originally from ../FSComp.txt:320) + /// (Originally from ..\FSComp.txt:320) static member csTypeIsNotEnumType(a0 : System.String) = (GetStringFunc("csTypeIsNotEnumType",",,,%s,,,") a0) /// The type '%s' has a non-standard delegate type - /// (Originally from ../FSComp.txt:321) + /// (Originally from ..\FSComp.txt:321) static member csTypeHasNonStandardDelegateType(a0 : System.String) = (GetStringFunc("csTypeHasNonStandardDelegateType",",,,%s,,,") a0) /// The type '%s' is not a CLI delegate type - /// (Originally from ../FSComp.txt:322) + /// (Originally from ..\FSComp.txt:322) static member csTypeIsNotDelegateType(a0 : System.String) = (GetStringFunc("csTypeIsNotDelegateType",",,,%s,,,") a0) /// This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. - /// (Originally from ../FSComp.txt:323) + /// (Originally from ..\FSComp.txt:323) static member csTypeParameterCannotBeNullable() = (GetStringFunc("csTypeParameterCannotBeNullable",",,,") ) /// A generic construct requires that the type '%s' is a CLI or F# struct type - /// (Originally from ../FSComp.txt:324) + /// (Originally from ..\FSComp.txt:324) static member csGenericConstructRequiresStructType(a0 : System.String) = (GetStringFunc("csGenericConstructRequiresStructType",",,,%s,,,") a0) /// A generic construct requires that the type '%s' is an unmanaged type - /// (Originally from ../FSComp.txt:325) + /// (Originally from ..\FSComp.txt:325) static member csGenericConstructRequiresUnmanagedType(a0 : System.String) = (GetStringFunc("csGenericConstructRequiresUnmanagedType",",,,%s,,,") a0) /// The type '%s' is not compatible with any of the types %s, arising from the use of a printf-style format string - /// (Originally from ../FSComp.txt:326) + /// (Originally from ..\FSComp.txt:326) static member csTypeNotCompatibleBecauseOfPrintf(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypeNotCompatibleBecauseOfPrintf",",,,%s,,,%s,,,") a0 a1) /// A generic construct requires that the type '%s' have reference semantics, but it does not, i.e. it is a struct - /// (Originally from ../FSComp.txt:327) + /// (Originally from ..\FSComp.txt:327) static member csGenericConstructRequiresReferenceSemantics(a0 : System.String) = (GetStringFunc("csGenericConstructRequiresReferenceSemantics",",,,%s,,,") a0) /// A generic construct requires that the type '%s' be non-abstract - /// (Originally from ../FSComp.txt:328) + /// (Originally from ..\FSComp.txt:328) static member csGenericConstructRequiresNonAbstract(a0 : System.String) = (GetStringFunc("csGenericConstructRequiresNonAbstract",",,,%s,,,") a0) /// A generic construct requires that the type '%s' have a public default constructor - /// (Originally from ../FSComp.txt:329) + /// (Originally from ..\FSComp.txt:329) static member csGenericConstructRequiresPublicDefaultConstructor(a0 : System.String) = (GetStringFunc("csGenericConstructRequiresPublicDefaultConstructor",",,,%s,,,") a0) /// Type instantiation length mismatch - /// (Originally from ../FSComp.txt:330) + /// (Originally from ..\FSComp.txt:330) static member csTypeInstantiationLengthMismatch() = (483, GetStringFunc("csTypeInstantiationLengthMismatch",",,,") ) /// Optional arguments not permitted here - /// (Originally from ../FSComp.txt:331) + /// (Originally from ..\FSComp.txt:331) static member csOptionalArgumentNotPermittedHere() = (484, GetStringFunc("csOptionalArgumentNotPermittedHere",",,,") ) /// %s is not a static member - /// (Originally from ../FSComp.txt:332) + /// (Originally from ..\FSComp.txt:332) static member csMemberIsNotStatic(a0 : System.String) = (485, GetStringFunc("csMemberIsNotStatic",",,,%s,,,") a0) /// %s is not an instance member - /// (Originally from ../FSComp.txt:333) + /// (Originally from ..\FSComp.txt:333) static member csMemberIsNotInstance(a0 : System.String) = (486, GetStringFunc("csMemberIsNotInstance",",,,%s,,,") a0) /// Argument length mismatch - /// (Originally from ../FSComp.txt:334) + /// (Originally from ..\FSComp.txt:334) static member csArgumentLengthMismatch() = (487, GetStringFunc("csArgumentLengthMismatch",",,,") ) /// The argument types don't match - /// (Originally from ../FSComp.txt:335) + /// (Originally from ..\FSComp.txt:335) static member csArgumentTypesDoNotMatch() = (488, GetStringFunc("csArgumentTypesDoNotMatch",",,,") ) /// This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument - /// (Originally from ../FSComp.txt:336) + /// (Originally from ..\FSComp.txt:336) static member csMethodExpectsParams() = (489, GetStringFunc("csMethodExpectsParams",",,,") ) /// The member or object constructor '%s' is not %s - /// (Originally from ../FSComp.txt:337) + /// (Originally from ..\FSComp.txt:337) static member csMemberIsNotAccessible(a0 : System.String, a1 : System.String) = (490, GetStringFunc("csMemberIsNotAccessible",",,,%s,,,%s,,,") a0 a1) /// The member or object constructor '%s' is not %s. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. - /// (Originally from ../FSComp.txt:338) + /// (Originally from ..\FSComp.txt:338) static member csMemberIsNotAccessible2(a0 : System.String, a1 : System.String) = (491, GetStringFunc("csMemberIsNotAccessible2",",,,%s,,,%s,,,") a0 a1) /// %s is not a static method - /// (Originally from ../FSComp.txt:339) + /// (Originally from ..\FSComp.txt:339) static member csMethodIsNotAStaticMethod(a0 : System.String) = (492, GetStringFunc("csMethodIsNotAStaticMethod",",,,%s,,,") a0) /// %s is not an instance method - /// (Originally from ../FSComp.txt:340) + /// (Originally from ..\FSComp.txt:340) static member csMethodIsNotAnInstanceMethod(a0 : System.String) = (493, GetStringFunc("csMethodIsNotAnInstanceMethod",",,,%s,,,") a0) /// The member or object constructor '%s' has no argument or settable return property '%s'. %s. - /// (Originally from ../FSComp.txt:341) + /// (Originally from ..\FSComp.txt:341) static member csMemberHasNoArgumentOrReturnProperty(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("csMemberHasNoArgumentOrReturnProperty",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The object constructor '%s' has no argument or settable return property '%s'. %s. - /// (Originally from ../FSComp.txt:342) + /// (Originally from ..\FSComp.txt:342) static member csCtorHasNoArgumentOrReturnProperty(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("csCtorHasNoArgumentOrReturnProperty",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The required signature is %s - /// (Originally from ../FSComp.txt:343) + /// (Originally from ..\FSComp.txt:343) static member csRequiredSignatureIs(a0 : System.String) = (495, GetStringFunc("csRequiredSignatureIs",",,,%s,,,") a0) /// The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. - /// (Originally from ../FSComp.txt:344) + /// (Originally from ..\FSComp.txt:344) static member csMemberSignatureMismatch(a0 : System.String, a1 : System.Int32, a2 : System.String) = (496, GetStringFunc("csMemberSignatureMismatch",",,,%s,,,%d,,,%s,,,") a0 a1 a2) /// The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. - /// (Originally from ../FSComp.txt:345) + /// (Originally from ..\FSComp.txt:345) static member csMemberSignatureMismatch2(a0 : System.String, a1 : System.Int32, a2 : System.String) = (497, GetStringFunc("csMemberSignatureMismatch2",",,,%s,,,%d,,,%s,,,") a0 a1 a2) /// The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. Some names for missing arguments are %s. - /// (Originally from ../FSComp.txt:346) + /// (Originally from ..\FSComp.txt:346) static member csMemberSignatureMismatch3(a0 : System.String, a1 : System.Int32, a2 : System.String, a3 : System.String) = (498, GetStringFunc("csMemberSignatureMismatch3",",,,%s,,,%d,,,%s,,,%s,,,") a0 a1 a2 a3) /// The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. Some names for missing arguments are %s. - /// (Originally from ../FSComp.txt:347) + /// (Originally from ..\FSComp.txt:347) static member csMemberSignatureMismatch4(a0 : System.String, a1 : System.Int32, a2 : System.String, a3 : System.String) = (499, GetStringFunc("csMemberSignatureMismatch4",",,,%s,,,%d,,,%s,,,%s,,,") a0 a1 a2 a3) /// The member or object constructor '%s' requires %d argument(s) but is here given %d unnamed and %d named argument(s). The required signature is '%s'. - /// (Originally from ../FSComp.txt:348) + /// (Originally from ..\FSComp.txt:348) static member csMemberSignatureMismatchArityNamed(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.Int32, a4 : System.String) = (500, GetStringFunc("csMemberSignatureMismatchArityNamed",",,,%s,,,%d,,,%d,,,%d,,,%s,,,") a0 a1 a2 a3 a4) /// The member or object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - /// (Originally from ../FSComp.txt:349) + /// (Originally from ..\FSComp.txt:349) static member csMemberSignatureMismatchArity(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (501, GetStringFunc("csMemberSignatureMismatchArity",",,,%s,,,%d,,,%d,,,%s,,,") a0 a1 a2 a3) /// The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - /// (Originally from ../FSComp.txt:350) + /// (Originally from ..\FSComp.txt:350) static member csCtorSignatureMismatchArity(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (501, GetStringFunc("csCtorSignatureMismatchArity",",,,%s,,,%d,,,%d,,,%s,,,") a0 a1 a2 a3) /// The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). - /// (Originally from ../FSComp.txt:351) + /// (Originally from ..\FSComp.txt:351) static member csCtorSignatureMismatchArityProp(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (501, GetStringFunc("csCtorSignatureMismatchArityProp",",,,%s,,,%d,,,%d,,,%s,,,") a0 a1 a2 a3) /// The member or object constructor '%s' takes %d type argument(s) but is here given %d. The required signature is '%s'. - /// (Originally from ../FSComp.txt:352) + /// (Originally from ..\FSComp.txt:352) static member csMemberSignatureMismatchArityType(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (502, GetStringFunc("csMemberSignatureMismatchArityType",",,,%s,,,%d,,,%d,,,%s,,,") a0 a1 a2 a3) /// A member or object constructor '%s' taking %d arguments is not accessible from this code location. All accessible versions of method '%s' take %d arguments. - /// (Originally from ../FSComp.txt:353) + /// (Originally from ..\FSComp.txt:353) static member csMemberNotAccessible(a0 : System.String, a1 : System.Int32, a2 : System.String, a3 : System.Int32) = (503, GetStringFunc("csMemberNotAccessible",",,,%s,,,%d,,,%s,,,%d,,,") a0 a1 a2 a3) /// Incorrect generic instantiation. No %s member named '%s' takes %d generic arguments. - /// (Originally from ../FSComp.txt:354) + /// (Originally from ..\FSComp.txt:354) static member csIncorrectGenericInstantiation(a0 : System.String, a1 : System.String, a2 : System.Int32) = (504, GetStringFunc("csIncorrectGenericInstantiation",",,,%s,,,%s,,,%d,,,") a0 a1 a2) /// The member or object constructor '%s' does not take %d argument(s). An overload was found taking %d arguments. - /// (Originally from ../FSComp.txt:355) + /// (Originally from ..\FSComp.txt:355) static member csMemberOverloadArityMismatch(a0 : System.String, a1 : System.Int32, a2 : System.Int32) = (505, GetStringFunc("csMemberOverloadArityMismatch",",,,%s,,,%d,,,%d,,,") a0 a1 a2) /// No %s member or object constructor named '%s' takes %d arguments - /// (Originally from ../FSComp.txt:356) + /// (Originally from ..\FSComp.txt:356) static member csNoMemberTakesTheseArguments(a0 : System.String, a1 : System.String, a2 : System.Int32) = (506, GetStringFunc("csNoMemberTakesTheseArguments",",,,%s,,,%s,,,%d,,,") a0 a1 a2) /// No %s member or object constructor named '%s' takes %d arguments. Note the call to this member also provides %d named arguments. - /// (Originally from ../FSComp.txt:357) + /// (Originally from ..\FSComp.txt:357) static member csNoMemberTakesTheseArguments2(a0 : System.String, a1 : System.String, a2 : System.Int32, a3 : System.Int32) = (507, GetStringFunc("csNoMemberTakesTheseArguments2",",,,%s,,,%s,,,%d,,,%d,,,") a0 a1 a2 a3) /// No %s member or object constructor named '%s' takes %d arguments. The named argument '%s' doesn't correspond to any argument or settable return property for any overload. - /// (Originally from ../FSComp.txt:358) + /// (Originally from ..\FSComp.txt:358) static member csNoMemberTakesTheseArguments3(a0 : System.String, a1 : System.String, a2 : System.Int32, a3 : System.String) = (508, GetStringFunc("csNoMemberTakesTheseArguments3",",,,%s,,,%s,,,%d,,,%s,,,") a0 a1 a2 a3) /// Method or object constructor '%s' not found - /// (Originally from ../FSComp.txt:359) + /// (Originally from ..\FSComp.txt:359) static member csMethodNotFound(a0 : System.String) = (509, GetStringFunc("csMethodNotFound",",,,%s,,,") a0) /// No overloads match for method '%s'. - /// (Originally from ../FSComp.txt:360) + /// (Originally from ..\FSComp.txt:360) static member csNoOverloadsFound(a0 : System.String) = (GetStringFunc("csNoOverloadsFound",",,,%s,,,") a0) /// A unique overload for method '%s' could not be determined based on type information prior to this program point. A type annotation may be needed. - /// (Originally from ../FSComp.txt:361) + /// (Originally from ..\FSComp.txt:361) static member csMethodIsOverloaded(a0 : System.String) = (GetStringFunc("csMethodIsOverloaded",",,,%s,,,") a0) /// Candidates: %s - /// (Originally from ../FSComp.txt:362) + /// (Originally from ..\FSComp.txt:362) static member csCandidates(a0 : System.String) = (GetStringFunc("csCandidates",",,,%s,,,") a0) /// The available overloads are shown below. - /// (Originally from ../FSComp.txt:363) + /// (Originally from ..\FSComp.txt:363) static member csSeeAvailableOverloads() = (GetStringFunc("csSeeAvailableOverloads",",,,") ) /// Accessibility modifiers are not permitted on 'do' bindings, but '%s' was given. - /// (Originally from ../FSComp.txt:364) + /// (Originally from ..\FSComp.txt:364) static member parsDoCannotHaveVisibilityDeclarations(a0 : System.String) = (512, GetStringFunc("parsDoCannotHaveVisibilityDeclarations",",,,%s,,,") a0) /// End of file in #if section begun at or after here - /// (Originally from ../FSComp.txt:365) + /// (Originally from ..\FSComp.txt:365) static member parsEofInHashIf() = (513, GetStringFunc("parsEofInHashIf",",,,") ) /// End of file in string begun at or before here - /// (Originally from ../FSComp.txt:366) + /// (Originally from ..\FSComp.txt:366) static member parsEofInString() = (514, GetStringFunc("parsEofInString",",,,") ) /// End of file in verbatim string begun at or before here - /// (Originally from ../FSComp.txt:367) + /// (Originally from ..\FSComp.txt:367) static member parsEofInVerbatimString() = (515, GetStringFunc("parsEofInVerbatimString",",,,") ) /// End of file in comment begun at or before here - /// (Originally from ../FSComp.txt:368) + /// (Originally from ..\FSComp.txt:368) static member parsEofInComment() = (516, GetStringFunc("parsEofInComment",",,,") ) /// End of file in string embedded in comment begun at or before here - /// (Originally from ../FSComp.txt:369) + /// (Originally from ..\FSComp.txt:369) static member parsEofInStringInComment() = (517, GetStringFunc("parsEofInStringInComment",",,,") ) /// End of file in verbatim string embedded in comment begun at or before here - /// (Originally from ../FSComp.txt:370) + /// (Originally from ..\FSComp.txt:370) static member parsEofInVerbatimStringInComment() = (518, GetStringFunc("parsEofInVerbatimStringInComment",",,,") ) /// End of file in IF-OCAML section begun at or before here - /// (Originally from ../FSComp.txt:371) + /// (Originally from ..\FSComp.txt:371) static member parsEofInIfOcaml() = (519, GetStringFunc("parsEofInIfOcaml",",,,") ) /// End of file in directive begun at or before here - /// (Originally from ../FSComp.txt:372) + /// (Originally from ..\FSComp.txt:372) static member parsEofInDirective() = (520, GetStringFunc("parsEofInDirective",",,,") ) /// No #endif found for #if or #else - /// (Originally from ../FSComp.txt:373) + /// (Originally from ..\FSComp.txt:373) static member parsNoHashEndIfFound() = (521, GetStringFunc("parsNoHashEndIfFound",",,,") ) /// Attributes have been ignored in this construct - /// (Originally from ../FSComp.txt:374) + /// (Originally from ..\FSComp.txt:374) static member parsAttributesIgnored() = (522, GetStringFunc("parsAttributesIgnored",",,,") ) /// 'use' bindings are not permitted in primary constructors - /// (Originally from ../FSComp.txt:375) + /// (Originally from ..\FSComp.txt:375) static member parsUseBindingsIllegalInImplicitClassConstructors() = (523, GetStringFunc("parsUseBindingsIllegalInImplicitClassConstructors",",,,") ) /// 'use' bindings are not permitted in modules and are treated as 'let' bindings - /// (Originally from ../FSComp.txt:376) + /// (Originally from ..\FSComp.txt:376) static member parsUseBindingsIllegalInModules() = (524, GetStringFunc("parsUseBindingsIllegalInModules",",,,") ) /// An integer for loop must use a simple identifier - /// (Originally from ../FSComp.txt:377) + /// (Originally from ..\FSComp.txt:377) static member parsIntegerForLoopRequiresSimpleIdentifier() = (525, GetStringFunc("parsIntegerForLoopRequiresSimpleIdentifier",",,,") ) /// At most one 'with' augmentation is permitted - /// (Originally from ../FSComp.txt:378) + /// (Originally from ..\FSComp.txt:378) static member parsOnlyOneWithAugmentationAllowed() = (526, GetStringFunc("parsOnlyOneWithAugmentationAllowed",",,,") ) /// A semicolon is not expected at this point - /// (Originally from ../FSComp.txt:379) + /// (Originally from ..\FSComp.txt:379) static member parsUnexpectedSemicolon() = (527, GetStringFunc("parsUnexpectedSemicolon",",,,") ) /// Unexpected end of input - /// (Originally from ../FSComp.txt:380) + /// (Originally from ..\FSComp.txt:380) static member parsUnexpectedEndOfFile() = (528, GetStringFunc("parsUnexpectedEndOfFile",",,,") ) /// Accessibility modifiers are not permitted here, but '%s' was given. - /// (Originally from ../FSComp.txt:381) + /// (Originally from ..\FSComp.txt:381) static member parsUnexpectedVisibilityDeclaration(a0 : System.String) = (529, GetStringFunc("parsUnexpectedVisibilityDeclaration",",,,%s,,,") a0) /// Only '#' compiler directives may occur prior to the first 'namespace' declaration - /// (Originally from ../FSComp.txt:382) + /// (Originally from ..\FSComp.txt:382) static member parsOnlyHashDirectivesAllowed() = (530, GetStringFunc("parsOnlyHashDirectivesAllowed",",,,") ) /// Accessibility modifiers should come immediately prior to the identifier naming a construct - /// (Originally from ../FSComp.txt:383) + /// (Originally from ..\FSComp.txt:383) static member parsVisibilityDeclarationsShouldComePriorToIdentifier() = (531, GetStringFunc("parsVisibilityDeclarationsShouldComePriorToIdentifier",",,,") ) /// Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' - /// (Originally from ../FSComp.txt:384) + /// (Originally from ..\FSComp.txt:384) static member parsNamespaceOrModuleNotBoth() = (532, GetStringFunc("parsNamespaceOrModuleNotBoth",",,,") ) /// A module abbreviation must be a simple name, not a path - /// (Originally from ../FSComp.txt:385) + /// (Originally from ..\FSComp.txt:385) static member parsModuleAbbreviationMustBeSimpleName() = (534, GetStringFunc("parsModuleAbbreviationMustBeSimpleName",",,,") ) /// Ignoring attributes on module abbreviation - /// (Originally from ../FSComp.txt:386) + /// (Originally from ..\FSComp.txt:386) static member parsIgnoreAttributesOnModuleAbbreviation() = (535, GetStringFunc("parsIgnoreAttributesOnModuleAbbreviation",",,,") ) /// The '%s' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - /// (Originally from ../FSComp.txt:387) + /// (Originally from ..\FSComp.txt:387) static member parsIgnoreAttributesOnModuleAbbreviationAlwaysPrivate(a0 : System.String) = (536, GetStringFunc("parsIgnoreAttributesOnModuleAbbreviationAlwaysPrivate",",,,%s,,,") a0) /// The '%s' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - /// (Originally from ../FSComp.txt:388) + /// (Originally from ..\FSComp.txt:388) static member parsIgnoreVisibilityOnModuleAbbreviationAlwaysPrivate(a0 : System.String) = (537, GetStringFunc("parsIgnoreVisibilityOnModuleAbbreviationAlwaysPrivate",",,,%s,,,") a0) /// Unclosed block - /// (Originally from ../FSComp.txt:389) + /// (Originally from ..\FSComp.txt:389) static member parsUnClosedBlockInHashLight() = (538, GetStringFunc("parsUnClosedBlockInHashLight",",,,") ) /// Unmatched 'begin' or 'struct' - /// (Originally from ../FSComp.txt:390) + /// (Originally from ..\FSComp.txt:390) static member parsUnmatchedBeginOrStruct() = (539, GetStringFunc("parsUnmatchedBeginOrStruct",",,,") ) /// A module name must be a simple name, not a path - /// (Originally from ../FSComp.txt:391) + /// (Originally from ..\FSComp.txt:391) static member parsModuleDefnMustBeSimpleName() = (541, GetStringFunc("parsModuleDefnMustBeSimpleName",",,,") ) /// Unexpected empty type moduleDefn list - /// (Originally from ../FSComp.txt:392) + /// (Originally from ..\FSComp.txt:392) static member parsUnexpectedEmptyModuleDefn() = (542, GetStringFunc("parsUnexpectedEmptyModuleDefn",",,,") ) /// Attributes should be placed before 'val' - /// (Originally from ../FSComp.txt:393) + /// (Originally from ..\FSComp.txt:393) static member parsAttributesMustComeBeforeVal() = (GetStringFunc("parsAttributesMustComeBeforeVal",",,,") ) /// Attributes are not permitted on interface implementations - /// (Originally from ../FSComp.txt:394) + /// (Originally from ..\FSComp.txt:394) static member parsAttributesAreNotPermittedOnInterfaceImplementations() = (543, GetStringFunc("parsAttributesAreNotPermittedOnInterfaceImplementations",",,,") ) /// Syntax error - /// (Originally from ../FSComp.txt:395) + /// (Originally from ..\FSComp.txt:395) static member parsSyntaxError() = (544, GetStringFunc("parsSyntaxError",",,,") ) /// Augmentations are not permitted on delegate type moduleDefns - /// (Originally from ../FSComp.txt:396) + /// (Originally from ..\FSComp.txt:396) static member parsAugmentationsIllegalOnDelegateType() = (545, GetStringFunc("parsAugmentationsIllegalOnDelegateType",",,,") ) /// Unmatched 'class', 'interface' or 'struct' - /// (Originally from ../FSComp.txt:397) + /// (Originally from ..\FSComp.txt:397) static member parsUnmatchedClassInterfaceOrStruct() = (546, GetStringFunc("parsUnmatchedClassInterfaceOrStruct",",,,") ) /// A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. - /// (Originally from ../FSComp.txt:398) + /// (Originally from ..\FSComp.txt:398) static member parsEmptyTypeDefinition() = (547, GetStringFunc("parsEmptyTypeDefinition",",,,") ) /// Unmatched 'with' or badly formatted 'with' block - /// (Originally from ../FSComp.txt:399) + /// (Originally from ..\FSComp.txt:399) static member parsUnmatchedWith() = (550, GetStringFunc("parsUnmatchedWith",",,,") ) /// 'get', 'set' or 'get,set' required - /// (Originally from ../FSComp.txt:400) + /// (Originally from ..\FSComp.txt:400) static member parsGetOrSetRequired() = (551, GetStringFunc("parsGetOrSetRequired",",,,") ) /// Only class types may take value arguments - /// (Originally from ../FSComp.txt:401) + /// (Originally from ..\FSComp.txt:401) static member parsOnlyClassCanTakeValueArguments() = (552, GetStringFunc("parsOnlyClassCanTakeValueArguments",",,,") ) /// Unmatched 'begin' - /// (Originally from ../FSComp.txt:402) + /// (Originally from ..\FSComp.txt:402) static member parsUnmatchedBegin() = (553, GetStringFunc("parsUnmatchedBegin",",,,") ) /// Invalid declaration syntax - /// (Originally from ../FSComp.txt:403) + /// (Originally from ..\FSComp.txt:403) static member parsInvalidDeclarationSyntax() = (554, GetStringFunc("parsInvalidDeclarationSyntax",",,,") ) /// 'get' and/or 'set' required - /// (Originally from ../FSComp.txt:404) + /// (Originally from ..\FSComp.txt:404) static member parsGetAndOrSetRequired() = (555, GetStringFunc("parsGetAndOrSetRequired",",,,") ) /// Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' - /// (Originally from ../FSComp.txt:405) + /// (Originally from ..\FSComp.txt:405) static member parsTypeAnnotationsOnGetSet() = (556, GetStringFunc("parsTypeAnnotationsOnGetSet",",,,") ) /// A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' - /// (Originally from ../FSComp.txt:406) + /// (Originally from ..\FSComp.txt:406) static member parsGetterMustHaveAtLeastOneArgument() = (557, GetStringFunc("parsGetterMustHaveAtLeastOneArgument",",,,") ) /// Multiple accessibilities given for property getter or setter - /// (Originally from ../FSComp.txt:407) + /// (Originally from ..\FSComp.txt:407) static member parsMultipleAccessibilitiesForGetSet() = (558, GetStringFunc("parsMultipleAccessibilitiesForGetSet",",,,") ) /// Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' - /// (Originally from ../FSComp.txt:408) + /// (Originally from ..\FSComp.txt:408) static member parsSetSyntax() = (559, GetStringFunc("parsSetSyntax",",,,") ) /// Interfaces always have the same visibility as the enclosing type - /// (Originally from ../FSComp.txt:409) + /// (Originally from ..\FSComp.txt:409) static member parsInterfacesHaveSameVisibilityAsEnclosingType() = (560, GetStringFunc("parsInterfacesHaveSameVisibilityAsEnclosingType",",,,") ) /// Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. - /// (Originally from ../FSComp.txt:410) + /// (Originally from ..\FSComp.txt:410) static member parsAccessibilityModsIllegalForAbstract() = (561, GetStringFunc("parsAccessibilityModsIllegalForAbstract",",,,") ) /// Attributes are not permitted on 'inherit' declarations - /// (Originally from ../FSComp.txt:411) + /// (Originally from ..\FSComp.txt:411) static member parsAttributesIllegalOnInherit() = (562, GetStringFunc("parsAttributesIllegalOnInherit",",,,") ) /// Accessibility modifiers are not permitted on an 'inherits' declaration - /// (Originally from ../FSComp.txt:412) + /// (Originally from ..\FSComp.txt:412) static member parsVisibilityIllegalOnInherit() = (563, GetStringFunc("parsVisibilityIllegalOnInherit",",,,") ) /// 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. - /// (Originally from ../FSComp.txt:413) + /// (Originally from ..\FSComp.txt:413) static member parsInheritDeclarationsCannotHaveAsBindings() = (564, GetStringFunc("parsInheritDeclarationsCannotHaveAsBindings",",,,") ) /// Attributes are not allowed here - /// (Originally from ../FSComp.txt:414) + /// (Originally from ..\FSComp.txt:414) static member parsAttributesIllegalHere() = (565, GetStringFunc("parsAttributesIllegalHere",",,,") ) /// Accessibility modifiers are not permitted in this position for type abbreviations - /// (Originally from ../FSComp.txt:415) + /// (Originally from ..\FSComp.txt:415) static member parsTypeAbbreviationsCannotHaveVisibilityDeclarations() = (566, GetStringFunc("parsTypeAbbreviationsCannotHaveVisibilityDeclarations",",,,") ) /// Accessibility modifiers are not permitted in this position for enum types - /// (Originally from ../FSComp.txt:416) + /// (Originally from ..\FSComp.txt:416) static member parsEnumTypesCannotHaveVisibilityDeclarations() = (567, GetStringFunc("parsEnumTypesCannotHaveVisibilityDeclarations",",,,") ) /// All enum fields must be given values - /// (Originally from ../FSComp.txt:417) + /// (Originally from ..\FSComp.txt:417) static member parsAllEnumFieldsRequireValues() = (568, GetStringFunc("parsAllEnumFieldsRequireValues",",,,") ) /// Accessibility modifiers are not permitted on inline assembly code types - /// (Originally from ../FSComp.txt:418) + /// (Originally from ..\FSComp.txt:418) static member parsInlineAssemblyCannotHaveVisibilityDeclarations() = (569, GetStringFunc("parsInlineAssemblyCannotHaveVisibilityDeclarations",",,,") ) /// Unexpected identifier: '%s' - /// (Originally from ../FSComp.txt:419) + /// (Originally from ..\FSComp.txt:419) static member parsUnexpectedIdentifier(a0 : System.String) = (571, GetStringFunc("parsUnexpectedIdentifier",",,,%s,,,") a0) /// Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. - /// (Originally from ../FSComp.txt:420) + /// (Originally from ..\FSComp.txt:420) static member parsUnionCasesCannotHaveVisibilityDeclarations() = (572, GetStringFunc("parsUnionCasesCannotHaveVisibilityDeclarations",",,,") ) /// Accessibility modifiers are not permitted on enumeration fields - /// (Originally from ../FSComp.txt:421) + /// (Originally from ..\FSComp.txt:421) static member parsEnumFieldsCannotHaveVisibilityDeclarations() = (573, GetStringFunc("parsEnumFieldsCannotHaveVisibilityDeclarations",",,,") ) /// Consider using a separate record type instead - /// (Originally from ../FSComp.txt:422) + /// (Originally from ..\FSComp.txt:422) static member parsConsiderUsingSeparateRecordType() = (GetStringFunc("parsConsiderUsingSeparateRecordType",",,,") ) /// Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. - /// (Originally from ../FSComp.txt:423) + /// (Originally from ..\FSComp.txt:423) static member parsRecordFieldsCannotHaveVisibilityDeclarations() = (575, GetStringFunc("parsRecordFieldsCannotHaveVisibilityDeclarations",",,,") ) /// The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings - /// (Originally from ../FSComp.txt:424) + /// (Originally from ..\FSComp.txt:424) static member parsLetAndForNonRecBindings() = (576, GetStringFunc("parsLetAndForNonRecBindings",",,,") ) /// Unmatched '(' - /// (Originally from ../FSComp.txt:425) + /// (Originally from ..\FSComp.txt:425) static member parsUnmatchedParen() = (583, GetStringFunc("parsUnmatchedParen",",,,") ) /// Successive patterns should be separated by spaces or tupled - /// (Originally from ../FSComp.txt:426) + /// (Originally from ..\FSComp.txt:426) static member parsSuccessivePatternsShouldBeSpacedOrTupled() = (584, GetStringFunc("parsSuccessivePatternsShouldBeSpacedOrTupled",",,,") ) /// No matching 'in' found for this 'let' - /// (Originally from ../FSComp.txt:427) + /// (Originally from ..\FSComp.txt:427) static member parsNoMatchingInForLet() = (586, GetStringFunc("parsNoMatchingInForLet",",,,") ) /// Error in the return expression for this 'let'. Possible incorrect indentation. - /// (Originally from ../FSComp.txt:428) + /// (Originally from ..\FSComp.txt:428) static member parsErrorInReturnForLetIncorrectIndentation() = (587, GetStringFunc("parsErrorInReturnForLetIncorrectIndentation",",,,") ) /// The block following this '%s' is unfinished. Every code block is an expression and must have a result. '%s' cannot be the final code element in a block. Consider giving this block an explicit result. - /// (Originally from ../FSComp.txt:429) + /// (Originally from ..\FSComp.txt:429) static member parsExpectedExpressionAfterLet(a0 : System.String, a1 : System.String) = (588, GetStringFunc("parsExpectedExpressionAfterLet",",,,%s,,,%s,,,") a0 a1) /// Incomplete conditional. Expected 'if then ' or 'if then else '. - /// (Originally from ../FSComp.txt:430) + /// (Originally from ..\FSComp.txt:430) static member parsIncompleteIf() = (589, GetStringFunc("parsIncompleteIf",",,,") ) /// 'assert' may not be used as a first class value. Use 'assert ' instead. - /// (Originally from ../FSComp.txt:431) + /// (Originally from ..\FSComp.txt:431) static member parsAssertIsNotFirstClassValue() = (590, GetStringFunc("parsAssertIsNotFirstClassValue",",,,") ) /// Identifier expected - /// (Originally from ../FSComp.txt:432) + /// (Originally from ..\FSComp.txt:432) static member parsIdentifierExpected() = (594, GetStringFunc("parsIdentifierExpected",",,,") ) /// 'in' or '=' expected - /// (Originally from ../FSComp.txt:433) + /// (Originally from ..\FSComp.txt:433) static member parsInOrEqualExpected() = (595, GetStringFunc("parsInOrEqualExpected",",,,") ) /// The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. - /// (Originally from ../FSComp.txt:434) + /// (Originally from ..\FSComp.txt:434) static member parsArrowUseIsLimited() = (596, GetStringFunc("parsArrowUseIsLimited",",,,") ) /// Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized - /// (Originally from ../FSComp.txt:435) + /// (Originally from ..\FSComp.txt:435) static member parsSuccessiveArgsShouldBeSpacedOrTupled() = (597, GetStringFunc("parsSuccessiveArgsShouldBeSpacedOrTupled",",,,") ) /// Unmatched '[' - /// (Originally from ../FSComp.txt:436) + /// (Originally from ..\FSComp.txt:436) static member parsUnmatchedBracket() = (598, GetStringFunc("parsUnmatchedBracket",",,,") ) /// Missing qualification after '.' - /// (Originally from ../FSComp.txt:437) + /// (Originally from ..\FSComp.txt:437) static member parsMissingQualificationAfterDot() = (599, GetStringFunc("parsMissingQualificationAfterDot",",,,") ) /// In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array - /// (Originally from ../FSComp.txt:438) + /// (Originally from ..\FSComp.txt:438) static member parsParenFormIsForML() = (GetStringFunc("parsParenFormIsForML",",,,") ) /// Mismatched quotation, beginning with '%s' - /// (Originally from ../FSComp.txt:439) + /// (Originally from ..\FSComp.txt:439) static member parsMismatchedQuote(a0 : System.String) = (601, GetStringFunc("parsMismatchedQuote",",,,%s,,,") a0) /// Unmatched '%s' - /// (Originally from ../FSComp.txt:440) + /// (Originally from ..\FSComp.txt:440) static member parsUnmatched(a0 : System.String) = (602, GetStringFunc("parsUnmatched",",,,%s,,,") a0) /// Unmatched '[|' - /// (Originally from ../FSComp.txt:441) + /// (Originally from ..\FSComp.txt:441) static member parsUnmatchedBracketBar() = (603, GetStringFunc("parsUnmatchedBracketBar",",,,") ) /// Unmatched '{' - /// (Originally from ../FSComp.txt:442) + /// (Originally from ..\FSComp.txt:442) static member parsUnmatchedBrace() = (604, GetStringFunc("parsUnmatchedBrace",",,,") ) + /// Unmatched '{|' + /// (Originally from ..\FSComp.txt:443) + static member parsUnmatchedBraceBar() = (605, GetStringFunc("parsUnmatchedBraceBar",",,,") ) /// Field bindings must have the form 'id = expr;' - /// (Originally from ../FSComp.txt:443) + /// (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",",,,") ) /// Type parameters must be placed directly adjacent to the type name, e.g. \"type C<'T>\", not type \"C <'T>\" - /// (Originally from ../FSComp.txt:1043) + /// (Originally from ..\FSComp.txt:1045) static member parsNonAdjacentTypars() = (1189, GetStringFunc("parsNonAdjacentTypars",",,,") ) /// Type arguments must be placed directly adjacent to the type name, e.g. \"C<'T>\", not \"C <'T>\" - /// (Originally from ../FSComp.txt: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",",,,") ) - /// An %s specified version '%s', but this value is invalid and has been ignored - /// (Originally from ../FSComp.txt:1116) + /// The attribute %s specified version '%s', but this value is invalid and has been ignored + /// (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) /// Union case/exception '%s' does not have 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) /// Union case/exception field '%s' cannot be used more than once. - /// (Originally from ../FSComp.txt:1297) + /// (Originally from ..\FSComp.txt:1299) static member tcUnionCaseFieldCannotBeUsedMoreThanOnce(a0 : System.String) = (3175, GetStringFunc("tcUnionCaseFieldCannotBeUsedMoreThanOnce",",,,%s,,,") a0) /// Named field '%s' is used more than once. - /// (Originally from ../FSComp.txt:1298) + /// (Originally from ..\FSComp.txt:1300) 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:1299) + /// (Originally from ..\FSComp.txt:1301) 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:1300) + /// (Originally from ..\FSComp.txt:1302) static member tastConstantExpressionOverflow() = (3177, GetStringFunc("tastConstantExpressionOverflow",",,,") ) /// This is not valid literal expression. The [] attribute will be ignored. - /// (Originally from ../FSComp.txt:1301) + /// (Originally from ..\FSComp.txt:1303) static member tcIllegalStructTypeForConstantExpression() = (3178, GetStringFunc("tcIllegalStructTypeForConstantExpression",",,,") ) /// System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. - /// (Originally from ../FSComp.txt:1302) + /// (Originally from ..\FSComp.txt:1304) 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:1303) + /// (Originally from ..\FSComp.txt:1305) 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:1304) + /// (Originally from ..\FSComp.txt:1306) static member estApplyStaticArgumentsForMethodNotImplemented() = (GetStringFunc("estApplyStaticArgumentsForMethodNotImplemented",",,,") ) /// An error occured applying the static arguments to a provided method - /// (Originally from ../FSComp.txt:1305) + /// (Originally from ..\FSComp.txt:1307) static member etErrorApplyingStaticArgumentsToMethod() = (3181, GetStringFunc("etErrorApplyingStaticArgumentsToMethod",",,,") ) /// Unexpected character '%s' in preprocessor expression - /// (Originally from ../FSComp.txt:1306) + /// (Originally from ..\FSComp.txt:1308) static member pplexUnexpectedChar(a0 : System.String) = (3182, GetStringFunc("pplexUnexpectedChar",",,,%s,,,") a0) /// Unexpected token '%s' in preprocessor expression - /// (Originally from ../FSComp.txt:1307) + /// (Originally from ..\FSComp.txt:1309) static member ppparsUnexpectedToken(a0 : System.String) = (3183, GetStringFunc("ppparsUnexpectedToken",",,,%s,,,") a0) /// Incomplete preprocessor expression - /// (Originally from ../FSComp.txt:1308) + /// (Originally from ..\FSComp.txt:1310) static member ppparsIncompleteExpression() = (3184, GetStringFunc("ppparsIncompleteExpression",",,,") ) /// Missing token '%s' in preprocessor expression - /// (Originally from ../FSComp.txt:1309) + /// (Originally from ..\FSComp.txt:1311) 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:1310) + /// (Originally from ..\FSComp.txt:1312) 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:1311) + /// (Originally from ..\FSComp.txt:1313) 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:1312) + /// (Originally from ..\FSComp.txt:1314) static member checkNotSufficientlyGenericBecauseOfScopeAnon() = (3188, GetStringFunc("checkNotSufficientlyGenericBecauseOfScopeAnon",",,,") ) /// Redundant arguments are being ignored in function '%s'. Expected %d but got %d arguments. - /// (Originally from ../FSComp.txt:1313) + /// (Originally from ..\FSComp.txt:1315) 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:1314) + /// (Originally from ..\FSComp.txt:1316) static member checkLowercaseLiteralBindingInPattern(a0 : System.String) = (3190, GetStringFunc("checkLowercaseLiteralBindingInPattern",",,,%s,,,") a0) /// This literal pattern does not take arguments - /// (Originally from ../FSComp.txt:1315) + /// (Originally from ..\FSComp.txt:1317) 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:1316) + /// (Originally from ..\FSComp.txt:1318) static member tcConstructorsIllegalInAugmentation() = (3192, GetStringFunc("tcConstructorsIllegalInAugmentation",",,,") ) /// Invalid response file '%s' ( '%s' ) - /// (Originally from ../FSComp.txt:1317) + /// (Originally from ..\FSComp.txt:1319) 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:1318) + /// (Originally from ..\FSComp.txt:1320) 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:1319) + /// (Originally from ..\FSComp.txt:1321) static member optsResponseFileNameInvalid(a0 : System.String) = (3195, GetStringFunc("optsResponseFileNameInvalid",",,,%s,,,") a0) /// Cannot find FSharp.Core.dll in compiler's directory - /// (Originally from ../FSComp.txt:1320) + /// (Originally from ..\FSComp.txt:1322) static member fsharpCoreNotFoundToBeCopied() = (3196, GetStringFunc("fsharpCoreNotFoundToBeCopied",",,,") ) /// One tuple type is a struct tuple, the other is a reference tuple - /// (Originally from ../FSComp.txt:1321) + /// (Originally from ..\FSComp.txt:1323) static member tcTupleStructMismatch() = (GetStringFunc("tcTupleStructMismatch",",,,") ) /// This provided method requires static parameters - /// (Originally from ../FSComp.txt:1322) + /// (Originally from ..\FSComp.txt:1324) 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:1323) + /// (Originally from ..\FSComp.txt:1325) 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:1324) + /// (Originally from ..\FSComp.txt:1326) 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:1325) + /// (Originally from ..\FSComp.txt:1327) static member tcRecImplied() = (3199, GetStringFunc("tcRecImplied",",,,") ) /// In a recursive declaration group, 'open' declarations must come first in each module - /// (Originally from ../FSComp.txt:1326) + /// (Originally from ..\FSComp.txt:1328) 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:1327) + /// (Originally from ..\FSComp.txt:1329) static member tcModuleAbbrevFirstInMutRec() = (3201, GetStringFunc("tcModuleAbbrevFirstInMutRec",",,,") ) /// This declaration is not supported in recursive declaration groups - /// (Originally from ../FSComp.txt:1328) + /// (Originally from ..\FSComp.txt:1330) static member tcUnsupportedMutRecDecl() = (3202, GetStringFunc("tcUnsupportedMutRecDecl",",,,") ) /// Invalid use of 'rec' keyword - /// (Originally from ../FSComp.txt:1329) + /// (Originally from ..\FSComp.txt:1331) 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:1330) + /// (Originally from ..\FSComp.txt:1332) 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:1331) + /// (Originally from ..\FSComp.txt:1333) 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:1332) + /// (Originally from ..\FSComp.txt:1334) static member tcFixedNotAllowed() = (3207, GetStringFunc("tcFixedNotAllowed",",,,") ) /// Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. - /// (Originally from ../FSComp.txt:1333) + /// (Originally from ..\FSComp.txt:1335) static member tcCouldNotFindOffsetToStringData() = (3208, GetStringFunc("tcCouldNotFindOffsetToStringData",",,,") ) /// The address of the variable '%s' cannot be used at this point. A method or function may not return the address of this local value. - /// (Originally from ../FSComp.txt:1334) + /// (Originally from ..\FSComp.txt:1336) static member chkNoByrefReturnOfLocal(a0 : System.String) = (3209, GetStringFunc("chkNoByrefReturnOfLocal",",,,%s,,,") a0) /// %s is an active pattern and cannot be treated as a discriminated union case with named fields. - /// (Originally from ../FSComp.txt:1335) + /// (Originally from ..\FSComp.txt:1337) 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:1336) + /// (Originally from ..\FSComp.txt:1338) static member DefaultParameterValueNotAppropriateForArgument() = (3211, GetStringFunc("DefaultParameterValueNotAppropriateForArgument",",,,") ) /// The system type '%s' was required but no referenced system DLL contained this type - /// (Originally from ../FSComp.txt:1337) + /// (Originally from ..\FSComp.txt:1339) 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:1338) + /// (Originally from ..\FSComp.txt:1340) 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:1339) + /// (Originally from ..\FSComp.txt:1341) 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:1340) + /// (Originally from ..\FSComp.txt:1342) static member parsUnexpectedSymbolEqualsInsteadOfIn() = (3215, GetStringFunc("parsUnexpectedSymbolEqualsInsteadOfIn",",,,") ) /// Two anonymous record types are from different assemblies '%s' and '%s' /// (Originally from ..\FSComp.txt:1343) @@ -4058,277 +4061,277 @@ type internal SR private() = /// (Originally from ..\FSComp.txt:1344) 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:1341) + /// (Originally from ..\FSComp.txt:1345) static member keywordDescriptionAbstract() = (GetStringFunc("keywordDescriptionAbstract",",,,") ) /// Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. - /// (Originally from ../FSComp.txt:1342) + /// (Originally from ..\FSComp.txt:1346) 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:1343) + /// (Originally from ..\FSComp.txt:1347) static member keywordDescriptionAs() = (GetStringFunc("keywordDescriptionAs",",,,") ) /// Used to verify code during debugging. - /// (Originally from ../FSComp.txt:1344) + /// (Originally from ..\FSComp.txt:1348) static member keywordDescriptionAssert() = (GetStringFunc("keywordDescriptionAssert",",,,") ) /// Used as the name of the base class object. - /// (Originally from ../FSComp.txt:1345) + /// (Originally from ..\FSComp.txt:1349) static member keywordDescriptionBase() = (GetStringFunc("keywordDescriptionBase",",,,") ) /// In verbose syntax, indicates the start of a code block. - /// (Originally from ../FSComp.txt:1346) + /// (Originally from ..\FSComp.txt:1350) static member keywordDescriptionBegin() = (GetStringFunc("keywordDescriptionBegin",",,,") ) /// In verbose syntax, indicates the start of a class definition. - /// (Originally from ../FSComp.txt:1347) + /// (Originally from ..\FSComp.txt:1351) 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:1348) + /// (Originally from ..\FSComp.txt:1352) static member keywordDescriptionDefault() = (GetStringFunc("keywordDescriptionDefault",",,,") ) /// Used to declare a delegate. - /// (Originally from ../FSComp.txt:1349) + /// (Originally from ..\FSComp.txt:1353) static member keywordDescriptionDelegate() = (GetStringFunc("keywordDescriptionDelegate",",,,") ) /// Used in looping constructs or to execute imperative code. - /// (Originally from ../FSComp.txt:1350) + /// (Originally from ..\FSComp.txt:1354) static member keywordDescriptionDo() = (GetStringFunc("keywordDescriptionDo",",,,") ) /// In verbose syntax, indicates the end of a block of code in a looping expression. - /// (Originally from ../FSComp.txt:1351) + /// (Originally from ..\FSComp.txt:1355) static member keywordDescriptionDone() = (GetStringFunc("keywordDescriptionDone",",,,") ) /// Used to convert to a type that is lower in the inheritance chain. - /// (Originally from ../FSComp.txt:1352) + /// (Originally from ..\FSComp.txt:1356) static member keywordDescriptionDowncast() = (GetStringFunc("keywordDescriptionDowncast",",,,") ) /// In a for expression, used when counting in reverse. - /// (Originally from ../FSComp.txt:1353) + /// (Originally from ..\FSComp.txt:1357) static member keywordDescriptionDownto() = (GetStringFunc("keywordDescriptionDownto",",,,") ) /// Used in conditional branching. A short form of else if. - /// (Originally from ../FSComp.txt:1354) + /// (Originally from ..\FSComp.txt:1358) static member keywordDescriptionElif() = (GetStringFunc("keywordDescriptionElif",",,,") ) /// Used in conditional branching. - /// (Originally from ../FSComp.txt:1355) + /// (Originally from ..\FSComp.txt:1359) 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:1356) + /// (Originally from ..\FSComp.txt:1360) static member keywordDescriptionEnd() = (GetStringFunc("keywordDescriptionEnd",",,,") ) /// Used to declare an exception type. - /// (Originally from ../FSComp.txt:1357) + /// (Originally from ..\FSComp.txt:1361) static member keywordDescriptionException() = (GetStringFunc("keywordDescriptionException",",,,") ) /// Indicates that a declared program element is defined in another binary or assembly. - /// (Originally from ../FSComp.txt:1358) + /// (Originally from ..\FSComp.txt:1362) static member keywordDescriptionExtern() = (GetStringFunc("keywordDescriptionExtern",",,,") ) /// Used as a Boolean literal. - /// (Originally from ../FSComp.txt:1359) + /// (Originally from ..\FSComp.txt:1363) 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:1360) + /// (Originally from ..\FSComp.txt:1364) static member keywordDescriptionFinally() = (GetStringFunc("keywordDescriptionFinally",",,,") ) /// Used in looping constructs. - /// (Originally from ../FSComp.txt:1361) + /// (Originally from ..\FSComp.txt:1365) static member keywordDescriptionFor() = (GetStringFunc("keywordDescriptionFor",",,,") ) /// Used in lambda expressions, also known as anonymous functions. - /// (Originally from ../FSComp.txt:1362) + /// (Originally from ..\FSComp.txt:1366) 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:1363) + /// (Originally from ..\FSComp.txt:1367) static member keywordDescriptionFunction() = (GetStringFunc("keywordDescriptionFunction",",,,") ) /// Used to reference the top-level .NET namespace. - /// (Originally from ../FSComp.txt:1364) + /// (Originally from ..\FSComp.txt:1368) static member keywordDescriptionGlobal() = (GetStringFunc("keywordDescriptionGlobal",",,,") ) /// Used in conditional branching constructs. - /// (Originally from ../FSComp.txt:1365) + /// (Originally from ..\FSComp.txt:1369) static member keywordDescriptionIf() = (GetStringFunc("keywordDescriptionIf",",,,") ) /// Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. - /// (Originally from ../FSComp.txt:1366) + /// (Originally from ..\FSComp.txt:1370) static member keywordDescriptionIn() = (GetStringFunc("keywordDescriptionIn",",,,") ) /// Used to specify a base class or base interface. - /// (Originally from ../FSComp.txt:1367) + /// (Originally from ..\FSComp.txt:1371) static member keywordDescriptionInherit() = (GetStringFunc("keywordDescriptionInherit",",,,") ) /// Used to indicate a function that should be integrated directly into the caller's code. - /// (Originally from ../FSComp.txt:1368) + /// (Originally from ..\FSComp.txt:1372) static member keywordDescriptionInline() = (GetStringFunc("keywordDescriptionInline",",,,") ) /// Used to declare and implement interfaces. - /// (Originally from ../FSComp.txt:1369) + /// (Originally from ..\FSComp.txt:1373) static member keywordDescriptionInterface() = (GetStringFunc("keywordDescriptionInterface",",,,") ) /// Used to specify that a member is visible inside an assembly but not outside it. - /// (Originally from ../FSComp.txt:1370) + /// (Originally from ..\FSComp.txt:1374) 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:1371) + /// (Originally from ..\FSComp.txt:1375) static member keywordDescriptionLazy() = (GetStringFunc("keywordDescriptionLazy",",,,") ) /// Used to associate, or bind, a name to a value or function. - /// (Originally from ../FSComp.txt:1372) + /// (Originally from ..\FSComp.txt:1376) static member keywordDescriptionLet() = (GetStringFunc("keywordDescriptionLet",",,,") ) /// Used in asynchronous workflows to bind a name to the result of an asynchronous computation, or, in other computation expressions, used to bind a name to a result, which is of the computation type. - /// (Originally from ../FSComp.txt:1373) + /// (Originally from ..\FSComp.txt:1377) static member keywordDescriptionLetBang() = (GetStringFunc("keywordDescriptionLetBang",",,,") ) /// Used to branch by comparing a value to a pattern. - /// (Originally from ../FSComp.txt:1374) + /// (Originally from ..\FSComp.txt:1378) static member keywordDescriptionMatch() = (GetStringFunc("keywordDescriptionMatch",",,,") ) /// Used in computation expressions to pattern match directly over the result of another computation expression. - /// (Originally from ../FSComp.txt:1375) + /// (Originally from ..\FSComp.txt:1379) static member keywordDescriptionMatchBang() = (GetStringFunc("keywordDescriptionMatchBang",",,,") ) /// Used to declare a property or method in an object type. - /// (Originally from ../FSComp.txt:1376) + /// (Originally from ..\FSComp.txt:1380) 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:1377) + /// (Originally from ..\FSComp.txt:1381) static member keywordDescriptionModule() = (GetStringFunc("keywordDescriptionModule",",,,") ) /// Used to declare a variable, that is, a value that can be changed. - /// (Originally from ../FSComp.txt:1378) + /// (Originally from ..\FSComp.txt:1382) 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:1379) + /// (Originally from ..\FSComp.txt:1383) 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:1380) + /// (Originally from ..\FSComp.txt:1384) 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:1381) + /// (Originally from ..\FSComp.txt:1385) static member keywordDescriptionNot() = (GetStringFunc("keywordDescriptionNot",",,,") ) /// Indicates the absence of an object. Also used in generic parameter constraints. - /// (Originally from ../FSComp.txt:1382) + /// (Originally from ..\FSComp.txt:1386) 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:1383) + /// (Originally from ..\FSComp.txt:1387) static member keywordDescriptionOf() = (GetStringFunc("keywordDescriptionOf",",,,") ) /// Used to make the contents of a namespace or module available without qualification. - /// (Originally from ../FSComp.txt:1384) + /// (Originally from ..\FSComp.txt:1388) 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:1385) + /// (Originally from ..\FSComp.txt:1389) 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:1386) + /// (Originally from ..\FSComp.txt:1390) static member keywordDescriptionOverride() = (GetStringFunc("keywordDescriptionOverride",",,,") ) /// Restricts access to a member to code in the same type or module. - /// (Originally from ../FSComp.txt:1387) + /// (Originally from ..\FSComp.txt:1391) static member keywordDescriptionPrivate() = (GetStringFunc("keywordDescriptionPrivate",",,,") ) /// Allows access to a member from outside the type. - /// (Originally from ../FSComp.txt:1388) + /// (Originally from ..\FSComp.txt:1392) static member keywordDescriptionPublic() = (GetStringFunc("keywordDescriptionPublic",",,,") ) /// Used to indicate that a function is recursive. - /// (Originally from ../FSComp.txt:1389) + /// (Originally from ..\FSComp.txt:1393) static member keywordDescriptionRec() = (GetStringFunc("keywordDescriptionRec",",,,") ) /// Used to indicate a value to provide as the result of a computation expression. - /// (Originally from ../FSComp.txt:1390) + /// (Originally from ..\FSComp.txt:1394) static member keywordDescriptionReturn() = (GetStringFunc("keywordDescriptionReturn",",,,") ) /// Used to indicate a computation expression that, when evaluated, provides the result of the containing computation expression. - /// (Originally from ../FSComp.txt:1391) + /// (Originally from ..\FSComp.txt:1395) 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:1392) + /// (Originally from ..\FSComp.txt:1396) 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:1393) + /// (Originally from ..\FSComp.txt:1397) 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:1394) + /// (Originally from ..\FSComp.txt:1398) static member keywordDescriptionStruct() = (GetStringFunc("keywordDescriptionStruct",",,,") ) /// Used in conditional expressions. Also used to perform side effects after object construction. - /// (Originally from ../FSComp.txt:1395) + /// (Originally from ..\FSComp.txt:1399) static member keywordDescriptionThen() = (GetStringFunc("keywordDescriptionThen",",,,") ) /// Used in for loops to indicate a range. - /// (Originally from ../FSComp.txt:1396) + /// (Originally from ..\FSComp.txt:1400) 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:1397) + /// (Originally from ..\FSComp.txt:1401) 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:1398) + /// (Originally from ..\FSComp.txt:1402) static member keywordDescriptionType() = (GetStringFunc("keywordDescriptionType",",,,") ) /// Used to convert to a type that is higher in the inheritance chain. - /// (Originally from ../FSComp.txt:1399) + /// (Originally from ..\FSComp.txt:1403) static member keywordDescriptionUpcast() = (GetStringFunc("keywordDescriptionUpcast",",,,") ) /// Used instead of let for values that require Dispose to be called to free resources. - /// (Originally from ../FSComp.txt:1400) + /// (Originally from ..\FSComp.txt:1404) static member keywordDescriptionUse() = (GetStringFunc("keywordDescriptionUse",",,,") ) /// Used instead of let! in asynchronous workflows and other computation expressions for values that require Dispose to be called to free resources. - /// (Originally from ../FSComp.txt:1401) + /// (Originally from ..\FSComp.txt:1405) 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:1402) + /// (Originally from ..\FSComp.txt:1406) static member keywordDescriptionVal() = (GetStringFunc("keywordDescriptionVal",",,,") ) /// Indicates the .NET void type. Used when interoperating with other .NET languages. - /// (Originally from ../FSComp.txt:1403) + /// (Originally from ..\FSComp.txt:1407) 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:1404) + /// (Originally from ..\FSComp.txt:1408) static member keywordDescriptionWhen() = (GetStringFunc("keywordDescriptionWhen",",,,") ) /// Introduces a looping construct. - /// (Originally from ../FSComp.txt:1405) + /// (Originally from ..\FSComp.txt:1409) 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:1406) + /// (Originally from ..\FSComp.txt:1410) static member keywordDescriptionWith() = (GetStringFunc("keywordDescriptionWith",",,,") ) /// Used in a sequence expression to produce a value for a sequence. - /// (Originally from ../FSComp.txt:1407) + /// (Originally from ..\FSComp.txt:1411) 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:1408) + /// (Originally from ..\FSComp.txt:1412) 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:1409) + /// (Originally from ..\FSComp.txt:1413) static member keywordDescriptionRightArrow() = (GetStringFunc("keywordDescriptionRightArrow",",,,") ) /// Assigns a value to a variable. - /// (Originally from ../FSComp.txt:1410) + /// (Originally from ..\FSComp.txt:1414) static member keywordDescriptionLeftArrow() = (GetStringFunc("keywordDescriptionLeftArrow",",,,") ) /// Converts a type to type that is higher in the hierarchy. - /// (Originally from ../FSComp.txt:1411) + /// (Originally from ..\FSComp.txt:1415) static member keywordDescriptionCast() = (GetStringFunc("keywordDescriptionCast",",,,") ) /// Converts a type to a type that is lower in the hierarchy. - /// (Originally from ../FSComp.txt:1412) + /// (Originally from ..\FSComp.txt:1416) static member keywordDescriptionDynamicCast() = (GetStringFunc("keywordDescriptionDynamicCast",",,,") ) /// Delimits a typed code quotation. - /// (Originally from ../FSComp.txt:1413) + /// (Originally from ..\FSComp.txt:1417) static member keywordDescriptionTypedQuotation() = (GetStringFunc("keywordDescriptionTypedQuotation",",,,") ) /// Delimits a untyped code quotation. - /// (Originally from ../FSComp.txt:1414) + /// (Originally from ..\FSComp.txt:1418) 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:1415) + /// (Originally from ..\FSComp.txt:1419) 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:1416) + /// (Originally from ..\FSComp.txt:1420) 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:1417) + /// (Originally from ..\FSComp.txt:1421) static member descriptionWordIs() = (GetStringFunc("descriptionWordIs",",,,") ) /// This value is not a function and cannot be applied. - /// (Originally from ../FSComp.txt:1418) + /// (Originally from ..\FSComp.txt:1422) 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:1419) + /// (Originally from ..\FSComp.txt:1423) 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:1420) + /// (Originally from ..\FSComp.txt:1424) static member notAFunctionButMaybeIndexer() = (GetStringFunc("notAFunctionButMaybeIndexer",",,,") ) /// - /// (Originally from ../FSComp.txt:1421) + /// (Originally from ..\FSComp.txt:1425) 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:1422) + /// (Originally from ..\FSComp.txt:1426) 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:1423) + /// (Originally from ..\FSComp.txt:1427) 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:1424) + /// (Originally from ..\FSComp.txt:1428) static member pickleUnexpectedNonZero(a0 : System.String) = (3219, GetStringFunc("pickleUnexpectedNonZero",",,,%s,,,") a0) /// This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. - /// (Originally from ../FSComp.txt:1425) + /// (Originally from ..\FSComp.txt:1429) static member tcTupleMemberNotNormallyUsed() = (3220, GetStringFunc("tcTupleMemberNotNormallyUsed",",,,") ) /// This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. - /// (Originally from ../FSComp.txt:1426) + /// (Originally from ..\FSComp.txt:1430) static member implicitlyDiscardedInSequenceExpression(a0 : System.String) = (3221, GetStringFunc("implicitlyDiscardedInSequenceExpression",",,,%s,,,") a0) /// This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. - /// (Originally from ../FSComp.txt:1427) + /// (Originally from ..\FSComp.txt:1431) static member implicitlyDiscardedSequenceInSequenceExpression(a0 : System.String) = (3222, GetStringFunc("implicitlyDiscardedSequenceInSequenceExpression",",,,%s,,,") a0) /// The file '%s' changed on disk unexpectedly, please reload. - /// (Originally from ..\FSComp.txt:1427) + /// (Originally from ..\FSComp.txt:1432) static member ilreadFileChanged(a0 : System.String) = (3223, GetStringFunc("ilreadFileChanged",",,,%s,,,") a0) /// Invalid anonymous record expression - /// (Originally from ..\FSComp.txt:1431) + /// (Originally from ..\FSComp.txt:1433) static member parsInvalidAnonRecdExpr() = (3224, GetStringFunc("parsInvalidAnonRecdExpr",",,,") ) /// Invalid anonymous record type - /// (Originally from ..\FSComp.txt:1432) + /// (Originally from ..\FSComp.txt:1434) static member parsInvalidAnonRecdType() = (3225, 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:1433) + /// (Originally from ..\FSComp.txt:1435) static member tcCopyAndUpdateNeedsRecordType() = (3226, GetStringFunc("tcCopyAndUpdateNeedsRecordType",",,,") ) /// Call this method once to validate that all known resources are valid; throws if not diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx index 3a9b5ffe0ac..7db9fe3d46f 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx @@ -181,7 +181,7 @@ All branches of an 'if' expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'. - All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'. + All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. From fafad3c1aef406f6c652a079bc104e3d72ce075d Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 11 Oct 2018 11:51:38 +0100 Subject: [PATCH 20/24] re-add tests --- src/fsharp/FSharp.Core/printf.fs | 2 + src/fsharp/FSharp.Core/printf.fsi | 10 ++++- tests/fsharp/tests.fs | 4 +- tests/fsharp/typecheck/sigs/neg103.vsbsl | 47 +++++++++++----------- tests/fsharp/typecheck/sigs/neg103b.bsl | 24 +++++++++++ tests/fsharp/typecheck/sigs/neg103b.fs | 20 +++++++++ tests/fsharp/typecheck/sigs/neg104.bsl | 2 +- tests/fsharp/typecheck/sigs/neg104.vsbsl | 2 +- tests/fsharp/typecheck/sigs/neg104b.bsl | 20 +++++++++ tests/fsharp/typecheck/sigs/neg104b.fs | 12 ++++++ tests/fsharp/typecheck/sigs/neg_anon_1.bsl | 16 ++++---- 11 files changed, 122 insertions(+), 37 deletions(-) create mode 100644 tests/fsharp/typecheck/sigs/neg103b.bsl create mode 100644 tests/fsharp/typecheck/sigs/neg103b.fs create mode 100644 tests/fsharp/typecheck/sigs/neg104b.bsl create mode 100644 tests/fsharp/typecheck/sigs/neg104b.fs 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/tests/fsharp/tests.fs b/tests/fsharp/tests.fs index 383d0d839c8..cddd580bce4 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -2440,10 +2440,10 @@ module TypecheckTests = let ``type check neg104`` () = singleNegTest (testConfig "typecheck/sigs") "neg104" [] - let ``type check neg103`` () = singleNegTest (testConfig "typecheck/sigs") "neg103" + let ``type check neg103b`` () = singleNegTest (testConfig "typecheck/sigs") "neg103b" [] - let ``type check neg104`` () = singleNegTest (testConfig "typecheck/sigs") "neg104" + let ``type check neg104b`` () = singleNegTest (testConfig "typecheck/sigs") "neg104b" [] let ``type check neg_anon_1`` () = singleNegTest (testConfig "typecheck/sigs") "neg_anon_1" diff --git a/tests/fsharp/typecheck/sigs/neg103.vsbsl b/tests/fsharp/typecheck/sigs/neg103.vsbsl index 4c55fca4170..422a9e3bf81 100644 --- a/tests/fsharp/typecheck/sigs/neg103.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg103.vsbsl @@ -1,24 +1,25 @@ -neg103.fs(5,50,5,61): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["a"; "b"]' and '["a"]' - -neg103.fs(7,41,7,52): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["b"]' and '["a"]' - -neg103.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 - -neg103.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type - '{|b : int|}' -is not compatible with type - '{|a : int|}' - - -neg103.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 - -neg103.fs(13,27,13,62): typecheck error FS0193: Type constraint mismatch. The type - '{|a : int ; b : int|}' -is not compatible with type - '{|a : int|}' - - -neg103.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 - -neg103.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 +neg103.fs(7,12,7,22): typecheck error FS0001: This expression was expected to have type + 'Async<'a>' +but here has type + 'string' + +neg103.fs(12,7,12,15): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' + +neg103.fs(17,7,17,15): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' + +neg103.fs(21,7,21,9): typecheck error FS0001: This expression was expected to have type + 'Async' +but here has type + 'int' + +neg103.fs(25,11,25,19): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' diff --git a/tests/fsharp/typecheck/sigs/neg103b.bsl b/tests/fsharp/typecheck/sigs/neg103b.bsl new file mode 100644 index 00000000000..6c67abf0a6e --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg103b.bsl @@ -0,0 +1,24 @@ + +neg103.fs(5,50,5,61): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["a"; "b"]' and '["a"]' + +neg103.fs(7,41,7,52): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["b"]' and '["a"]' + +neg103.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 + +neg103.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type + '{|b : int|}' +is not compatible with type + '{|a : int|}' + + +neg103.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 + +neg103.fs(13,27,13,62): typecheck error FS0193: Type constraint mismatch. The type + '{|a : int ; b : int|}' +is not compatible with type + '{|a : int|}' + + +neg103.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 + +neg103.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 \ No newline at end of file diff --git a/tests/fsharp/typecheck/sigs/neg103b.fs b/tests/fsharp/typecheck/sigs/neg103b.fs new file mode 100644 index 00000000000..4979cea70bd --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg103b.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/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.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/neg104b.bsl b/tests/fsharp/typecheck/sigs/neg104b.bsl new file mode 100644 index 00000000000..8a5f0f96195 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg104b.bsl @@ -0,0 +1,20 @@ + +neg104b.fs(6,38,6,39): parse error FS0010: Unexpected symbol '}' in binding. Expected '|}' or other token. + +neg104b.fs(6,29,6,31): parse error FS0605: Unmatched '{|' + +neg104b.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. + +neg104b.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. + +neg104b.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. + +neg104b.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. + +neg104b.fs(10,25,10,26): parse error FS0010: Unexpected symbol '}' in type definition. Expected '|}' or other token. + +neg104b.fs(10,14,10,16): parse error FS0605: Unmatched '{|' + +neg104b.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. + +neg104b.fs(14,1,14,1): parse error FS0010: Incomplete structured construct at or before this point in implementation file \ No newline at end of file diff --git a/tests/fsharp/typecheck/sigs/neg104b.fs b/tests/fsharp/typecheck/sigs/neg104b.fs new file mode 100644 index 00000000000..98c907e65d3 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg104b.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/neg_anon_1.bsl b/tests/fsharp/typecheck/sigs/neg_anon_1.bsl index cdc62ab4d79..d7aaaecd939 100644 --- a/tests/fsharp/typecheck/sigs/neg_anon_1.bsl +++ b/tests/fsharp/typecheck/sigs/neg_anon_1.bsl @@ -1,24 +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(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(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 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 +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 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 +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(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 +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 From bf935d56cf4df130450906f066c77eff15326f45 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 11 Oct 2018 15:08:46 +0100 Subject: [PATCH 21/24] fix tests --- tests/fsharp/tests.fs | 4 ++-- tests/fsharp/typecheck/sigs/neg104b.bsl | 20 ---------------- .../sigs/{neg103b.bsl => neg113.bsl} | 16 ++++++------- .../typecheck/sigs/{neg103b.fs => neg113.fs} | 0 tests/fsharp/typecheck/sigs/neg113.vsbsl | 24 +++++++++++++++++++ tests/fsharp/typecheck/sigs/neg114.bsl | 20 ++++++++++++++++ .../typecheck/sigs/{neg104b.fs => neg114.fs} | 0 tests/fsharp/typecheck/sigs/neg114.vsbsl | 24 +++++++++++++++++++ 8 files changed, 78 insertions(+), 30 deletions(-) delete mode 100644 tests/fsharp/typecheck/sigs/neg104b.bsl rename tests/fsharp/typecheck/sigs/{neg103b.bsl => neg113.bsl} (55%) rename tests/fsharp/typecheck/sigs/{neg103b.fs => neg113.fs} (100%) create mode 100644 tests/fsharp/typecheck/sigs/neg113.vsbsl create mode 100644 tests/fsharp/typecheck/sigs/neg114.bsl rename tests/fsharp/typecheck/sigs/{neg104b.fs => neg114.fs} (100%) create mode 100644 tests/fsharp/typecheck/sigs/neg114.vsbsl diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs index cddd580bce4..57f79821c5f 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -2440,10 +2440,10 @@ module TypecheckTests = let ``type check neg104`` () = singleNegTest (testConfig "typecheck/sigs") "neg104" [] - let ``type check neg103b`` () = singleNegTest (testConfig "typecheck/sigs") "neg103b" + let ``type check neg113`` () = singleNegTest (testConfig "typecheck/sigs") "neg113" [] - let ``type check neg104b`` () = singleNegTest (testConfig "typecheck/sigs") "neg104b" + let ``type check neg114`` () = singleNegTest (testConfig "typecheck/sigs") "neg114" [] let ``type check neg_anon_1`` () = singleNegTest (testConfig "typecheck/sigs") "neg_anon_1" diff --git a/tests/fsharp/typecheck/sigs/neg104b.bsl b/tests/fsharp/typecheck/sigs/neg104b.bsl deleted file mode 100644 index 8a5f0f96195..00000000000 --- a/tests/fsharp/typecheck/sigs/neg104b.bsl +++ /dev/null @@ -1,20 +0,0 @@ - -neg104b.fs(6,38,6,39): parse error FS0010: Unexpected symbol '}' in binding. Expected '|}' or other token. - -neg104b.fs(6,29,6,31): parse error FS0605: Unmatched '{|' - -neg104b.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. - -neg104b.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. - -neg104b.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. - -neg104b.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. - -neg104b.fs(10,25,10,26): parse error FS0010: Unexpected symbol '}' in type definition. Expected '|}' or other token. - -neg104b.fs(10,14,10,16): parse error FS0605: Unmatched '{|' - -neg104b.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. - -neg104b.fs(14,1,14,1): parse error FS0010: Incomplete structured construct at or before this point in implementation file \ No newline at end of file diff --git a/tests/fsharp/typecheck/sigs/neg103b.bsl b/tests/fsharp/typecheck/sigs/neg113.bsl similarity index 55% rename from tests/fsharp/typecheck/sigs/neg103b.bsl rename to tests/fsharp/typecheck/sigs/neg113.bsl index 6c67abf0a6e..211ba670f91 100644 --- a/tests/fsharp/typecheck/sigs/neg103b.bsl +++ b/tests/fsharp/typecheck/sigs/neg113.bsl @@ -1,24 +1,24 @@ -neg103.fs(5,50,5,61): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["a"; "b"]' and '["a"]' +neg113.fs(5,50,5,61): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["a"; "b"]' and '["a"]' -neg103.fs(7,41,7,52): typecheck error FS0001: Two anonymous record types have mismatched sets of field names '["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"]' -neg103.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 FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion -neg103.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type +neg113.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type '{|b : int|}' is not compatible with type '{|a : int|}' -neg103.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 FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion -neg103.fs(13,27,13,62): typecheck error FS0193: Type constraint mismatch. The type +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|}' -neg103.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(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 -neg103.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 \ No newline at end of file +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/neg103b.fs b/tests/fsharp/typecheck/sigs/neg113.fs similarity index 100% rename from tests/fsharp/typecheck/sigs/neg103b.fs rename to tests/fsharp/typecheck/sigs/neg113.fs 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/neg104b.fs b/tests/fsharp/typecheck/sigs/neg114.fs similarity index 100% rename from tests/fsharp/typecheck/sigs/neg104b.fs rename to tests/fsharp/typecheck/sigs/neg114.fs 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 From 836d7d2737ee4e6f53bbc4a113d5dc9a503727ac Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 12 Oct 2018 12:05:36 +0100 Subject: [PATCH 22/24] update FSharp.Core dependency --- .../FSharp.Compiler.Service.MSBuild.v12.fsproj | 2 +- .../FSharp.Compiler.Service.ProjectCracker.fsproj | 2 +- .../FSharp.Compiler.Service.ProjectCrackerTool.fsproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 From 2b882b203e84262c1d8197310f03bf4835dd1d5c Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 23 Oct 2018 14:02:12 +0100 Subject: [PATCH 23/24] update tools version --- DotnetCLIToolsVersion.txt | 2 +- fcs/build.fsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DotnetCLIToolsVersion.txt b/DotnetCLIToolsVersion.txt index 6e840019a3b..c735fa77fd7 100644 --- a/DotnetCLIToolsVersion.txt +++ b/DotnetCLIToolsVersion.txt @@ -1 +1 @@ - 2.1.400-preview-009197 + 2.1.403 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 = From 17d05ae119b7ea47e89a170aa1b04534b971f5e1 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 23 Oct 2018 15:09:24 +0100 Subject: [PATCH 24/24] fix fcs build --- fcs/samples/EditorService/EditorService.fsproj | 2 +- fcs/samples/FscExe/FscExe.fsproj | 2 +- fcs/samples/FsiExe/FsiExe.fsproj | 2 +- .../InteractiveService/InteractiveService.fsproj | 2 +- fcs/samples/Tokenizer/Tokenizer.fsproj | 2 +- fcs/samples/UntypedTree/UntypedTree.fsproj | 2 +- src/absil/illib.fs | 6 ------ src/fsharp/NameResolution.fs | 2 +- src/fsharp/Optimizer.fs | 2 +- src/fsharp/QuotationTranslator.fs | 2 +- src/fsharp/TastOps.fs | 15 +++++++++------ src/fsharp/TastPickle.fs | 2 +- src/fsharp/TypeChecker.fs | 12 ++++++------ src/fsharp/symbols/Symbols.fs | 16 ++++++++-------- src/fsharp/tast.fs | 3 ++- 15 files changed, 35 insertions(+), 37 deletions(-) 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/illib.fs b/src/absil/illib.fs index 66622b7e2a4..ab92a747b5e 100644 --- a/src/absil/illib.fs +++ b/src/absil/illib.fs @@ -432,16 +432,10 @@ module List = let existsSquared f xss = xss |> List.exists (fun xs -> xs |> List.exists (fun x -> f x)) let mapiFoldSquared f z xss = mapFoldSquared f z (xss |> mapiSquared (fun i j x -> (i,j,x))) -type ValueOption<'T> with - member x.IsSome = match x with ValueSome _ -> true | ValueNone -> false - member x.IsNone = match x with ValueSome _ -> false | ValueNone -> true - member x.Value = match x with ValueSome r -> r | ValueNone -> failwith "ValueOption.Value: value is None" - [] module ValueOption = let inline ofOption x = match x with Some x -> ValueSome x | None -> ValueNone let inline bind f x = match x with ValueSome x -> f x | ValueNone -> ValueNone - let inline get x = match x with ValueSome x -> x | ValueNone -> failwith "ValueOption.get" let inline isSome x = match x with ValueSome _ -> true | ValueNone -> false let inline isNone x = match x with ValueSome _ -> false | ValueNone -> true diff --git a/src/fsharp/NameResolution.fs b/src/fsharp/NameResolution.fs index 8aaf8e2571e..0b95e6f72f3 100644 --- a/src/fsharp/NameResolution.fs +++ b/src/fsharp/NameResolution.fs @@ -1100,7 +1100,7 @@ let AddEntityForProvidedType (amap: Import.ImportMap, modref: ModuleOrNamespaceR let tycon = Construct.NewProvidedTycon(resolutionEnvironment, st, importProvidedType, isSuppressRelocate, m) modref.ModuleOrNamespaceType.AddProvidedTypeEntity(tycon) let tcref = modref.NestedTyconRef tycon - System.Diagnostics.Debug.Assert(modref.TryDeref.IsSome) + System.Diagnostics.Debug.Assert(ValueOption.isSome modref.TryDeref) tcref diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index e4b93403385..599392383d7 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -3102,7 +3102,7 @@ and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = | None -> false | Some mbrTyconRef -> // Check we can deref system_MarshalByRefObject_tcref. When compiling against the Silverlight mscorlib we can't - if mbrTyconRef.TryDeref.IsSome then + if ValueOption.isSome mbrTyconRef.TryDeref then // Check if this is a subtype of MarshalByRefObject assert (cenv.g.system_MarshalByRefObject_ty.IsSome) ExistsSameHeadTypeInHierarchy cenv.g cenv.amap vref.Range (generalizedTyconRef tcref) cenv.g.system_MarshalByRefObject_ty.Value diff --git a/src/fsharp/QuotationTranslator.fs b/src/fsharp/QuotationTranslator.fs index 48dcefb7d6f..99fdf6c751a 100644 --- a/src/fsharp/QuotationTranslator.fs +++ b/src/fsharp/QuotationTranslator.fs @@ -66,7 +66,7 @@ type QuotationGenerationScope = static member ComputeQuotationFormat g = let deserializeExValRef = ValRefForIntrinsic g.deserialize_quoted_FSharp_40_plus_info - if deserializeExValRef.TryDeref.IsSome then + if ValueOption.isSome deserializeExValRef.TryDeref then QuotationSerializationFormat.FSharp_40_Plus else QuotationSerializationFormat.FSharp_20_Plus diff --git a/src/fsharp/TastOps.fs b/src/fsharp/TastOps.fs index 8e67f2cb5c3..dfebdb9bae0 100644 --- a/src/fsharp/TastOps.fs +++ b/src/fsharp/TastOps.fs @@ -675,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 @@ -7556,7 +7556,9 @@ let rec TypeHasDefaultValue g m ty = elif isStructTupleTy g ty then destStructTupleTy g ty |> List.forall (TypeHasDefaultValue g m) elif isStructAnonRecdTy g ty then - tryDestAnonRecdTy g ty |> ValueOption.get |> snd |> List.forall (TypeHasDefaultValue g m) + 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 @@ -7570,8 +7572,9 @@ let (|SpecialComparableHeadType|_|) g ty = let _tupInfo, elemTys = destAnyTupleTy g ty Some elemTys elif isAnonRecdTy g ty then - let _anonInfo, elemTys = tryDestAnonRecdTy g ty |> ValueOption.get - Some elemTys + match tryDestAnonRecdTy g ty with + | ValueNone -> Some [] + | ValueSome (_anonInfo, elemTys) -> Some elemTys else match tryAppTy g ty with | ValueSome (tcref, tinst) -> @@ -8338,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/TastPickle.fs b/src/fsharp/TastPickle.fs index cdd45c70bd6..d86546b3699 100755 --- a/src/fsharp/TastPickle.fs +++ b/src/fsharp/TastPickle.fs @@ -1433,7 +1433,7 @@ let p_trait (TTrait(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, TupInfo.Const info, nms) + AnonRecdTypeInfo.Create (ccu, mkTupInfo info, nms) let u_anonInfo st = u_osgn_decl st.ianoninfos u_anonInfo_data st diff --git a/src/fsharp/TypeChecker.fs b/src/fsharp/TypeChecker.fs index d85153a0109..23abddc3cfd 100755 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -713,13 +713,13 @@ let UnifyTupleTypeAndInferCharacteristics contextInfo cenv denv m knownTy isExpl let tupInfo, ptys = if isAnyTupleTy cenv.g knownTy then let tupInfo, ptys = destAnyTupleTy cenv.g knownTy - let tupInfo = (if isExplicitStruct then TupInfo.Const isExplicitStruct else tupInfo) + 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 - TupInfo.Const isExplicitStruct, NewInferenceTypes ps + mkTupInfo isExplicitStruct, NewInferenceTypes ps let contextInfo = match contextInfo with @@ -739,7 +739,7 @@ let UnifyAnonRecdTypeAndInferCharacteristics contextInfo cenv denv m ty isExplic // 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 TupInfo.Const isExplicitStruct else anonInfo.TupInfo) + 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 @@ -747,7 +747,7 @@ let UnifyAnonRecdTypeAndInferCharacteristics contextInfo cenv denv m ty isExplic anonInfo, ptys | ValueNone -> // Note: no known anonymous record type - use our assembly - let anonInfo = AnonRecdTypeInfo.Create(cenv.topCcu, TupInfo.Const isExplicitStruct, unsortedNames) + 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 @@ -4619,7 +4619,7 @@ and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv:SyntacticUnscoped | _ -> error(Error(FSComp.SR.tcTypeHasNoNestedTypes(), m)) | SynType.Tuple(isStruct, args, m) -> - let tupInfo = TupInfo.Const isStruct + let tupInfo = mkTupInfo isStruct if isStruct then let args',tpenv = TcTypesAsTuple cenv newOk checkCxs occ env tpenv args m TType_tuple(tupInfo,args'),tpenv @@ -4633,7 +4633,7 @@ and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv:SyntacticUnscoped TType_tuple(tupInfo,args'),tpenv | SynType.AnonRecd(isStruct, args,m) -> - let tupInfo = TupInfo.Const isStruct + 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) diff --git a/src/fsharp/symbols/Symbols.fs b/src/fsharp/symbols/Symbols.fs index 68d5fcbfd5f..ab4cc75a977 100644 --- a/src/fsharp/symbols/Symbols.fs +++ b/src/fsharp/symbols/Symbols.fs @@ -86,7 +86,7 @@ module Impl = let entityIsUnresolved(entity:EntityRef) = match entity with | ERefNonLocal(NonLocalEntityRef(ccu, _)) -> - ccu.IsUnresolvedReference && entity.TryDeref.IsNone + ccu.IsUnresolvedReference && ValueOption.isNone entity.TryDeref | _ -> false let checkEntityIsResolved(entity:EntityRef) = @@ -756,10 +756,10 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) = let isUnresolved() = - entityIsUnresolved v.TyconRef || v.TryUnionCase.IsNone + entityIsUnresolved v.TyconRef || ValueOption.isNone v.TryUnionCase let checkIsResolved() = checkEntityIsResolved v.TyconRef - if v.TryUnionCase.IsNone then + if ValueOption.isNone v.TryUnionCase then invalidOp (sprintf "The union case '%s' could not be found in the target type" v.CaseName) member __.IsUnresolved = @@ -874,8 +874,8 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = d.TryDeclaringTyconRef |> Option.exists entityIsUnresolved || match d with | AnonField _ -> false - | RecdOrClass v -> v.TryRecdField.IsNone - | Union (v, _) -> v.TryUnionCase.IsNone + | RecdOrClass v -> ValueOption.isNone v.TryRecdField + | Union (v, _) -> ValueOption.isNone v.TryUnionCase | ILField _ -> false let checkIsResolved() = @@ -883,10 +883,10 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = match d with | AnonField _ -> () | RecdOrClass v -> - if v.TryRecdField.IsNone then + if ValueOption.isNone v.TryRecdField then invalidOp (sprintf "The record field '%s' could not be found in the target type" v.FieldName) | Union (v, _) -> - if v.TryUnionCase.IsNone then + if ValueOption.isNone v.TryUnionCase then invalidOp (sprintf "The union case '%s' could not be found in the target type" v.CaseName) | ILField _ -> () @@ -1378,7 +1378,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = let isUnresolved() = match fsharpInfo() with | None -> false - | Some v -> v.TryDeref.IsNone + | Some v -> ValueOption.isNone v.TryDeref let checkIsResolved() = if isUnresolved() then diff --git a/src/fsharp/tast.fs b/src/fsharp/tast.fs index a7fd3b28c56..fc8354e3432 100644 --- a/src/fsharp/tast.fs +++ b/src/fsharp/tast.fs @@ -3263,7 +3263,7 @@ and ValueSome tcr.binding /// Is the destination assembly available? - member tcr.CanDeref = tcr.TryDeref.IsSome + member tcr.CanDeref = ValueOption.isSome tcr.TryDeref /// Gets the data indicating the compiled representation of a type or module in terms of Abstract IL data structures. member x.CompiledRepresentation = x.Deref.CompiledRepresentation @@ -5199,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)