- 
                Notifications
    You must be signed in to change notification settings 
- Fork 834
          Allow return|return! yield|yield! and type annotations without parentheses
          #18533
        
          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
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            27 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      a4246f0
              
                Add new rules
              
              
                edgarfgp 5fe09e0
              
                Add syntax tree tests
              
              
                edgarfgp caeb72f
              
                Add a component test
              
              
                edgarfgp fa548f8
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp 76e5921
              
                ad recovery rules
              
              
                edgarfgp 5cd56a7
              
                Merge branch 'fix-15788' of github.com:edgarfgp/fsharp into fix-15788
              
              
                edgarfgp 9d53ca2
              
                release notes
              
              
                edgarfgp 2253c5b
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp 31d8b99
              
                release notes
              
              
                edgarfgp 5954b89
              
                Merge branch 'fix-15788' of github.com:edgarfgp/fsharp into fix-15788
              
              
                edgarfgp e0ff08d
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp 3b1e699
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp b612546
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp 6b82b9a
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp 7440bc7
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp 336fd39
              
                Update syntax tree tests to include WarnDirectives
              
              
                edgarfgp 1168259
              
                release notes
              
              
                edgarfgp 88b5c37
              
                Merge branch 'fix-15788' of github.com:edgarfgp/fsharp into fix-15788
              
              
                edgarfgp 52c115b
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp 955e13a
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp 0326067
              
                LanguageFeature.AllowTypedLetOrUseBang
              
              
                edgarfgp 80897f1
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp 5aad722
              
                fixCheckLanguageFeatureAndRecover placement
              
              
                edgarfgp 31c5eb2
              
                place YIELD rules together
              
              
                edgarfgp 2c06b5c
              
                update tests
              
              
                edgarfgp f0b55bf
              
                Merge branch 'main' into fix-15788
              
              
                edgarfgp 5cd90b0
              
                remove redundant rule
              
              
                edgarfgp File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| ### Fixed | ||
|  | ||
| * Fixed: Allow `return`, `return!`, `yield`, `yield!` type annotations without parentheses ([PR #18533](https://github.com/dotnet/fsharp/pull/18533)) | ||
| * Allow `let!` and `use!` type annotations without requiring parentheses ([PR #18508](https://github.com/dotnet/fsharp/pull/18508)) | ||
| * Fix find all references for F# exceptions ([PR #18565](https://github.com/dotnet/fsharp/pull/18565)) | ||
| * Shorthand lambda: fix completion for chained calls and analysis for unfinished expression ([PR #18560](https://github.com/dotnet/fsharp/pull/18560)) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module Module | ||
|  | ||
| let _ = | ||
| async { | ||
| return new MyType() : IDisposable | ||
| } | ||
|  | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| ImplFile | ||
| (ParsedImplFileInput | ||
| ("/root/Expression/Return 01.fs", false, QualifiedNameOfFile Module, [], | ||
| [SynModuleOrNamespace | ||
| ([Module], false, NamedModule, | ||
| [Let | ||
| (false, | ||
| [SynBinding | ||
| (None, Normal, false, false, [], | ||
| PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), | ||
| SynValData | ||
| (None, SynValInfo ([], SynArgInfo ([], false, None)), None), | ||
| Wild (3,4--3,5), None, | ||
| App | ||
| (NonAtomic, false, Ident async, | ||
| ComputationExpr | ||
| (false, | ||
| YieldOrReturn | ||
| ((false, true), | ||
| Typed | ||
| (New | ||
| (false, | ||
| LongIdent (SynLongIdent ([MyType], [], [None])), | ||
| Const (Unit, (5,25--5,27)), (5,15--5,27)), | ||
| LongIdent | ||
| (SynLongIdent ([IDisposable], [], [None])), | ||
| (5,15--5,41)), (5,8--5,41), | ||
| { YieldOrReturnKeyword = (5,8--5,14) }), (4,10--6,5)), | ||
| (4,4--6,5)), (3,4--3,5), NoneAtLet, | ||
| { LeadingKeyword = Let (3,0--3,3) | ||
| InlineKeyword = None | ||
| EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], | ||
| PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, | ||
| (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), | ||
| { ConditionalDirectives = [] | ||
| WarnDirectives = [] | ||
| CodeComments = [] }, set [])) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module Module | ||
|  | ||
| let _ = | ||
| async { | ||
| return (new MyType() : IDisposable) | ||
| } | ||
|  | 
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.