typeprof 0.4.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +1 -2
- data/Gemfile.lock +3 -3
- data/README.md +6 -0
- data/lib/typeprof/analyzer.rb +97 -84
- data/lib/typeprof/arguments.rb +27 -19
- data/lib/typeprof/block.rb +5 -2
- data/lib/typeprof/builtin.rb +14 -4
- data/lib/typeprof/config.rb +10 -6
- data/lib/typeprof/container-type.rb +117 -101
- data/lib/typeprof/export.rb +1 -1
- data/lib/typeprof/import.rb +44 -22
- data/lib/typeprof/method.rb +70 -12
- data/lib/typeprof/type.rb +108 -89
- data/lib/typeprof/version.rb +1 -1
- data/smoke/arguments2.rb +1 -1
- data/smoke/array11.rb +1 -1
- data/smoke/array6.rb +2 -2
- data/smoke/array8.rb +1 -1
- data/smoke/block-args2.rb +3 -3
- data/smoke/block-args3.rb +4 -4
- data/smoke/block-blockarg.rb +1 -1
- data/smoke/block-kwarg.rb +1 -1
- data/smoke/block10.rb +1 -1
- data/smoke/block5.rb +1 -1
- data/smoke/constant2.rb +1 -2
- data/smoke/demo5.rb +1 -1
- data/smoke/demo9.rb +1 -1
- data/smoke/hash-fetch.rb +3 -3
- data/smoke/hash-merge-bang.rb +11 -0
- data/smoke/hash1.rb +3 -2
- data/smoke/hash3.rb +1 -1
- data/smoke/inheritance2.rb +2 -2
- data/smoke/ivar2.rb +2 -2
- data/smoke/kernel-class.rb +1 -1
- data/smoke/keyword4.rb +1 -1
- data/smoke/kwsplat1.rb +2 -2
- data/smoke/kwsplat2.rb +1 -1
- data/smoke/multiple-superclass.rb +1 -1
- data/smoke/parameterizedd-self.rb +2 -2
- data/smoke/pattern-match1.rb +23 -0
- data/smoke/pattern-match2.rb +15 -0
- data/smoke/rbs-tyvar3.rb +11 -19
- data/smoke/rbs-tyvar3.rbs +4 -3
- data/smoke/rbs-tyvar4.rb +36 -0
- data/smoke/rbs-tyvar5.rb +12 -0
- data/smoke/rbs-tyvar5.rbs +8 -0
- data/smoke/struct.rb +2 -2
- data/smoke/uninitialize-var.rb +12 -0
- data/smoke/union-recv.rb +2 -2
- data/typeprof.gemspec +1 -1
- metadata +11 -4
    
        data/smoke/union-recv.rb
    CHANGED
    
    | @@ -21,11 +21,11 @@ end | |
| 21 21 | 
             
            __END__
         | 
| 22 22 | 
             
            # Classes
         | 
| 23 23 | 
             
            class SuperBase
         | 
| 24 | 
            -
              def self.foo : -> (A | 
| 24 | 
            +
              def self.foo : -> (singleton(A) | singleton(B))
         | 
| 25 25 | 
             
            end
         | 
| 26 26 |  | 
| 27 27 | 
             
            class Base < SuperBase
         | 
| 28 | 
            -
              def self.foo : -> (A | 
| 28 | 
            +
              def self.foo : -> (singleton(A) | singleton(B))
         | 
| 29 29 | 
             
            end
         | 
| 30 30 |  | 
| 31 31 | 
             
            class A < Base
         | 
    
        data/typeprof.gemspec
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: typeprof
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.4 | 
| 4 | 
            +
              version: 0.5.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Yusuke Endoh
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020-11- | 
| 11 | 
            +
            date: 2020-11-17 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rbs
         | 
| @@ -16,14 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - ">="
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: 0. | 
| 19 | 
            +
                    version: 0.17.0
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - ">="
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: 0. | 
| 26 | 
            +
                    version: 0.17.0
         | 
| 27 27 | 
             
            description: |
         | 
| 28 28 | 
             
              TypeProf performs a type analysis of non-annotated Ruby code.
         | 
| 29 29 |  | 
| @@ -179,6 +179,7 @@ files: | |
| 179 179 | 
             
            - smoke/gvar2.rb
         | 
| 180 180 | 
             
            - smoke/gvar2.rbs
         | 
| 181 181 | 
             
            - smoke/hash-fetch.rb
         | 
| 182 | 
            +
            - smoke/hash-merge-bang.rb
         | 
| 182 183 | 
             
            - smoke/hash1.rb
         | 
| 183 184 | 
             
            - smoke/hash2.rb
         | 
| 184 185 | 
             
            - smoke/hash3.rb
         | 
| @@ -230,6 +231,8 @@ files: | |
| 230 231 | 
             
            - smoke/parameterizedd-self.rb
         | 
| 231 232 | 
             
            - smoke/pathname1.rb
         | 
| 232 233 | 
             
            - smoke/pathname2.rb
         | 
| 234 | 
            +
            - smoke/pattern-match1.rb
         | 
| 235 | 
            +
            - smoke/pattern-match2.rb
         | 
| 233 236 | 
             
            - smoke/printf.rb
         | 
| 234 237 | 
             
            - smoke/proc.rb
         | 
| 235 238 | 
             
            - smoke/proc2.rb
         | 
| @@ -258,6 +261,9 @@ files: | |
| 258 261 | 
             
            - smoke/rbs-tyvar2.rbs
         | 
| 259 262 | 
             
            - smoke/rbs-tyvar3.rb
         | 
| 260 263 | 
             
            - smoke/rbs-tyvar3.rbs
         | 
| 264 | 
            +
            - smoke/rbs-tyvar4.rb
         | 
| 265 | 
            +
            - smoke/rbs-tyvar5.rb
         | 
| 266 | 
            +
            - smoke/rbs-tyvar5.rbs
         | 
| 261 267 | 
             
            - smoke/rbs-vars.rb
         | 
| 262 268 | 
             
            - smoke/rbs-vars.rbs
         | 
| 263 269 | 
             
            - smoke/redo1.rb
         | 
| @@ -293,6 +299,7 @@ files: | |
| 293 299 | 
             
            - smoke/two-map.rb
         | 
| 294 300 | 
             
            - smoke/type_var.rb
         | 
| 295 301 | 
             
            - smoke/typed_method.rb
         | 
| 302 | 
            +
            - smoke/uninitialize-var.rb
         | 
| 296 303 | 
             
            - smoke/union-recv.rb
         | 
| 297 304 | 
             
            - smoke/user-demo.rb
         | 
| 298 305 | 
             
            - smoke/wrong-extend.rb
         |