typeprof 0.5.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -4
- data/doc/doc.ja.md +3 -4
- data/doc/doc.md +3 -4
- data/lib/typeprof/analyzer.rb +248 -166
- data/lib/typeprof/arguments.rb +12 -6
- data/lib/typeprof/builtin.rb +123 -23
- data/lib/typeprof/cli.rb +33 -34
- data/lib/typeprof/config.rb +6 -4
- data/lib/typeprof/container-type.rb +175 -112
- data/lib/typeprof/export.rb +23 -17
- data/lib/typeprof/import.rb +58 -53
- data/lib/typeprof/method.rb +59 -125
- data/lib/typeprof/type.rb +26 -14
- data/lib/typeprof/version.rb +1 -1
- data/smoke/alias.rb +1 -0
- data/smoke/any1.rb +1 -0
- data/smoke/any2.rb +1 -0
- data/smoke/arguments.rb +1 -0
- data/smoke/arguments2.rb +1 -0
- data/smoke/array-each.rb +1 -0
- data/smoke/array-each2.rb +1 -0
- data/smoke/array-each3.rb +2 -1
- data/smoke/array-ltlt.rb +1 -0
- data/smoke/array-ltlt2.rb +1 -0
- data/smoke/array-map.rb +1 -0
- data/smoke/array-map2.rb +1 -0
- data/smoke/array-map3.rb +1 -0
- data/smoke/array-mul.rb +1 -0
- data/smoke/array-plus1.rb +1 -0
- data/smoke/array-pop.rb +1 -0
- data/smoke/array-range-aref.rb +71 -0
- data/smoke/array-replace.rb +1 -0
- data/smoke/array-s-aref.rb +1 -0
- data/smoke/array1.rb +1 -0
- data/smoke/array10.rb +1 -0
- data/smoke/array11.rb +2 -1
- data/smoke/array12.rb +1 -0
- data/smoke/array13.rb +1 -0
- data/smoke/array14.rb +1 -0
- data/smoke/array2.rb +1 -0
- data/smoke/array4.rb +1 -0
- data/smoke/array5.rb +1 -0
- data/smoke/array6.rb +3 -2
- data/smoke/array7.rb +1 -0
- data/smoke/array8.rb +1 -1
- data/smoke/array9.rb +1 -0
- data/smoke/autoload.rb +14 -0
- data/smoke/backtrace.rb +1 -0
- data/smoke/block-ambiguous.rb +1 -0
- data/smoke/block-args1-rest.rb +1 -0
- data/smoke/block-args1.rb +1 -0
- data/smoke/block-args2-rest.rb +1 -0
- data/smoke/block-args2.rb +4 -3
- data/smoke/block-args3-rest.rb +1 -0
- data/smoke/block-args3.rb +5 -4
- data/smoke/block-blockarg.rb +2 -1
- data/smoke/block-kwarg.rb +1 -0
- data/smoke/block1.rb +1 -0
- data/smoke/block10.rb +1 -0
- data/smoke/block11.rb +1 -0
- data/smoke/block12.rb +1 -0
- data/smoke/block14.rb +1 -0
- data/smoke/block2.rb +1 -0
- data/smoke/block4.rb +1 -0
- data/smoke/block5.rb +2 -1
- data/smoke/block6.rb +1 -0
- data/smoke/block7.rb +1 -0
- data/smoke/block8.rb +1 -0
- data/smoke/block9.rb +1 -0
- data/smoke/blown.rb +1 -0
- data/smoke/break1.rb +1 -0
- data/smoke/break2.rb +1 -0
- data/smoke/case.rb +1 -0
- data/smoke/case2.rb +1 -0
- data/smoke/class_method3.rb +2 -0
- data/smoke/constant2.rb +2 -2
- data/smoke/constant3.rb +1 -0
- data/smoke/constant4.rb +1 -0
- data/smoke/context-sensitive1.rb +1 -0
- data/smoke/cvar.rb +1 -0
- data/smoke/define_method.rb +16 -0
- data/smoke/define_method2.rb +18 -0
- data/smoke/demo.rb +1 -0
- data/smoke/demo1.rb +1 -0
- data/smoke/demo10.rb +1 -0
- data/smoke/demo11.rb +1 -0
- data/smoke/demo2.rb +1 -0
- data/smoke/demo3.rb +1 -0
- data/smoke/demo5.rb +1 -1
- data/smoke/demo7.rb +1 -0
- data/smoke/demo8.rb +1 -0
- data/smoke/demo9.rb +2 -1
- data/smoke/dummy-execution1.rb +1 -0
- data/smoke/ensure1.rb +1 -0
- data/smoke/enumerator.rb +1 -0
- data/smoke/expandarray1.rb +1 -0
- data/smoke/expandarray2.rb +1 -0
- data/smoke/flow1.rb +1 -0
- data/smoke/flow2.rb +1 -0
- data/smoke/flow3.rb +1 -0
- data/smoke/flow5.rb +1 -0
- data/smoke/flow6.rb +1 -0
- data/smoke/flow7.rb +1 -0
- data/smoke/flow8.rb +1 -0
- data/smoke/freeze.rb +1 -0
- data/smoke/function.rb +1 -0
- data/smoke/gvar.rb +1 -0
- data/smoke/gvar2.rb +1 -0
- data/smoke/hash-fetch.rb +1 -0
- data/smoke/hash-merge-bang.rb +1 -0
- data/smoke/hash1.rb +3 -1
- data/smoke/hash2.rb +1 -0
- data/smoke/hash3.rb +1 -0
- data/smoke/hash4.rb +2 -1
- data/smoke/inheritance2.rb +2 -2
- data/smoke/initialize.rb +1 -0
- data/smoke/int_times.rb +1 -0
- data/smoke/integer.rb +1 -0
- data/smoke/ivar.rb +1 -0
- data/smoke/ivar2.rb +1 -1
- data/smoke/kernel-class.rb +2 -1
- data/smoke/keyword1.rb +1 -0
- data/smoke/keyword2.rb +1 -0
- data/smoke/keyword3.rb +1 -0
- data/smoke/keyword4.rb +1 -0
- data/smoke/keyword5.rb +1 -0
- data/smoke/kwrest.rb +12 -0
- data/smoke/kwrest.rbs +3 -0
- data/smoke/kwsplat1.rb +2 -1
- data/smoke/kwsplat2.rb +1 -0
- data/smoke/manual-rbs.rb +1 -0
- data/smoke/manual-rbs2.rb +1 -0
- data/smoke/masgn1.rb +1 -0
- data/smoke/masgn2.rb +1 -0
- data/smoke/masgn3.rb +1 -0
- data/smoke/method_in_branch.rb +1 -0
- data/smoke/method_missing.rb +28 -0
- data/smoke/multiple-superclass.rb +1 -1
- data/smoke/next1.rb +1 -0
- data/smoke/next2.rb +1 -0
- data/smoke/object-send1.rb +1 -0
- data/smoke/once.rb +1 -0
- data/smoke/optional1.rb +1 -0
- data/smoke/optional2.rb +1 -0
- data/smoke/optional3.rb +1 -0
- data/smoke/parameterizedd-self.rb +3 -2
- data/smoke/parameterizedd-self2.rb +15 -0
- data/smoke/pathname1.rb +1 -0
- data/smoke/pathname2.rb +1 -0
- data/smoke/pattern-match1.rb +1 -0
- data/smoke/pattern-match2.rb +1 -0
- data/smoke/proc.rb +1 -0
- data/smoke/proc2.rb +1 -0
- data/smoke/proc3.rb +1 -0
- data/smoke/proc4.rb +1 -0
- data/smoke/range.rb +1 -0
- data/smoke/rbs-alias.rb +1 -0
- data/smoke/rbs-attr.rb +3 -2
- data/smoke/rbs-attr2.rb +11 -0
- data/smoke/rbs-attr2.rbs +3 -0
- data/smoke/rbs-extend.rb +1 -0
- data/smoke/rbs-interface.rb +1 -0
- data/smoke/rbs-proc1.rb +1 -0
- data/smoke/rbs-proc2.rb +1 -0
- data/smoke/rbs-proc3.rb +1 -0
- data/smoke/rbs-record.rb +1 -0
- data/smoke/rbs-tyvar.rb +1 -0
- data/smoke/rbs-tyvar2.rb +1 -0
- data/smoke/rbs-tyvar3.rb +1 -0
- data/smoke/rbs-tyvar5.rb +1 -0
- data/smoke/rbs-tyvar6.rb +18 -0
- data/smoke/rbs-tyvar6.rbs +12 -0
- data/smoke/rbs-tyvar7.rb +12 -0
- data/smoke/rbs-tyvar7.rbs +7 -0
- data/smoke/rbs-vars.rb +1 -2
- data/smoke/redo1.rb +1 -0
- data/smoke/redo2.rb +1 -0
- data/smoke/req-keyword.rb +1 -0
- data/smoke/rescue1.rb +1 -0
- data/smoke/rescue2.rb +1 -0
- data/smoke/respond_to.rb +1 -0
- data/smoke/rest-farg.rb +1 -0
- data/smoke/rest1.rb +1 -0
- data/smoke/rest2.rb +1 -0
- data/smoke/rest3.rb +1 -0
- data/smoke/rest4.rb +1 -0
- data/smoke/rest5.rb +1 -0
- data/smoke/rest6.rb +1 -0
- data/smoke/retry1.rb +1 -0
- data/smoke/return.rb +1 -0
- data/smoke/step.rb +1 -0
- data/smoke/string-split.rb +1 -0
- data/smoke/struct.rb +2 -2
- data/smoke/struct2.rb +1 -0
- data/smoke/super1.rb +1 -0
- data/smoke/super4.rb +43 -0
- data/smoke/super5.rb +36 -0
- data/smoke/svar1.rb +1 -0
- data/smoke/symbol-proc.rb +1 -0
- data/smoke/tap1.rb +1 -0
- data/smoke/toplevel.rb +1 -0
- data/smoke/two-map.rb +1 -0
- data/smoke/type_var.rb +1 -0
- data/smoke/typed_method.rb +1 -0
- data/smoke/uninitialize-var.rb +1 -0
- data/smoke/union-recv.rb +2 -2
- metadata +18 -2
data/smoke/rest6.rb
CHANGED
data/smoke/retry1.rb
CHANGED
data/smoke/return.rb
CHANGED
data/smoke/step.rb
CHANGED
data/smoke/string-split.rb
CHANGED
data/smoke/struct.rb
CHANGED
data/smoke/struct2.rb
CHANGED
data/smoke/super1.rb
CHANGED
data/smoke/super4.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
module M1
|
2
|
+
def f(m); super :M1; end
|
3
|
+
end
|
4
|
+
module M2
|
5
|
+
def f(m); super :M2; end
|
6
|
+
end
|
7
|
+
class C
|
8
|
+
def f(m); end
|
9
|
+
end
|
10
|
+
class D < C
|
11
|
+
def f(m); super :D; end
|
12
|
+
include M1
|
13
|
+
end
|
14
|
+
class E < D
|
15
|
+
def f(m); super :E; end
|
16
|
+
include M2
|
17
|
+
end
|
18
|
+
|
19
|
+
E.new.f(:top)
|
20
|
+
|
21
|
+
__END__
|
22
|
+
# Classes
|
23
|
+
module M1
|
24
|
+
def f : (:D) -> nil
|
25
|
+
end
|
26
|
+
|
27
|
+
module M2
|
28
|
+
def f : (:E) -> nil
|
29
|
+
end
|
30
|
+
|
31
|
+
class C
|
32
|
+
def f : (:M1) -> nil
|
33
|
+
end
|
34
|
+
|
35
|
+
class D < C
|
36
|
+
include M1
|
37
|
+
def f : (:M2) -> nil
|
38
|
+
end
|
39
|
+
|
40
|
+
class E < D
|
41
|
+
include M2
|
42
|
+
def f : (:top) -> nil
|
43
|
+
end
|
data/smoke/super5.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
module M
|
2
|
+
def f(m); super :M; end
|
3
|
+
end
|
4
|
+
class C
|
5
|
+
def f(m); end
|
6
|
+
end
|
7
|
+
class D < C
|
8
|
+
def f(m); super :D; end
|
9
|
+
include M
|
10
|
+
end
|
11
|
+
class E < D
|
12
|
+
def f(m); super :E; end
|
13
|
+
include M
|
14
|
+
end
|
15
|
+
|
16
|
+
E.new.f(:top)
|
17
|
+
|
18
|
+
__END__
|
19
|
+
# Classes
|
20
|
+
module M
|
21
|
+
def f : (:D | :E) -> nil
|
22
|
+
end
|
23
|
+
|
24
|
+
class C
|
25
|
+
def f : (:M) -> nil
|
26
|
+
end
|
27
|
+
|
28
|
+
class D < C
|
29
|
+
include M
|
30
|
+
def f : (:M) -> nil
|
31
|
+
end
|
32
|
+
|
33
|
+
class E < D
|
34
|
+
include M
|
35
|
+
def f : (:top) -> nil
|
36
|
+
end
|
data/smoke/svar1.rb
CHANGED
data/smoke/symbol-proc.rb
CHANGED
data/smoke/tap1.rb
CHANGED
data/smoke/toplevel.rb
CHANGED
data/smoke/two-map.rb
CHANGED
data/smoke/type_var.rb
CHANGED
data/smoke/typed_method.rb
CHANGED
data/smoke/uninitialize-var.rb
CHANGED
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
|
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
|
+
version: 0.8.0
|
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
|
+
date: 2020-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbs
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- smoke/array-plus1.rb
|
85
85
|
- smoke/array-plus2.rb
|
86
86
|
- smoke/array-pop.rb
|
87
|
+
- smoke/array-range-aref.rb
|
87
88
|
- smoke/array-replace.rb
|
88
89
|
- smoke/array-s-aref.rb
|
89
90
|
- smoke/array1.rb
|
@@ -101,6 +102,7 @@ files:
|
|
101
102
|
- smoke/array8.rb
|
102
103
|
- smoke/array9.rb
|
103
104
|
- smoke/attr.rb
|
105
|
+
- smoke/autoload.rb
|
104
106
|
- smoke/backtrace.rb
|
105
107
|
- smoke/block-ambiguous.rb
|
106
108
|
- smoke/block-args1-rest.rb
|
@@ -145,6 +147,8 @@ files:
|
|
145
147
|
- smoke/context-sensitive1.rb
|
146
148
|
- smoke/cvar.rb
|
147
149
|
- smoke/cvar2.rb
|
150
|
+
- smoke/define_method.rb
|
151
|
+
- smoke/define_method2.rb
|
148
152
|
- smoke/demo.rb
|
149
153
|
- smoke/demo1.rb
|
150
154
|
- smoke/demo10.rb
|
@@ -201,6 +205,8 @@ files:
|
|
201
205
|
- smoke/keyword3.rb
|
202
206
|
- smoke/keyword4.rb
|
203
207
|
- smoke/keyword5.rb
|
208
|
+
- smoke/kwrest.rb
|
209
|
+
- smoke/kwrest.rbs
|
204
210
|
- smoke/kwsplat1.rb
|
205
211
|
- smoke/kwsplat2.rb
|
206
212
|
- smoke/manual-rbs.rb
|
@@ -213,6 +219,7 @@ files:
|
|
213
219
|
- smoke/masgn2.rb
|
214
220
|
- smoke/masgn3.rb
|
215
221
|
- smoke/method_in_branch.rb
|
222
|
+
- smoke/method_missing.rb
|
216
223
|
- smoke/module1.rb
|
217
224
|
- smoke/module2.rb
|
218
225
|
- smoke/module3.rb
|
@@ -229,6 +236,7 @@ files:
|
|
229
236
|
- smoke/optional2.rb
|
230
237
|
- smoke/optional3.rb
|
231
238
|
- smoke/parameterizedd-self.rb
|
239
|
+
- smoke/parameterizedd-self2.rb
|
232
240
|
- smoke/pathname1.rb
|
233
241
|
- smoke/pathname2.rb
|
234
242
|
- smoke/pattern-match1.rb
|
@@ -243,6 +251,8 @@ files:
|
|
243
251
|
- smoke/rbs-alias.rbs
|
244
252
|
- smoke/rbs-attr.rb
|
245
253
|
- smoke/rbs-attr.rbs
|
254
|
+
- smoke/rbs-attr2.rb
|
255
|
+
- smoke/rbs-attr2.rbs
|
246
256
|
- smoke/rbs-extend.rb
|
247
257
|
- smoke/rbs-extend.rbs
|
248
258
|
- smoke/rbs-interface.rb
|
@@ -264,6 +274,10 @@ files:
|
|
264
274
|
- smoke/rbs-tyvar4.rb
|
265
275
|
- smoke/rbs-tyvar5.rb
|
266
276
|
- smoke/rbs-tyvar5.rbs
|
277
|
+
- smoke/rbs-tyvar6.rb
|
278
|
+
- smoke/rbs-tyvar6.rbs
|
279
|
+
- smoke/rbs-tyvar7.rb
|
280
|
+
- smoke/rbs-tyvar7.rbs
|
267
281
|
- smoke/rbs-vars.rb
|
268
282
|
- smoke/rbs-vars.rbs
|
269
283
|
- smoke/redo1.rb
|
@@ -292,6 +306,8 @@ files:
|
|
292
306
|
- smoke/super1.rb
|
293
307
|
- smoke/super2.rb
|
294
308
|
- smoke/super3.rb
|
309
|
+
- smoke/super4.rb
|
310
|
+
- smoke/super5.rb
|
295
311
|
- smoke/svar1.rb
|
296
312
|
- smoke/symbol-proc.rb
|
297
313
|
- smoke/tap1.rb
|