Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing updates #12072

Merged
merged 27 commits into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adjust tests
  • Loading branch information
Don Syme committed Sep 1, 2021
commit 40e31ccde728da346015b39bfdc6127ace458145
2 changes: 1 addition & 1 deletion src/fsharp/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ tcUnnamedArgumentsDoNotFormPrefix,"The unnamed arguments do not form a prefix of
873,tcOnlySimplePatternsInLetRec,"Only simple variable patterns can be bound in 'let rec' constructs"
874,tcOnlyRecordFieldsAndSimpleLetCanBeMutable,"Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces"
875,tcMemberIsNotSufficientlyGeneric,"This member is not sufficiently generic"
876,tcLiteralAttributeRequiresConstantValue,"A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1'"
876,tcLiteralAttributeRequiresConstantValue,"A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x: int = 1'"
877,tcValueInSignatureRequiresLiteralAttribute,"A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute"
878,tcThreadStaticAndContextStaticMustBeStatic,"Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread"
879,tcVolatileFieldsMustBeMutable,"Volatile fields must be marked 'mutable' and cannot be thread-static"
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">Pokud se definuje také hodnota konstanty, třeba val x : int = 1, může být deklarací jenom atribut [&lt;Literal&gt;].</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">Eine Deklaration kann nur dem [&lt;Literal&gt;]-Attribut entsprechen, wenn auch ein konstanter Wert angegeben ist, z.B. "val x : int =1".</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">Una declaración solo puede ser el atributo [&lt;Literal&gt;] si también se proporciona un valor constante, por ejemplo, "val x: int = 1"</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">Une déclaration peut seulement être l'attribut [&lt;Literal&gt;] si une valeur constante est aussi donnée, par ex. 'val x : int = 1'</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">Una dichiarazione può essere solo l'attributo [&lt;Literal&gt;] se è specificato anche un valore costante, ad esempio 'val x : int = 1'</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">定数値も指定する場合には宣言を [&lt;Literal&gt;] 属性のみにできます。例: 'val x : int = 1'</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">상수 값도 지정된 경우(예: 'val x : int = 1')에만 선언은 [&lt;Literal&gt;] 특성일 수 있습니다.</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">Deklaracja może być atrybutem [&lt;Literal&gt;] tylko wtedy, gdy zostanie również podana wartość stała, np. „val x : int = 1”</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">Uma declaração só pode ser o atributo [&lt;Literal&gt;] se um valor constante também é dado, ex.:' val x: int = 1'</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">Объявление может представлять собой только атрибут [&lt;Literal&gt;], если указано значение константы, например, 'val x : int = 1'</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">Bir sabit değer de sağlanmışsa bildirim yalnızca [&lt;Literal&gt;] özniteliği olabilir, ör. 'val x : int = 1'</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.zh-Hans.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">如果还给定了常量值,则声明只能是 [&lt;Literal&gt;] 属性,例如 "val x : int = 1"</target>
<note />
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/xlf/FSComp.txt.zh-Hant.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4248,7 +4248,7 @@
<note />
</trans-unit>
<trans-unit id="tcLiteralAttributeRequiresConstantValue">
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x : int = 1'</source>
<source>A declaration may only be the [&lt;Literal&gt;] attribute if a constant value is also given, e.g. 'val x: int = 1'</source>
<target state="translated">若也提供了常數值,宣告就只能是 [&lt;Literal&gt;] 屬性,例如 'val x : int = 1'</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function
EndLine = 3
EndColumn = 9 }
Message =
"Incomplete pattern matches on this expression. For example, the value '{x=0}' may indicate a case not covered by the pattern(s)." };
"Incomplete pattern matches on this expression. For example, the value '{ x=0 }' may indicate a case not covered by the pattern(s)." };
{ Error = Warning 193
Range = { StartLine = 3
StartColumn = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ RelaxWhitespace2.fs (3394,13)-(3394,14) typecheck warning Incomplete pattern mat
RelaxWhitespace2.fs (3397,13)-(3397,14) typecheck warning Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s).
RelaxWhitespace2.fs (3403,21)-(3403,22) typecheck warning Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s).
RelaxWhitespace2.fs (3410,13)-(3415,20) typecheck warning Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s).
RelaxWhitespace2.fs (3713,1)-(3713,9) typecheck warning Incomplete pattern matches on this expression. For example, the value '{y=0}' may indicate a case not covered by the pattern(s).
RelaxWhitespace2.fs (3713,1)-(3713,9) typecheck warning Incomplete pattern matches on this expression. For example, the value '{ y=0 }' may indicate a case not covered by the pattern(s).
RelaxWhitespace2.fs (3720,1)-(3720,9) typecheck warning Incomplete pattern matches on this expression.
RelaxWhitespace2.fs (3731,1)-(3731,9) typecheck warning Incomplete pattern matches on this expression.
2 changes: 1 addition & 1 deletion tests/fsharp/typecheck/sigs/neg15.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ neg15.fs(190,1,190,6): typecheck error FS0491: The member or object constructor

neg15.fs(191,1,191,8): typecheck error FS0491: The member or object constructor 'SM' is not accessible. 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.

neg15.fs(204,11,204,16): typecheck error FS0501: The object constructor 'X2' takes 0 argument(s) but is here given 1. The required signature is 'new : unit -> X2'.
neg15.fs(204,11,204,16): typecheck error FS0501: The object constructor 'X2' takes 0 argument(s) but is here given 1. The required signature is 'new: unit -> X2'.
2 changes: 1 addition & 1 deletion tests/fsharp/typecheck/sigs/neg57.bsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

neg57.fs(4,6,4,9): typecheck error FS0314: The type definitions for type 'Foo' in the signature and implementation are not compatible because the field 'offset' 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'.

neg57.fs(1,8,1,9): typecheck error FS0193: Module 'M' requires a value 'new : unit -> Foo<'T>'
neg57.fs(1,8,1,9): typecheck error FS0193: Module 'M' requires a value 'new: unit -> Foo<'T>'
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// #Regression #Conformance #TypesAndModules #GeneratedEqualityAndHashing #Attributes #Diagnostics
// Regression test for FSHARP1.0:5406
// Scenario #2: I'm writing my own custom IComparable implementation - don't bother giving me one
//<Expects status="error" span="(7,3-7,23)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> StructuralComparisonAttribute'\.$</Expects>
//<Expects status="error" span="(7,3-7,23)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> StructuralComparisonAttribute'\.$</Expects>

[<StructuralEquality>]
[<StructuralComparison(false)>]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// #Regression #Conformance #TypesAndModules #GeneratedEqualityAndHashing #Attributes #Diagnostics
// Regression test for FSHARP1.0:5406
// Scenario #1: I'm not writing my own custom IComparable implementation, assume the reference equality
//<Expects status="error" span="(7,3-7,23)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> StructuralComparisonAttribute'\.$</Expects>
//<Expects status="error" span="(7,3-7,23)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> StructuralComparisonAttribute'\.$</Expects>

[<StructuralEquality>]
[<StructuralComparison(false)>]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// #Regression #Conformance #TypesAndModules #GeneratedEqualityAndHashing #Attributes

//<Expects status="error" span="(7,5-7,22)" id="FS0501">The object constructor 'ReferenceEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> ReferenceEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(8,5-8,25)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> StructuralComparisonAttribute'\.$</Expects>
//<Expects status="error" span="(9,5-9,23)" id="FS0501">The object constructor 'StructuralEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> StructuralEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(7,5-7,22)" id="FS0501">The object constructor 'ReferenceEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> ReferenceEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(8,5-8,25)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> StructuralComparisonAttribute'\.$</Expects>
//<Expects status="error" span="(9,5-9,23)" id="FS0501">The object constructor 'StructuralEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> StructuralEqualityAttribute'\.$</Expects>
module M01 =
[<ReferenceEquality(true)>]
[<StructuralComparison(true)>]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// #Regression #Conformance #TypesAndModules #GeneratedEqualityAndHashing #Attributes
//<Expects status="error" span="(8,5-8,22)" id="FS0501">The object constructor 'ReferenceEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> ReferenceEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(9,5-9,25)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> StructuralComparisonAttribute'\.$</Expects>
//<Expects status="error" span="(10,5-10,23)" id="FS0501">The object constructor 'StructuralEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> StructuralEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(8,5-8,22)" id="FS0501">The object constructor 'ReferenceEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> ReferenceEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(9,5-9,25)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> StructuralComparisonAttribute'\.$</Expects>
//<Expects status="error" span="(10,5-10,23)" id="FS0501">The object constructor 'StructuralEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> StructuralEqualityAttribute'\.$</Expects>


module M02 =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// #Regression #Conformance #TypesAndModules #GeneratedEqualityAndHashing #Attributes

//<Expects status="error" span="(7,5-7,22)" id="FS0501">The object constructor 'ReferenceEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> ReferenceEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(8,5-8,25)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> StructuralComparisonAttribute'\.$</Expects>
//<Expects status="error" span="(7,5-7,22)" id="FS0501">The object constructor 'ReferenceEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> ReferenceEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(8,5-8,25)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> StructuralComparisonAttribute'\.$</Expects>

module M03 =
[<ReferenceEquality(true)>]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// #Regression #Conformance #TypesAndModules #GeneratedEqualityAndHashing #Attributes

//<Expects status="error" span="(7,5-7,22)" id="FS0501">The object constructor 'ReferenceEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> ReferenceEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(8,5-8,25)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> StructuralComparisonAttribute'\.$</Expects>
//<Expects status="error" span="(9,5-9,23)" id="FS0501">The object constructor 'StructuralEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new : unit -> StructuralEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(7,5-7,22)" id="FS0501">The object constructor 'ReferenceEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> ReferenceEqualityAttribute'\.$</Expects>
//<Expects status="error" span="(8,5-8,25)" id="FS0501">The object constructor 'StructuralComparisonAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> StructuralComparisonAttribute'\.$</Expects>
//<Expects status="error" span="(9,5-9,23)" id="FS0501">The object constructor 'StructuralEqualityAttribute' takes 0 argument\(s\) but is here given 1\. The required signature is 'new: unit -> StructuralEqualityAttribute'\.$</Expects>
module M04 =
[<ReferenceEquality(true)>]
[<StructuralComparison(false)>]
Expand Down
Loading