diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs index f6fc5a409ea3..c63418381891 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs @@ -3916,6 +3916,15 @@ type internal SR private() = /// Union case/exception '%s' does not have field named '%s'. /// (Originally from ..\FSComp.txt:1296) static member tcUnionCaseConstructorDoesNotHaveFieldWithGivenName(a0 : System.String, a1 : System.String) = (3174, GetStringFunc("tcUnionCaseConstructorDoesNotHaveFieldWithGivenName",",,,%s,,,%s,,,") a0 a1) + /// The exception '%s' does not have a field named '%s'. + /// (Originally from ..\FSComp.txt:1297) + static member tcExceptionConstructorDoesNotHaveFieldWithGivenName(a0 : System.String, a1 : System.String) = (3174, GetStringFunc("tcExceptionConstructorDoesNotHaveFieldWithGivenName",",,,%s,,,%s,,,") a0 a1) + /// Active patterns do not have fields. This syntax is invalid. + /// (Originally from ..\FSComp.txt:1298) + static member tcActivePatternsDoNotHaveFields() = (3174, GetStringFunc("tcActivePatternsDoNotHaveFields",",,,") ) + /// The constructor does not have a field named '%s'. + /// (Originally from ..\FSComp.txt:1299) + static member tcConstructorDoesNotHaveFieldWithGivenName(a0 : System.String) = (3174, GetStringFunc("tcConstructorDoesNotHaveFieldWithGivenName",",,,%s,,,") a0) /// Union case/exception field '%s' cannot be used more than once. /// (Originally from ..\FSComp.txt:1297) static member tcUnionCaseFieldCannotBeUsedMoreThanOnce(a0 : System.String) = (3175, GetStringFunc("tcUnionCaseFieldCannotBeUsedMoreThanOnce",",,,%s,,,") a0) diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx index a56052a1e9d4..c34fee949bdc 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx @@ -3916,7 +3916,16 @@ Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. - Union case/exception '{0}' does not have field named '{1}'. + The union case '{0}' does not have a field named '{1}'. + + + The exception '{0}' does not have a field named '{1}'. + + + Active patterns do not have fields. This syntax is invalid. + + + The constructor does not have a field named '{0}'. Union case/exception field '{0}' cannot be used more than once. diff --git a/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/UnionTypes/E_UnionConstructorBadFieldName.fs b/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/UnionTypes/E_UnionConstructorBadFieldName.fs index bd9b5649ce1f..f9ebb74b26ff 100644 --- a/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/UnionTypes/E_UnionConstructorBadFieldName.fs +++ b/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/UnionTypes/E_UnionConstructorBadFieldName.fs @@ -2,7 +2,7 @@ // Make sure we properly detect bogus named field in constructors //The union case 'Case1' does not have a field named 'V3'\. //The union case 'Case1' does not have a field named 'V3'\. -//The union casen 'Case1' does not have a field named 'V4'\. +//The union case 'Case1' does not have a field named 'V4'\. type MyDU = | Case1 of V1 : int * V2 : string