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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yml +1 -2
  3. data/Gemfile.lock +3 -3
  4. data/README.md +6 -0
  5. data/lib/typeprof/analyzer.rb +97 -84
  6. data/lib/typeprof/arguments.rb +27 -19
  7. data/lib/typeprof/block.rb +5 -2
  8. data/lib/typeprof/builtin.rb +14 -4
  9. data/lib/typeprof/config.rb +10 -6
  10. data/lib/typeprof/container-type.rb +117 -101
  11. data/lib/typeprof/export.rb +1 -1
  12. data/lib/typeprof/import.rb +44 -22
  13. data/lib/typeprof/method.rb +70 -12
  14. data/lib/typeprof/type.rb +108 -89
  15. data/lib/typeprof/version.rb +1 -1
  16. data/smoke/arguments2.rb +1 -1
  17. data/smoke/array11.rb +1 -1
  18. data/smoke/array6.rb +2 -2
  19. data/smoke/array8.rb +1 -1
  20. data/smoke/block-args2.rb +3 -3
  21. data/smoke/block-args3.rb +4 -4
  22. data/smoke/block-blockarg.rb +1 -1
  23. data/smoke/block-kwarg.rb +1 -1
  24. data/smoke/block10.rb +1 -1
  25. data/smoke/block5.rb +1 -1
  26. data/smoke/constant2.rb +1 -2
  27. data/smoke/demo5.rb +1 -1
  28. data/smoke/demo9.rb +1 -1
  29. data/smoke/hash-fetch.rb +3 -3
  30. data/smoke/hash-merge-bang.rb +11 -0
  31. data/smoke/hash1.rb +3 -2
  32. data/smoke/hash3.rb +1 -1
  33. data/smoke/inheritance2.rb +2 -2
  34. data/smoke/ivar2.rb +2 -2
  35. data/smoke/kernel-class.rb +1 -1
  36. data/smoke/keyword4.rb +1 -1
  37. data/smoke/kwsplat1.rb +2 -2
  38. data/smoke/kwsplat2.rb +1 -1
  39. data/smoke/multiple-superclass.rb +1 -1
  40. data/smoke/parameterizedd-self.rb +2 -2
  41. data/smoke/pattern-match1.rb +23 -0
  42. data/smoke/pattern-match2.rb +15 -0
  43. data/smoke/rbs-tyvar3.rb +11 -19
  44. data/smoke/rbs-tyvar3.rbs +4 -3
  45. data/smoke/rbs-tyvar4.rb +36 -0
  46. data/smoke/rbs-tyvar5.rb +12 -0
  47. data/smoke/rbs-tyvar5.rbs +8 -0
  48. data/smoke/struct.rb +2 -2
  49. data/smoke/uninitialize-var.rb +12 -0
  50. data/smoke/union-recv.rb +2 -2
  51. data/typeprof.gemspec +1 -1
  52. metadata +11 -4
@@ -21,11 +21,11 @@ end
21
21
  __END__
22
22
  # Classes
23
23
  class SuperBase
24
- def self.foo : -> (A.class | B.class)
24
+ def self.foo : -> (singleton(A) | singleton(B))
25
25
  end
26
26
 
27
27
  class Base < SuperBase
28
- def self.foo : -> (A.class | B.class)
28
+ def self.foo : -> (singleton(A) | singleton(B))
29
29
  end
30
30
 
31
31
  class A < Base
@@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_runtime_dependency "rbs", ">= 0.16.0"
33
+ spec.add_runtime_dependency "rbs", ">= 0.17.0"
34
34
  end
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.2
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-06 00:00:00.000000000 Z
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.16.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.16.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