Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions src/fsharp/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10920,6 +10920,8 @@ and AnalyzeRecursiveDecl
bindingAttribs, vis2, tcrefContainerInfo,
memberFlagsOpt, ty, bindingRhs, mBinding)

| SynPat.Paren(_, m) -> error(Error(FSComp.SR.tcInvalidMemberDeclNameMissingOrHasParen(), m))

| _ -> error(Error(FSComp.SR.tcOnlySimplePatternsInLetRec(), mBinding))

analyzeRecursiveDeclPat tpenv declPattern
Expand Down
1 change: 1 addition & 0 deletions src/fsharp/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1632,3 +1632,4 @@ reprStateMachineInvalidForm,"The state machine has an unexpected form"
3518,implMissingInlineIfLambda,"The 'InlineIfLambda' attribute is present in the signature but not the implementation."
3519,tcInlineIfLambdaUsedOnNonInlineFunctionOrMethod,"The 'InlineIfLambda' attribute may only be used on parameters of inlined functions of methods whose type is a function or F# delegate type."
3520,invalidXmlDocPosition,"XML comment is not placed on a valid language element."
3521,tcInvalidMemberDeclNameMissingOrHasParen,"Invalid member declaration. The name of the member is missing or has parentheses."
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">Neplatné zarovnání v interpolovaném řetězci</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">Konstruktor {0} je možné použít jenom v platném obnovitelném kódu.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">Ungültige Ausrichtung in interpolierter Zeichenfolge.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">Das Konstrukt "{0}" darf nur in einem gültigen fortsetzbaren Code verwendet werden.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">Alineación no válida en la cadena interpolada</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">La construcción "{0}" solo se puede usar en un código reanudable válido.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">Alignement non valide dans la chaîne interpolée</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">La construction «{0}» ne peut être utilisée que dans un code pouvant être repris valide.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">Allineamento non valido nella stringa interpolata</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">Il costrutto '{0}' può essere usato solo in codice ripristinabile valido.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">補間された文字列内の配置が無効です</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">コンストラクト '{0}' は、有効な再開可能コードでのみ使用できます。</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">보간 문자열의 잘못된 정렬</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">'{0}' 구문은 유효한 다시 시작 가능한 코드에서만 사용할 수 있습니다.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">Nieprawidłowe wyrównanie w ciągu interpolowanym</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">Konstrukcji "{0}" można używać tylko w prawidłowym kodzie z możliwością wznowienia.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">Alinhamento inválido na cadeia de caracteres interpolada</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">A construção '{0}' só pode ser usada em código válido e retomável.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">Недопустимое выравнивание в интерполированной строке</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">Конструкция "{0}" может использоваться только в допустимом возобновляемом коде.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">Düz metin arasına kod eklenmiş dizede geçersiz hizalama</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">'{0}' yapısı yalnızca geçerli sürdürülebilir kodda kullanılabilir.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.zh-Hans.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">内插字符串中的对齐无效</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">构造 "{0}" 只能在有效的可恢复代码中使用。</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.zh-Hant.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<target state="translated">插補字串中的對齊無效</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidMemberDeclNameMissingOrHasParen">
<source>Invalid member declaration. The name of the member is missing or has parentheses.</source>
<target state="new">Invalid member declaration. The name of the member is missing or has parentheses.</target>
<note />
</trans-unit>
<trans-unit id="tcInvalidResumableConstruct">
<source>The construct '{0}' may only be used in valid resumable code.</source>
<target state="translated">建構 '{0}' 只能用於有效的可繼續程式碼。</target>
Expand Down
3 changes: 3 additions & 0 deletions tests/fsharp/tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3042,6 +3042,9 @@ module TypecheckTests =

[<Test>]
let ``type check neg132`` () = singleVersionedNegTest (testConfig "typecheck/sigs") "5.0" "neg132"

[<Test>]
let ``type check neg133`` () = singleNegTest (testConfig "typecheck/sigs") "neg133"

[<Test>]
let ``type check neg_anon_1`` () = singleNegTest (testConfig "typecheck/sigs") "neg_anon_1"
Expand Down
4 changes: 4 additions & 0 deletions tests/fsharp/typecheck/sigs/neg133.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

neg133.fs(4,19,4,22): typecheck error FS3521: Invalid member declaration. The name of the member is missing or has parentheses.

neg133.fs(7,19,7,27): typecheck error FS3521: Invalid member declaration. The name of the member is missing or has parentheses.
7 changes: 7 additions & 0 deletions tests/fsharp/typecheck/sigs/neg133.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module Neg133

type T =
static member (y) = 0

type U =
static member (y: int) = 0