- 
                Notifications
    You must be signed in to change notification settings 
- Fork 834
Name resolution: keep type vars in subsequent checks #16456
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
      
      
            vzarytovskii
  merged 15 commits into
  dotnet:main
from
auduchinok:nameResolution-symbols-typeArgs
  
      
      
   
  Jan 16, 2024 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            15 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      7763fa0
              
                Keep typars produced in name resolution
              
              
                auduchinok 0b9c0ad
              
                Better debug errors
              
              
                auduchinok b3a8ec0
              
                Unwrap measure type vars
              
              
                auduchinok 0ad6b15
              
                Undo check declarations change
              
              
                auduchinok b0f0235
              
                Fix reported range
              
              
                auduchinok 12d3d9a
              
                Undo occurrence change
              
              
                auduchinok 0649805
              
                Skip path typars
              
              
                auduchinok a2a7341
              
                Add test
              
              
                auduchinok b9b1aba
              
                More freshen typar APIs properly
              
              
                auduchinok 58a6e03
              
                Fantomas
              
              
                auduchinok e1679c4
              
                Cleanup
              
              
                auduchinok 7fa6132
              
                Merge branch 'main' into nameResolution-symbols-typeArgs
              
              
                vzarytovskii 05dd468
              
                Add release notes
              
              
                auduchinok 91b796d
              
                Merge branch 'main' into nameResolution-symbols-typeArgs
              
              
                auduchinok 798e069
              
                123
              
              
                auduchinok 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
    
  
  
    
              
  
    
      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
    
  
  
    
              
      
      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.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't probably match on ttype directly, need do stripping first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure of this holds for a type instantiation, but it is a good point to add a test case with a type alias as a typar to see what it does.
If we stripped, we would lose the type alias and then it couldn't be searched for as a separate symbol... ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it'd be what we want to achieve here. I'm unwrapping the type variables produced by name resolution logic here, I probably don't want to change them in any way. Another approach could be to refactor more places and to pass the typar instantiation explicitly, but it seems that simply unwrapping it like this works for the cases we're interested in here, i.e. to make the types flow into subsequent checking phases after reporting.