You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fcs/fcs-fable/FSStrings.fs
+27-18Lines changed: 27 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,18 @@ let resources =
14
14
("ConstraintSolverMissingConstraint",
15
15
"A type parameter is missing a constraint '{0}'"
16
16
);
17
+
("ConstraintSolverNullnessWarningEquivWithTypes",
18
+
"Nullness warning: A non-nullable '{0}' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression."
19
+
);
20
+
("ConstraintSolverNullnessWarningWithTypes",
21
+
"Nullness warning: The types '{0}' and '{1}' do not have compatible nullability."
22
+
);
23
+
("ConstraintSolverNullnessWarningWithType",
24
+
"Nullness warning: The type '{0}' does not support 'null'."
25
+
);
26
+
("ConstraintSolverNullnessWarning",
27
+
"Nullness warning: {0}."
28
+
);
17
29
("ConstraintSolverTypesNotInEqualityRelation1",
18
30
"The unit of measure '{0}' does not match the unit of measure '{1}'"
19
31
);
@@ -69,7 +81,7 @@ let resources =
69
81
"Duplicate definition of {0} '{1}'"
70
82
);
71
83
("NameClash2",
72
-
"The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module"
84
+
"The {0} '{1}' cannot be defined because the name '{2}' clashes with the {3} '{4}' in this type or module"
73
85
);
74
86
("Duplicate1",
75
87
"Two members called '{0}' have the same signature"
@@ -105,7 +117,7 @@ let resources =
105
117
"A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead"
106
118
);
107
119
("TypeIsImplicitlyAbstract",
108
-
"This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type."
120
+
"Non-abstract classes cannot contain abstract members. Either provide a default member implementation or add the '[<AbstractClass>]' attribute to your type."
109
121
);
110
122
("NonRigidTypar1",
111
123
"This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'."
@@ -299,6 +311,9 @@ let resources =
299
311
("Parser.TOKEN.BAR.RBRACE",
300
312
"symbol '|}'"
301
313
);
314
+
("Parser.TOKEN.BAR_JUST_BEFORE_NULL",
315
+
"symbol '|' (directly before 'null')"
316
+
);
302
317
("Parser.TOKEN.GREATER.RBRACE",
303
318
"symbol '>}'"
304
319
);
@@ -914,20 +929,11 @@ let resources =
914
929
("MissingFields",
915
930
"The following fields require values: {0}"
916
931
);
917
-
("ValueRestriction1",
918
-
"Value restriction. The value '{0}' has generic type\n {1}\nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation."
932
+
("ValueRestrictionFunction",
933
+
"""Value restriction: The value '{0}' has an inferred generic function type\n {1}\nHowever, values cannot have generic type variables like '_a in "let f: '_a". You should define '{2}' as a function instead by doing one of the following:\n- Add an explicit parameter that is applied instead of using a partial application "let f param"\n- Add a unit parameter like "let f()"\n- Write explicit type parameters like "let f<'a>"\nor if you do not intend for it to be generic, either:\n- Add an explicit type annotation like "let f : obj -> obj"\n- Apply arguments of non-generic types to the function value in later code for type inference like "do f()".\nThis error is because a let binding without parameters defines a value, not a function. Values cannot be generic because reading a value is assumed to result in the same everywhere but generic type parameters may invalidate this assumption by enabling type-dependent results."""
919
934
);
920
-
("ValueRestriction2",
921
-
"Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation."
922
-
);
923
-
("ValueRestriction3",
924
-
"Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved."
925
-
);
926
-
("ValueRestriction4",
927
-
"Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation."
928
-
);
929
-
("ValueRestriction5",
930
-
"Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation."
935
+
("ValueRestriction",
936
+
"""Value restriction: The value '{0}' has an inferred generic type\n {1}\nHowever, values cannot have generic type variables like '_a in "let x: '_a". You can do one of the following:\n- Define it as a simple data term like an integer literal, a string literal or a union case like "let x = 1"\n- Add an explicit type annotation like "let x : int"\n- Use the value as a non-generic type in later code for type inference like "do x"\nor if you still want type-dependent results, you can define '{2}' as a function instead by doing either:\n- Add a unit parameter like "let x()"\n- Write explicit type parameters like "let x<'a>".\nThis error is because a let binding without parameters defines a value, not a function. Values cannot be generic because reading a value is assumed to result in the same everywhere but generic type parameters may invalidate this assumption by enabling type-dependent results."""
931
937
);
932
938
("RecoverableParseError",
933
939
"syntax error"
@@ -945,7 +951,7 @@ let resources =
945
951
"Override implementations should be given as part of the initial declaration of a type."
946
952
);
947
953
("IntfImplInIntrinsicAugmentation",
948
-
"Interface implementations should normally be given on the initial declaration of a type. Interface implementations in augmentations may lead to accessing static bindings before they are initialized, though only if the interface implementation is invoked during initialization of the static data, and in turn access the static data. You may remove this warning using #nowarn \"69\" if you have checked this is not the case."
954
+
"Interface implementations should normally be given on the initial declaration of a type. Interface implementations in augmentations may lead to accessing static bindings before they are initialized, though only if the interface implementation is invoked during initialization of the static data, and in turn access the static data. You may remove this warning using '#nowarn \"69\"' if you have checked this is not the case."
949
955
);
950
956
("IntfImplInExtrinsicAugmentation",
951
957
"Interface implementations should be given on the initial declaration of a type."
@@ -957,10 +963,10 @@ let resources =
957
963
"The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'."
958
964
);
959
965
("HashIncludeNotAllowedInNonScript",
960
-
"#I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'."
966
+
"#I directives may only be used in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'."
961
967
);
962
968
("HashReferenceNotAllowedInNonScript",
963
-
"#r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'."
969
+
"#r directives may only be used in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'."
964
970
);
965
971
("HashDirectiveNotAllowedInNonScript",
966
972
"This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'."
@@ -1007,6 +1013,9 @@ let resources =
1007
1013
("ArgumentsInSigAndImplMismatch",
1008
1014
"The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling."
0 commit comments