Skip to content

Allow let! and use! binding with type annotation without parentheses. #18508

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

Merged
merged 38 commits into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c4b40cb
new parser production rule.
edgarfgp Apr 25, 2025
0b489a1
Add let! and use! syntax tree tests
edgarfgp Apr 26, 2025
be13fe0
Update existing syntax tree tests
edgarfgp Apr 26, 2025
4e00653
try update mkSynMemberDefnGetSet
edgarfgp Apr 26, 2025
b223cd4
format code
edgarfgp Apr 26, 2025
7c592a8
try different parser rule
edgarfgp Apr 26, 2025
e3f7b8c
Add new test
edgarfgp Apr 26, 2025
43e9ea2
Revert "new parser production rule."
edgarfgp Apr 26, 2025
b26be8b
Revert "try update mkSynMemberDefnGetSet"
edgarfgp Apr 26, 2025
cbe3d48
Revert "Update existing syntax tree tests"
edgarfgp Apr 26, 2025
acb8742
update ce let! and use! test
edgarfgp Apr 26, 2025
00e687c
Merge branch 'main' into fix-10697
edgarfgp Apr 28, 2025
3034ffb
more tests
edgarfgp Apr 28, 2025
99cc8d4
reduce diff
edgarfgp Apr 28, 2025
dd416dc
release notes
edgarfgp Apr 28, 2025
5eb3102
Merge branch 'main' into fix-10697
edgarfgp Apr 30, 2025
e54cb12
more tests
edgarfgp Apr 30, 2025
9e65095
Merge branch 'main' into fix-10697
edgarfgp Apr 30, 2025
f7837a4
Merge branch 'main' into fix-10697
edgarfgp May 1, 2025
e608ce6
try headBindingPattern
edgarfgp May 1, 2025
50114d1
Update tests
edgarfgp May 1, 2025
b16bbb5
more tests
edgarfgp May 1, 2025
84ea9ba
opt_topReturnTypeWithTypeConstraints
edgarfgp May 2, 2025
2b09352
Merge branch 'main' into fix-10697
edgarfgp May 2, 2025
420a92d
Merge branch 'main' into fix-10697
edgarfgp May 5, 2025
afcfc17
Merge branch 'main' into fix-10697
edgarfgp May 6, 2025
4b22d90
Merge branch 'main' into fix-10697
edgarfgp May 7, 2025
a15afa2
Merge branch 'main' into fix-10697
edgarfgp May 12, 2025
2669c9b
Merge branch 'main' into fix-10697
edgarfgp May 13, 2025
71788e5
Merge branch 'main' into fix-10697
edgarfgp May 14, 2025
6b6e86f
Update SyntaxTree tests to include WarnDirectives
edgarfgp May 14, 2025
85a3401
Add LanguageFeature
edgarfgp May 14, 2025
fda8a38
Language release notes
edgarfgp May 14, 2025
e404fa1
Update CheckLanguageFeatureAndRecover in pars.fsy
edgarfgp May 14, 2025
05d11d8
update tests
edgarfgp May 14, 2025
0d83611
Merge branch 'main' into fix-10697
edgarfgp May 15, 2025
03f1ced
update release notes
edgarfgp May 15, 2025
64d72d8
Better naming
edgarfgp May 16, 2025
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
Update tests
  • Loading branch information
edgarfgp committed May 1, 2025
commit 50114d18871dc43c6e45b8f5dc0b7dac40f10c5f
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ ImplFile
LetOrUseBang
(Yes (4,4--4,38), false, true,
Typed
(LongIdent
(SynLongIdent ([res], [], [None]), None, None,
Pats [], None, (4,9--4,12)),
(Named (SynIdent (res, None), false, None, (4,9--4,12)),
LongIdent (SynLongIdent ([int], [], [None])),
(4,9--4,17)),
App
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ ImplFile
(LetOrUseBang
(Yes (2,0--2,31), false, true,
Typed
(LongIdent
(SynLongIdent ([x], [], [None]), None, None, Pats [], None,
(2,5--2,6)), LongIdent (SynLongIdent ([int], [], [None])),
(2,5--2,10)),
(Named (SynIdent (x, None), false, None, (2,5--2,6)),
LongIdent (SynLongIdent ([int], [], [None])), (2,5--2,10)),
App
(NonAtomic, false, Ident async,
ComputationExpr
Expand Down
3 changes: 3 additions & 0 deletions tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Module
let! _:int = async { return 1 }
let! (_:int) = async { return 2 }
47 changes: 47 additions & 0 deletions tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
ImplFile
(ParsedImplFileInput
("/root/SynType/Typed LetBang 06.fs", false, QualifiedNameOfFile Module, [],
[],
[SynModuleOrNamespace
([Module], false, NamedModule,
[Expr
(LetOrUseBang
(Yes (2,0--2,31), false, true,
Typed
(Wild (2,5--2,6),
LongIdent (SynLongIdent ([int], [], [None])), (2,5--2,10)),
App
(NonAtomic, false, Ident async,
ComputationExpr
(false,
YieldOrReturn
((false, true), Const (Int32 1, (2,28--2,29)),
(2,21--2,29), { YieldOrReturnKeyword = (2,21--2,27) }),
(2,19--2,31)), (2,13--2,31)), [],
LetOrUseBang
(Yes (3,0--3,33), false, true,
Paren
(Typed
(Wild (3,6--3,7),
LongIdent (SynLongIdent ([int], [], [None])),
(3,6--3,11)), (3,5--3,12)),
App
(NonAtomic, false, Ident async,
ComputationExpr
(false,
YieldOrReturn
((false, true), Const (Int32 2, (3,30--3,31)),
(3,23--3,31),
{ YieldOrReturnKeyword = (3,23--3,29) }),
(3,21--3,33)), (3,15--3,33)), [],
ImplicitZero (3,33--3,33), (3,0--3,33),
{ LetOrUseBangKeyword = (3,0--3,4)
EqualsRange = Some (3,13--3,14) }), (2,0--3,33),
{ LetOrUseBangKeyword = (2,0--2,4)
EqualsRange = Some (2,11--2,12) }), (2,0--3,33))],
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None,
(1,0--3,33), { LeadingKeyword = Module (1,0--1,6) })], (true, true),
{ ConditionalDirectives = []
CodeComments = [] }, set []))

(3,0)-(3,33) parse error Incomplete structured construct at or before this point in expression
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ ImplFile
LetOrUseBang
(Yes (4,4--4,38), true, true,
Typed
(LongIdent
(SynLongIdent ([res], [], [None]), None, None,
Pats [], None, (4,9--4,12)),
(Named (SynIdent (res, None), false, None, (4,9--4,12)),
LongIdent (SynLongIdent ([int], [], [None])),
(4,9--4,17)),
App
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ ImplFile
(LetOrUseBang
(Yes (3,0--3,31), true, true,
Typed
(LongIdent
(SynLongIdent ([x], [], [None]), None, None, Pats [], None,
(3,5--3,6)), LongIdent (SynLongIdent ([int], [], [None])),
(3,5--3,10)),
(Named (SynIdent (x, None), false, None, (3,5--3,6)),
LongIdent (SynLongIdent ([int], [], [None])), (3,5--3,10)),
App
(NonAtomic, false, Ident async,
ComputationExpr
Expand Down
4 changes: 4 additions & 0 deletions tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Module

use! _:int = async { return 1 }
use! (_:int) = async { return 2 }
47 changes: 47 additions & 0 deletions tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
ImplFile
(ParsedImplFileInput
("/root/SynType/Typed UseBang 04.fs", false, QualifiedNameOfFile Module, [],
[],
[SynModuleOrNamespace
([Module], false, NamedModule,
[Expr
(LetOrUseBang
(Yes (3,0--3,31), true, true,
Typed
(Wild (3,5--3,6),
LongIdent (SynLongIdent ([int], [], [None])), (3,5--3,10)),
App
(NonAtomic, false, Ident async,
ComputationExpr
(false,
YieldOrReturn
((false, true), Const (Int32 1, (3,28--3,29)),
(3,21--3,29), { YieldOrReturnKeyword = (3,21--3,27) }),
(3,19--3,31)), (3,13--3,31)), [],
LetOrUseBang
(Yes (4,0--4,33), true, true,
Paren
(Typed
(Wild (4,6--4,7),
LongIdent (SynLongIdent ([int], [], [None])),
(4,6--4,11)), (4,5--4,12)),
App
(NonAtomic, false, Ident async,
ComputationExpr
(false,
YieldOrReturn
((false, true), Const (Int32 2, (4,30--4,31)),
(4,23--4,31),
{ YieldOrReturnKeyword = (4,23--4,29) }),
(4,21--4,33)), (4,15--4,33)), [],
ImplicitZero (4,33--4,33), (4,0--4,33),
{ LetOrUseBangKeyword = (4,0--4,4)
EqualsRange = Some (4,13--4,14) }), (3,0--4,33),
{ LetOrUseBangKeyword = (3,0--3,4)
EqualsRange = Some (3,11--3,12) }), (3,0--4,33))],
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None,
(1,0--4,33), { LeadingKeyword = Module (1,0--1,6) })], (true, true),
{ ConditionalDirectives = []
CodeComments = [] }, set []))

(4,0)-(4,33) parse error Incomplete structured construct at or before this point in expression