Feature Idea: How far can we take Pyrefly's type inference? #961
              
  
  Closed
              
          
                  
                    
                      michaelfortunato
                    
                  
                
                  started this conversation in
                Ideas
              
            Replies: 2 comments
-
| 
         I believe the fact that pyrefly doesn't narrow here is a bug - if I tweak the example to https://pyrefly.org/sandbox/?code=GYJw9gtgBALgngBwJYDsDmUkQWEMogCmAboQIYA2A%2BvAoQFAAeAXJivgD5QByYKhUALw8%2BDACaFgUYAAoAlM3pRlUAEZCoAImBgwmpSqRT1g4ZtVkQmxSttRGGgMwHlRtULMWrNu8oDEmADOmPg4gYFIqhQCMGBswIQgsAAWZPgOALIAqgDKACpqAo5QyYmEAPxQLnZEpJQ0iIQyjHJAA&version=3.12, then pyrefly reveals   | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            -
| 
         Closing this discussion in favor of newly opened #997.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible for Pyrefly to see that x must be an int in the second if block as the two predicates are the same and its dependency
bhas not changed?https://pyrefly.org/sandbox/?code=MQAg6gpgNgxg9gWwiALnVALZAFAngJwgDMpcQBlAQwDsATAIzgA8AaTASwGcQuRKQADpQDmEAFCgA7lkIhccAK4gYNEJPzsUENpwyVZNWiCgR91PowUpUuAe2rCe5vCgxxqAOgkSQACQgGBsqKAiYgRKYoCoTccEQc3JyGjEwAXD4AtCAA4hDWhJRQGSjsSDYCyDBYMADW9o4REAyUtZkgAKqcyIQAbqZQAPoothAAFACUqOj2nBUw1vYR%2BIRGwxWcbRBMFRpI1NaSmhiYyACSACIAouGR0RDcrpQHyJwKAgJw%2BNajEB7CHnwrHB4AhQnltCBhHBitDaMR7Jp2O42G4%2Bvg2HkYOM2mANFo%2BHQQPgFM5cK53ME4SBaOxCPNSE45Ip8CB6Pg4JIuvgxGIiOyEOV6jxQZ9rAAqMRpJzWAA%2BIAAcu5kABeBVKsT0ECqgBERDgcG1YnY8U1yp19H02vSIBtTC1IAAzEaTVrzZbrTaQKBeJpBHBOJx2PQwmgnEtME8QHaALLtcgAFVZyAdIBkEAA-CAxJ6iRA%2BoUhiNRkxsaBev1CxU1OwoFBBOzaAoYMh%2BGtkAF2SzHtYtLXuPIlK5kG2QHhCCQyHoNqAQQIrE1wp8TrmovhzKN7AllJQujoUPhsUA&version=3.12
Beta Was this translation helpful? Give feedback.
All reactions