typeprof 0.20.0 → 0.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/doc/ide.md +81 -0
- data/doc/typeprof-for-ide-log.png +0 -0
- data/doc/typeprof-for-ide.png +0 -0
- data/lib/typeprof/analyzer.rb +7 -2
- data/lib/typeprof/cli.rb +1 -3
- data/lib/typeprof/config.rb +1 -5
- data/lib/typeprof/import.rb +22 -19
- data/lib/typeprof/iseq.rb +5 -0
- data/lib/typeprof/lsp.rb +40 -21
- data/lib/typeprof/version.rb +1 -1
- data/lib/typeprof.rb +0 -5
- data/typeprof.gemspec +1 -1
- metadata +5 -331
- data/smoke/alias.rb +0 -31
- data/smoke/alias2.rb +0 -21
- data/smoke/any-cbase.rb +0 -5
- data/smoke/any1.rb +0 -16
- data/smoke/any2.rb +0 -18
- data/smoke/arguments.rb +0 -17
- data/smoke/arguments2.rb +0 -56
- data/smoke/array-each.rb +0 -15
- data/smoke/array-each2.rb +0 -16
- data/smoke/array-each3.rb +0 -13
- data/smoke/array-ltlt.rb +0 -14
- data/smoke/array-ltlt2.rb +0 -17
- data/smoke/array-map.rb +0 -12
- data/smoke/array-map2.rb +0 -11
- data/smoke/array-map3.rb +0 -23
- data/smoke/array-mul.rb +0 -18
- data/smoke/array-plus1.rb +0 -11
- data/smoke/array-plus2.rb +0 -16
- data/smoke/array-pop.rb +0 -12
- data/smoke/array-range-aref.rb +0 -71
- data/smoke/array-replace.rb +0 -13
- data/smoke/array-s-aref.rb +0 -12
- data/smoke/array1.rb +0 -27
- data/smoke/array10.rb +0 -15
- data/smoke/array11.rb +0 -14
- data/smoke/array12.rb +0 -25
- data/smoke/array13.rb +0 -31
- data/smoke/array14.rb +0 -14
- data/smoke/array15.rb +0 -16
- data/smoke/array2.rb +0 -28
- data/smoke/array3.rb +0 -26
- data/smoke/array4.rb +0 -15
- data/smoke/array5.rb +0 -14
- data/smoke/array6.rb +0 -17
- data/smoke/array7.rb +0 -14
- data/smoke/array8.rb +0 -13
- data/smoke/array9.rb +0 -13
- data/smoke/attr-module.rb +0 -24
- data/smoke/attr-vis.rb +0 -43
- data/smoke/attr-vis.rbs +0 -4
- data/smoke/attr.rb +0 -28
- data/smoke/autoload.rb +0 -14
- data/smoke/backtrace.rb +0 -33
- data/smoke/block-ambiguous.rb +0 -37
- data/smoke/block-args1-rest.rb +0 -64
- data/smoke/block-args1.rb +0 -60
- data/smoke/block-args2-rest.rb +0 -64
- data/smoke/block-args2.rb +0 -60
- data/smoke/block-args3-rest.rb +0 -75
- data/smoke/block-args3.rb +0 -71
- data/smoke/block-blockarg.rb +0 -28
- data/smoke/block-kwarg.rb +0 -53
- data/smoke/block1.rb +0 -23
- data/smoke/block10.rb +0 -15
- data/smoke/block11.rb +0 -40
- data/smoke/block12.rb +0 -23
- data/smoke/block13.rb +0 -9
- data/smoke/block13.rbs +0 -3
- data/smoke/block14.rb +0 -18
- data/smoke/block2.rb +0 -15
- data/smoke/block3.rb +0 -38
- data/smoke/block4.rb +0 -19
- data/smoke/block5.rb +0 -21
- data/smoke/block6.rb +0 -21
- data/smoke/block7.rb +0 -19
- data/smoke/block8.rb +0 -28
- data/smoke/block9.rb +0 -13
- data/smoke/block_given.rb +0 -37
- data/smoke/blown.rb +0 -13
- data/smoke/break1.rb +0 -19
- data/smoke/break2.rb +0 -16
- data/smoke/break3.rb +0 -13
- data/smoke/break4.rb +0 -17
- data/smoke/case.rb +0 -17
- data/smoke/case2.rb +0 -18
- data/smoke/case3.rb +0 -17
- data/smoke/class-hierarchy.rb +0 -54
- data/smoke/class-hierarchy2.rb +0 -27
- data/smoke/class-new.rb +0 -15
- data/smoke/class.rb +0 -7
- data/smoke/class_eval.rb +0 -22
- data/smoke/class_instance_var.rb +0 -9
- data/smoke/class_method.rb +0 -25
- data/smoke/class_method2.rb +0 -21
- data/smoke/class_method3.rb +0 -29
- data/smoke/constant1.rb +0 -46
- data/smoke/constant2.rb +0 -36
- data/smoke/constant3.rb +0 -10
- data/smoke/constant4.rb +0 -12
- data/smoke/context-sensitive1.rb +0 -13
- data/smoke/cvar.rb +0 -31
- data/smoke/cvar2.rb +0 -17
- data/smoke/define_method.rb +0 -16
- data/smoke/define_method2.rb +0 -18
- data/smoke/define_method3.rb +0 -14
- data/smoke/define_method3.rbs +0 -3
- data/smoke/define_method4.rb +0 -15
- data/smoke/define_method4.rbs +0 -3
- data/smoke/define_method5.rb +0 -12
- data/smoke/define_method6.rb +0 -19
- data/smoke/define_method7.rb +0 -18
- data/smoke/demo.rb +0 -81
- data/smoke/demo1.rb +0 -17
- data/smoke/demo10.rb +0 -21
- data/smoke/demo11.rb +0 -12
- data/smoke/demo2.rb +0 -15
- data/smoke/demo3.rb +0 -17
- data/smoke/demo4.rb +0 -27
- data/smoke/demo5.rb +0 -16
- data/smoke/demo6.rb +0 -22
- data/smoke/demo7.rb +0 -15
- data/smoke/demo8.rb +0 -19
- data/smoke/demo9.rb +0 -18
- data/smoke/dummy-execution1.rb +0 -15
- data/smoke/dummy-execution2.rb +0 -16
- data/smoke/dummy_element.rb +0 -14
- data/smoke/ensure1.rb +0 -21
- data/smoke/enum_for.rb +0 -15
- data/smoke/enum_for2.rb +0 -17
- data/smoke/enumerator.rb +0 -16
- data/smoke/expandarray1.rb +0 -23
- data/smoke/expandarray2.rb +0 -24
- data/smoke/extended.rb +0 -38
- data/smoke/fib.rb +0 -28
- data/smoke/flip-flop.rb +0 -28
- data/smoke/flow1.rb +0 -17
- data/smoke/flow10.rb +0 -17
- data/smoke/flow11.rb +0 -17
- data/smoke/flow2.rb +0 -15
- data/smoke/flow3.rb +0 -15
- data/smoke/flow4.rb +0 -5
- data/smoke/flow5.rb +0 -20
- data/smoke/flow6.rb +0 -20
- data/smoke/flow7.rb +0 -21
- data/smoke/flow8.rb +0 -14
- data/smoke/flow9.rb +0 -12
- data/smoke/for.rb +0 -9
- data/smoke/freeze.rb +0 -12
- data/smoke/function.rb +0 -17
- data/smoke/gvar.rb +0 -14
- data/smoke/gvar2.rb +0 -15
- data/smoke/gvar2.rbs +0 -1
- data/smoke/hash-bot.rb +0 -12
- data/smoke/hash-fetch.rb +0 -28
- data/smoke/hash-merge-bang.rb +0 -12
- data/smoke/hash1.rb +0 -20
- data/smoke/hash2.rb +0 -13
- data/smoke/hash3.rb +0 -14
- data/smoke/hash4.rb +0 -11
- data/smoke/hash5.rb +0 -14
- data/smoke/huge_union.rb +0 -86
- data/smoke/identifier_keywords.rb +0 -17
- data/smoke/included.rb +0 -38
- data/smoke/inheritance.rb +0 -34
- data/smoke/inheritance2.rb +0 -35
- data/smoke/inherited.rb +0 -26
- data/smoke/initialize.rb +0 -28
- data/smoke/instance_eval.rb +0 -18
- data/smoke/instance_eval2.rb +0 -10
- data/smoke/instance_eval3.rb +0 -25
- data/smoke/instance_eval4.rb +0 -12
- data/smoke/int_times.rb +0 -15
- data/smoke/integer.rb +0 -11
- data/smoke/ivar.rb +0 -31
- data/smoke/ivar2.rb +0 -30
- data/smoke/ivar3.rb +0 -17
- data/smoke/ivar3.rbs +0 -3
- data/smoke/ivar4.rb +0 -21
- data/smoke/kernel-class.rb +0 -13
- data/smoke/keyword1.rb +0 -12
- data/smoke/keyword2.rb +0 -12
- data/smoke/keyword3.rb +0 -12
- data/smoke/keyword4.rb +0 -12
- data/smoke/keyword5.rb +0 -16
- data/smoke/kwrest.rb +0 -13
- data/smoke/kwrest.rbs +0 -3
- data/smoke/kwsplat1.rb +0 -43
- data/smoke/kwsplat2.rb +0 -13
- data/smoke/lit-complex.rb +0 -10
- data/smoke/lit-encoding.rb +0 -10
- data/smoke/manual-rbs.rb +0 -29
- data/smoke/manual-rbs.rbs +0 -3
- data/smoke/manual-rbs2.rb +0 -21
- data/smoke/manual-rbs2.rbs +0 -8
- data/smoke/manual-rbs3.rb +0 -13
- data/smoke/manual-rbs3.rbs +0 -3
- data/smoke/masgn1.rb +0 -14
- data/smoke/masgn2.rb +0 -18
- data/smoke/masgn3.rb +0 -13
- data/smoke/method_in_branch.rb +0 -23
- data/smoke/method_missing.rb +0 -29
- data/smoke/module1.rb +0 -29
- data/smoke/module2.rb +0 -28
- data/smoke/module3.rb +0 -33
- data/smoke/module4.rb +0 -35
- data/smoke/module5.rb +0 -17
- data/smoke/module6.rb +0 -40
- data/smoke/module_function1.rb +0 -29
- data/smoke/module_function2.rb +0 -29
- data/smoke/multiple-include.rb +0 -15
- data/smoke/multiple-superclass.rb +0 -28
- data/smoke/next1.rb +0 -21
- data/smoke/next2.rb +0 -17
- data/smoke/noname.rb +0 -9
- data/smoke/object-send1.rb +0 -23
- data/smoke/object-send2.rb +0 -10
- data/smoke/object-send3.rb +0 -18
- data/smoke/once.rb +0 -13
- data/smoke/optional1.rb +0 -14
- data/smoke/optional2.rb +0 -16
- data/smoke/optional3.rb +0 -11
- data/smoke/or_raise.rb +0 -18
- data/smoke/parameterizedd-self.rb +0 -20
- data/smoke/parameterizedd-self2.rb +0 -15
- data/smoke/pathname1.rb +0 -14
- data/smoke/pathname2.rb +0 -14
- data/smoke/pattern-match1.rb +0 -19
- data/smoke/pattern-match2.rb +0 -16
- data/smoke/prepend1.rb +0 -33
- data/smoke/prepend2.rb +0 -10
- data/smoke/prepend2.rbs +0 -9
- data/smoke/primitive_method.rb +0 -19
- data/smoke/printf.rb +0 -20
- data/smoke/proc.rb +0 -20
- data/smoke/proc2.rb +0 -17
- data/smoke/proc3.rb +0 -15
- data/smoke/proc4.rb +0 -12
- data/smoke/proc5.rb +0 -19
- data/smoke/proc6.rb +0 -13
- data/smoke/proc7.rb +0 -32
- data/smoke/public.rb +0 -38
- data/smoke/range.rb +0 -14
- data/smoke/rbs-alias.rb +0 -10
- data/smoke/rbs-alias.rbs +0 -4
- data/smoke/rbs-attr.rb +0 -27
- data/smoke/rbs-attr.rbs +0 -5
- data/smoke/rbs-attr2.rb +0 -11
- data/smoke/rbs-attr2.rbs +0 -3
- data/smoke/rbs-extend.rb +0 -10
- data/smoke/rbs-extend.rbs +0 -7
- data/smoke/rbs-interface.rb +0 -25
- data/smoke/rbs-interface.rbs +0 -12
- data/smoke/rbs-module.rb +0 -26
- data/smoke/rbs-module.rbs +0 -4
- data/smoke/rbs-opt-and-rest.rb +0 -10
- data/smoke/rbs-opt-and-rest.rbs +0 -3
- data/smoke/rbs-proc1.rb +0 -10
- data/smoke/rbs-proc1.rbs +0 -3
- data/smoke/rbs-proc2.rb +0 -21
- data/smoke/rbs-proc2.rbs +0 -3
- data/smoke/rbs-proc3.rb +0 -14
- data/smoke/rbs-proc3.rbs +0 -4
- data/smoke/rbs-record.rb +0 -18
- data/smoke/rbs-record.rbs +0 -4
- data/smoke/rbs-tyvar.rb +0 -19
- data/smoke/rbs-tyvar.rbs +0 -5
- data/smoke/rbs-tyvar2.rb +0 -21
- data/smoke/rbs-tyvar2.rbs +0 -9
- data/smoke/rbs-tyvar3.rb +0 -18
- data/smoke/rbs-tyvar3.rbs +0 -5
- data/smoke/rbs-tyvar4.rb +0 -37
- data/smoke/rbs-tyvar5.rb +0 -13
- data/smoke/rbs-tyvar5.rbs +0 -8
- data/smoke/rbs-tyvar6.rb +0 -18
- data/smoke/rbs-tyvar6.rbs +0 -12
- data/smoke/rbs-tyvar7.rb +0 -12
- data/smoke/rbs-tyvar7.rbs +0 -7
- data/smoke/rbs-vars.rb +0 -35
- data/smoke/rbs-vars.rbs +0 -7
- data/smoke/redo1.rb +0 -22
- data/smoke/redo2.rb +0 -23
- data/smoke/req-keyword.rb +0 -13
- data/smoke/require1.rb +0 -13
- data/smoke/require2.rb +0 -13
- data/smoke/rescue1.rb +0 -21
- data/smoke/rescue2.rb +0 -23
- data/smoke/rescue3.rb +0 -20
- data/smoke/rescue4.rb +0 -17
- data/smoke/respond_to.rb +0 -23
- data/smoke/rest-farg.rb +0 -11
- data/smoke/rest1.rb +0 -26
- data/smoke/rest2.rb +0 -31
- data/smoke/rest3.rb +0 -37
- data/smoke/rest4.rb +0 -19
- data/smoke/rest5.rb +0 -11
- data/smoke/rest6.rb +0 -12
- data/smoke/retry1.rb +0 -21
- data/smoke/return.rb +0 -14
- data/smoke/reveal.rb +0 -13
- data/smoke/simple.rb +0 -12
- data/smoke/singleton_class.rb +0 -8
- data/smoke/singleton_method.rb +0 -12
- data/smoke/step.rb +0 -18
- data/smoke/string-split.rb +0 -12
- data/smoke/struct-keyword_init.rb +0 -10
- data/smoke/struct.rb +0 -13
- data/smoke/struct2.rb +0 -25
- data/smoke/struct3.rb +0 -14
- data/smoke/struct4.rb +0 -7
- data/smoke/struct5.rb +0 -16
- data/smoke/struct6.rb +0 -15
- data/smoke/struct7.rb +0 -17
- data/smoke/stub-keyword.rb +0 -10
- data/smoke/super1.rb +0 -69
- data/smoke/super2.rb +0 -16
- data/smoke/super3.rb +0 -20
- data/smoke/super4.rb +0 -45
- data/smoke/super5.rb +0 -38
- data/smoke/svar1.rb +0 -13
- data/smoke/symbol-proc-attr.rb +0 -22
- data/smoke/symbol-proc-attr2.rb +0 -15
- data/smoke/symbol-proc-bot.rb +0 -13
- data/smoke/symbol-proc.rb +0 -25
- data/smoke/tap1.rb +0 -18
- data/smoke/toplevel.rb +0 -13
- data/smoke/two-map.rb +0 -18
- data/smoke/type_var.rb +0 -11
- data/smoke/typed_method.rb +0 -16
- data/smoke/uninitialize-var.rb +0 -13
- data/smoke/union-recv.rb +0 -35
- data/smoke/user-demo.rb +0 -15
- data/smoke/wrong-extend.rb +0 -27
- data/smoke/wrong-include.rb +0 -27
- data/smoke/wrong-include2.rb +0 -17
- data/smoke/wrong-rbs.rb +0 -15
- data/smoke/wrong-rbs.rbs +0 -7
- data/testbed/ao.rb +0 -297
- data/testbed/diff-lcs-entrypoint.rb +0 -4
- data/testbed/goodcheck-Gemfile.lock +0 -51
data/smoke/block-args1.rb
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
def f1(&blk)
|
2
|
-
yield
|
3
|
-
blk
|
4
|
-
end
|
5
|
-
def log1(a, o, c); end
|
6
|
-
f1 do |a, o=:opt, c|
|
7
|
-
log1(a, o, c)
|
8
|
-
end
|
9
|
-
|
10
|
-
def f2(&blk)
|
11
|
-
yield :a
|
12
|
-
blk
|
13
|
-
end
|
14
|
-
def log2(a, o, c); end
|
15
|
-
f2 do |a, o=:opt, c|
|
16
|
-
log2(a, o, c)
|
17
|
-
end
|
18
|
-
|
19
|
-
def f3(&blk)
|
20
|
-
yield :a, :b
|
21
|
-
blk
|
22
|
-
end
|
23
|
-
def log3(a, o, c); end
|
24
|
-
f3 do |a, o=:opt, c|
|
25
|
-
log3(a, o, c)
|
26
|
-
end
|
27
|
-
|
28
|
-
def f4(&blk)
|
29
|
-
yield :a, :b, :c
|
30
|
-
blk
|
31
|
-
end
|
32
|
-
def log4(a, o, c); end
|
33
|
-
f4 do |a, o=:opt, c|
|
34
|
-
log4(a, o, c)
|
35
|
-
end
|
36
|
-
|
37
|
-
def f5(&blk)
|
38
|
-
yield :a, :b, :c, :d
|
39
|
-
blk
|
40
|
-
end
|
41
|
-
def log5(a, o, c); end
|
42
|
-
f5 do |a, o=:opt, c|
|
43
|
-
log5(a, o, c)
|
44
|
-
end
|
45
|
-
|
46
|
-
__END__
|
47
|
-
# Classes
|
48
|
-
class Object
|
49
|
-
private
|
50
|
-
def f1: { -> nil } -> ^(nil, ?:opt, nil) -> nil
|
51
|
-
def log1: (nil a, :opt o, nil c) -> nil
|
52
|
-
def f2: { (:a) -> nil } -> ^(:a, ?:opt, nil) -> nil
|
53
|
-
def log2: (:a a, :opt o, nil c) -> nil
|
54
|
-
def f3: { (:a, :b) -> nil } -> ^(:a, ?:opt, :b) -> nil
|
55
|
-
def log3: (:a a, :opt o, :b c) -> nil
|
56
|
-
def f4: { (:a, :b, :c) -> nil } -> (^(:a, ?:b | :opt, :c) -> nil)
|
57
|
-
def log4: (:a a, :b | :opt o, :c c) -> nil
|
58
|
-
def f5: { (:a, :b, :c, :d) -> nil } -> (^(:a, ?:b | :opt, :c) -> nil)
|
59
|
-
def log5: (:a a, :b | :opt o, :c c) -> nil
|
60
|
-
end
|
data/smoke/block-args2-rest.rb
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
StringArray = ["str"] + ["str"]
|
2
|
-
|
3
|
-
def f1(&blk)
|
4
|
-
yield *StringArray
|
5
|
-
blk
|
6
|
-
end
|
7
|
-
def log1(a, r, c); end
|
8
|
-
f1 do |a, *r, c|
|
9
|
-
log1(a, r, c)
|
10
|
-
end
|
11
|
-
|
12
|
-
def f2(&blk)
|
13
|
-
yield :a, *StringArray
|
14
|
-
blk
|
15
|
-
end
|
16
|
-
def log2(a, r, c); end
|
17
|
-
f2 do |a, *r, c|
|
18
|
-
log2(a, r, c)
|
19
|
-
end
|
20
|
-
|
21
|
-
def f3(&blk)
|
22
|
-
yield :a, :b, *StringArray
|
23
|
-
blk
|
24
|
-
end
|
25
|
-
def log3(a, r, c); end
|
26
|
-
f3 do |a, *r, c|
|
27
|
-
log3(a, r, c)
|
28
|
-
end
|
29
|
-
|
30
|
-
def f4(&blk)
|
31
|
-
yield :a, :b, :c, *StringArray
|
32
|
-
blk
|
33
|
-
end
|
34
|
-
def log4(a, r, c); end
|
35
|
-
f4 do |a, *r, c|
|
36
|
-
log4(a, r, c)
|
37
|
-
end
|
38
|
-
|
39
|
-
def f5(&blk)
|
40
|
-
yield :a, :b, :c, :d, *StringArray
|
41
|
-
blk
|
42
|
-
end
|
43
|
-
def log5(a, r, c); end
|
44
|
-
f5 do |a, *r, c|
|
45
|
-
log5(a, r, c)
|
46
|
-
end
|
47
|
-
|
48
|
-
__END__
|
49
|
-
# Classes
|
50
|
-
class Object
|
51
|
-
StringArray: Array[String]
|
52
|
-
|
53
|
-
private
|
54
|
-
def f1: { (*String) -> nil } -> ^(String, *String, String) -> nil
|
55
|
-
def log1: (String a, Array[String] r, String c) -> nil
|
56
|
-
def f2: { (:a, *String) -> nil } -> ^(:a, *String, String) -> nil
|
57
|
-
def log2: (:a a, Array[String] r, String c) -> nil
|
58
|
-
def f3: { (:a, :b, *String) -> nil } -> (^(:a, *:b | String, :b | String) -> nil)
|
59
|
-
def log3: (:a a, Array[:b | String] r, :b | String c) -> nil
|
60
|
-
def f4: { (:a, :b, :c, *String) -> nil } -> (^(:a, *:b | :c | String, :c | String) -> nil)
|
61
|
-
def log4: (:a a, Array[:b | :c | String] r, :c | String c) -> nil
|
62
|
-
def f5: { (:a, :b, :c, :d, *String) -> nil } -> (^(:a, *:b | :c | :d | String, :d | String) -> nil)
|
63
|
-
def log5: (:a a, Array[:b | :c | :d | String] r, :d | String c) -> nil
|
64
|
-
end
|
data/smoke/block-args2.rb
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
def f1(&blk)
|
2
|
-
yield
|
3
|
-
blk
|
4
|
-
end
|
5
|
-
def log1(a, r, c); end
|
6
|
-
f1 do |a, *r, c|
|
7
|
-
log1(a, r, c)
|
8
|
-
end
|
9
|
-
|
10
|
-
def f2(&blk)
|
11
|
-
yield :a
|
12
|
-
blk
|
13
|
-
end
|
14
|
-
def log2(a, r, c); end
|
15
|
-
f2 do |a, *r, c|
|
16
|
-
log2(a, r, c)
|
17
|
-
end
|
18
|
-
|
19
|
-
def f3(&blk)
|
20
|
-
yield :a, :b
|
21
|
-
blk
|
22
|
-
end
|
23
|
-
def log3(a, r, c); end
|
24
|
-
f3 do |a, *r, c|
|
25
|
-
log3(a, r, c)
|
26
|
-
end
|
27
|
-
|
28
|
-
def f4(&blk)
|
29
|
-
yield :a, :b, :c
|
30
|
-
blk
|
31
|
-
end
|
32
|
-
def log4(a, r, c); end
|
33
|
-
f4 do |a, *r, c|
|
34
|
-
log4(a, r, c)
|
35
|
-
end
|
36
|
-
|
37
|
-
def f5(&blk)
|
38
|
-
yield :a, :b, :c, :d
|
39
|
-
blk
|
40
|
-
end
|
41
|
-
def log5(a, r, c); end
|
42
|
-
f5 do |a, *r, c|
|
43
|
-
log5(a, r, c)
|
44
|
-
end
|
45
|
-
|
46
|
-
__END__
|
47
|
-
# Classes
|
48
|
-
class Object
|
49
|
-
private
|
50
|
-
def f1: { -> nil } -> ^(nil, *bot, nil) -> nil
|
51
|
-
def log1: (nil a, Array[untyped] r, nil c) -> nil
|
52
|
-
def f2: { (:a) -> nil } -> ^(:a, *bot, nil) -> nil
|
53
|
-
def log2: (:a a, Array[untyped] r, nil c) -> nil
|
54
|
-
def f3: { (:a, :b) -> nil } -> ^(:a, *bot, :b) -> nil
|
55
|
-
def log3: (:a a, Array[untyped] r, :b c) -> nil
|
56
|
-
def f4: { (:a, :b, :c) -> nil } -> ^(:a, *:b, :c) -> nil
|
57
|
-
def log4: (:a a, [:b] r, :c c) -> nil
|
58
|
-
def f5: { (:a, :b, :c, :d) -> nil } -> (^(:a, *:b | :c, :d) -> nil)
|
59
|
-
def log5: (:a a, [:b, :c] r, :d c) -> nil
|
60
|
-
end
|
data/smoke/block-args3-rest.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
StringArray = ["str"] + ["str"]
|
2
|
-
|
3
|
-
def f1(&blk)
|
4
|
-
yield *StringArray
|
5
|
-
blk
|
6
|
-
end
|
7
|
-
def log1(a, o, r, c); end
|
8
|
-
f1 do |a, o=:opt, *r, c|
|
9
|
-
log1(a, o, r, c)
|
10
|
-
end
|
11
|
-
|
12
|
-
def f2(&blk)
|
13
|
-
yield :a, *StringArray
|
14
|
-
blk
|
15
|
-
end
|
16
|
-
def log2(a, o, r, c); end
|
17
|
-
f2 do |a, o=:opt, *r, c|
|
18
|
-
log2(a, o, r, c)
|
19
|
-
end
|
20
|
-
|
21
|
-
def f3(&blk)
|
22
|
-
yield :a, :b, *StringArray
|
23
|
-
blk
|
24
|
-
end
|
25
|
-
def log3(a, o, r, c); end
|
26
|
-
f3 do |a, o=:opt, *r, c|
|
27
|
-
log3(a, o, r, c)
|
28
|
-
end
|
29
|
-
|
30
|
-
def f4(&blk)
|
31
|
-
yield :a, :b, :c, *StringArray
|
32
|
-
blk
|
33
|
-
end
|
34
|
-
def log4(a, o, r, c); end
|
35
|
-
f4 do |a, o=:opt, *r, c|
|
36
|
-
log4(a, o, r, c)
|
37
|
-
end
|
38
|
-
|
39
|
-
def f5(&blk)
|
40
|
-
yield :a, :b, :c, :d, *StringArray
|
41
|
-
blk
|
42
|
-
end
|
43
|
-
def log5(a, o, r, c); end
|
44
|
-
f5 do |a, o=:opt, *r, c|
|
45
|
-
log5(a, o, r, c)
|
46
|
-
end
|
47
|
-
|
48
|
-
def f6(&blk)
|
49
|
-
yield :a, :b, :c, :d, :e, *StringArray
|
50
|
-
blk
|
51
|
-
end
|
52
|
-
def log6(a, o, r, c); end
|
53
|
-
f6 do |a, o=:opt, *r, c|
|
54
|
-
log6(a, o, r, c)
|
55
|
-
end
|
56
|
-
|
57
|
-
__END__
|
58
|
-
# Classes
|
59
|
-
class Object
|
60
|
-
StringArray: Array[String]
|
61
|
-
|
62
|
-
private
|
63
|
-
def f1: { (*String) -> nil } -> (^(String, ?:opt | String, *String, String) -> nil)
|
64
|
-
def log1: (String a, :opt | String o, Array[String] r, String c) -> nil
|
65
|
-
def f2: { (:a, *String) -> nil } -> (^(:a, ?:opt | String, *String, String) -> nil)
|
66
|
-
def log2: (:a a, :opt | String o, Array[String] r, String c) -> nil
|
67
|
-
def f3: { (:a, :b, *String) -> nil } -> (^(:a, ?:b | :opt, *String, :b | String) -> nil)
|
68
|
-
def log3: (:a a, :b | :opt o, Array[String] r, :b | String c) -> nil
|
69
|
-
def f4: { (:a, :b, :c, *String) -> nil } -> (^(:a, ?:b | :opt, *:c | String, :c | String) -> nil)
|
70
|
-
def log4: (:a a, :b | :opt o, Array[:c | String] r, :c | String c) -> nil
|
71
|
-
def f5: { (:a, :b, :c, :d, *String) -> nil } -> (^(:a, ?:b | :opt, *:c | :d | String, :d | String) -> nil)
|
72
|
-
def log5: (:a a, :b | :opt o, Array[:c | :d | String] r, :d | String c) -> nil
|
73
|
-
def f6: { (:a, :b, :c, :d, :e, *String) -> nil } -> (^(:a, ?:b | :opt, *:c | :d | :e | String, :e | String) -> nil)
|
74
|
-
def log6: (:a a, :b | :opt o, Array[:c | :d | :e | String] r, :e | String c) -> nil
|
75
|
-
end
|
data/smoke/block-args3.rb
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
def f1(&blk)
|
2
|
-
yield
|
3
|
-
blk
|
4
|
-
end
|
5
|
-
def log1(a, o, r, c); end
|
6
|
-
f1 do |a, o=:opt, *r, c|
|
7
|
-
log1(a, o, r, c)
|
8
|
-
end
|
9
|
-
|
10
|
-
def f2(&blk)
|
11
|
-
yield :a
|
12
|
-
blk
|
13
|
-
end
|
14
|
-
def log2(a, o, r, c); end
|
15
|
-
f2 do |a, o=:opt, *r, c|
|
16
|
-
log2(a, o, r, c)
|
17
|
-
end
|
18
|
-
|
19
|
-
def f3(&blk)
|
20
|
-
yield :a, :b
|
21
|
-
blk
|
22
|
-
end
|
23
|
-
def log3(a, o, r, c); end
|
24
|
-
f3 do |a, o=:opt, *r, c|
|
25
|
-
log3(a, o, r, c)
|
26
|
-
end
|
27
|
-
|
28
|
-
def f4(&blk)
|
29
|
-
yield :a, :b, :c
|
30
|
-
blk
|
31
|
-
end
|
32
|
-
def log4(a, o, r, c); end
|
33
|
-
f4 do |a, o=:opt, *r, c|
|
34
|
-
log4(a, o, r, c)
|
35
|
-
end
|
36
|
-
|
37
|
-
def f5(&blk)
|
38
|
-
yield :a, :b, :c, :d
|
39
|
-
blk
|
40
|
-
end
|
41
|
-
def log5(a, o, r, c); end
|
42
|
-
f5 do |a, o=:opt, *r, c|
|
43
|
-
log5(a, o, r, c)
|
44
|
-
end
|
45
|
-
|
46
|
-
def f6(&blk)
|
47
|
-
yield :a, :b, :c, :d, :e
|
48
|
-
blk
|
49
|
-
end
|
50
|
-
def log6(a, o, r, c); end
|
51
|
-
f6 do |a, o=:opt, *r, c|
|
52
|
-
log6(a, o, r, c)
|
53
|
-
end
|
54
|
-
|
55
|
-
__END__
|
56
|
-
# Classes
|
57
|
-
class Object
|
58
|
-
private
|
59
|
-
def f1: { -> nil } -> ^(nil, ?:opt, *bot, nil) -> nil
|
60
|
-
def log1: (nil a, :opt o, Array[untyped] r, nil c) -> nil
|
61
|
-
def f2: { (:a) -> nil } -> ^(:a, ?:opt, *bot, nil) -> nil
|
62
|
-
def log2: (:a a, :opt o, Array[untyped] r, nil c) -> nil
|
63
|
-
def f3: { (:a, :b) -> nil } -> ^(:a, ?:opt, *bot, :b) -> nil
|
64
|
-
def log3: (:a a, :opt o, Array[untyped] r, :b c) -> nil
|
65
|
-
def f4: { (:a, :b, :c) -> nil } -> (^(:a, ?:b | :opt, *bot, :c) -> nil)
|
66
|
-
def log4: (:a a, :b | :opt o, Array[untyped] r, :c c) -> nil
|
67
|
-
def f5: { (:a, :b, :c, :d) -> nil } -> (^(:a, ?:b | :opt, *:c, :d) -> nil)
|
68
|
-
def log5: (:a a, :b | :opt o, [:c] r, :d c) -> nil
|
69
|
-
def f6: { (:a, :b, :c, :d, :e) -> nil } -> (^(:a, ?:b | :opt, *:c | :d, :e) -> nil)
|
70
|
-
def log6: (:a a, :b | :opt o, [:c, :d] r, :e c) -> nil
|
71
|
-
end
|
data/smoke/block-blockarg.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
def log1(x); end
|
2
|
-
def log2(x); end
|
3
|
-
def log3(x); end
|
4
|
-
|
5
|
-
def f(&blk)
|
6
|
-
log3(
|
7
|
-
blk.call do |x|
|
8
|
-
log1(x)
|
9
|
-
:b
|
10
|
-
end
|
11
|
-
)
|
12
|
-
:d
|
13
|
-
end
|
14
|
-
|
15
|
-
f do |&blk|
|
16
|
-
log2(blk.call(:a))
|
17
|
-
:c
|
18
|
-
end
|
19
|
-
|
20
|
-
__END__
|
21
|
-
# Classes
|
22
|
-
class Object
|
23
|
-
private
|
24
|
-
def log1: (:a x) -> nil
|
25
|
-
def log2: (:b x) -> nil
|
26
|
-
def log3: (:c x) -> nil
|
27
|
-
def f: { -> :c } -> :d
|
28
|
-
end
|
data/smoke/block-kwarg.rb
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
def f1
|
2
|
-
yield k: 1
|
3
|
-
end
|
4
|
-
def log1(n); end
|
5
|
-
f1 {|k:| log1(k) }
|
6
|
-
|
7
|
-
def f2
|
8
|
-
yield k: 1
|
9
|
-
end
|
10
|
-
def log2(n); end
|
11
|
-
f2 {|k: :opt| log2(k) }
|
12
|
-
|
13
|
-
def f3
|
14
|
-
yield k: 1
|
15
|
-
end
|
16
|
-
def log3(n); end
|
17
|
-
f3 {|k: "str"| log3(k) }
|
18
|
-
|
19
|
-
def f4
|
20
|
-
yield k: 1
|
21
|
-
end
|
22
|
-
def log4(kwrest); end
|
23
|
-
f4 {|**kwrest| log4(kwrest) }
|
24
|
-
|
25
|
-
def f5
|
26
|
-
yield k: 1
|
27
|
-
end
|
28
|
-
f5 {|| }
|
29
|
-
|
30
|
-
def f6
|
31
|
-
yield
|
32
|
-
end
|
33
|
-
f6 {|k:| }
|
34
|
-
|
35
|
-
__END__
|
36
|
-
# Errors
|
37
|
-
smoke/block-kwarg.rb:26: [error] unknown keyword: k
|
38
|
-
smoke/block-kwarg.rb:31: [error] no argument for required keywords
|
39
|
-
|
40
|
-
# Classes
|
41
|
-
class Object
|
42
|
-
private
|
43
|
-
def f1: { -> nil } -> nil
|
44
|
-
def log1: (Integer n) -> nil
|
45
|
-
def f2: { -> nil } -> nil
|
46
|
-
def log2: (:opt | Integer n) -> nil
|
47
|
-
def f3: { -> nil } -> nil
|
48
|
-
def log3: (Integer | String n) -> nil
|
49
|
-
def f4: { -> nil } -> nil
|
50
|
-
def log4: ({k: Integer} kwrest) -> nil
|
51
|
-
def f5: { -> nil } -> untyped
|
52
|
-
def f6: { -> nil } -> untyped
|
53
|
-
end
|
data/smoke/block1.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
def foo(x)
|
2
|
-
yield x
|
3
|
-
yield 1
|
4
|
-
end
|
5
|
-
|
6
|
-
foo("str") do |x|
|
7
|
-
x
|
8
|
-
end
|
9
|
-
|
10
|
-
foo(:sym) do |x|
|
11
|
-
if 1+1
|
12
|
-
x
|
13
|
-
else
|
14
|
-
1
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
__END__
|
19
|
-
# Classes
|
20
|
-
class Object
|
21
|
-
private
|
22
|
-
def foo: (:sym | String x) { (:sym | Integer | String) -> (:sym | Integer | String) } -> (:sym | Integer | String)
|
23
|
-
end
|
data/smoke/block10.rb
DELETED
data/smoke/block11.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
def log1(x)
|
2
|
-
end
|
3
|
-
def log2(x)
|
4
|
-
end
|
5
|
-
|
6
|
-
def foo
|
7
|
-
x = nil
|
8
|
-
1.times do |_|
|
9
|
-
x = 1
|
10
|
-
log1(x)
|
11
|
-
end
|
12
|
-
x
|
13
|
-
end
|
14
|
-
|
15
|
-
def test_yield
|
16
|
-
yield
|
17
|
-
end
|
18
|
-
|
19
|
-
def bar
|
20
|
-
x = nil
|
21
|
-
test_yield do
|
22
|
-
x = 1
|
23
|
-
log2(x)
|
24
|
-
end
|
25
|
-
x
|
26
|
-
end
|
27
|
-
|
28
|
-
foo
|
29
|
-
bar
|
30
|
-
|
31
|
-
__END__
|
32
|
-
# Classes
|
33
|
-
class Object
|
34
|
-
private
|
35
|
-
def log1: (Integer? x) -> nil
|
36
|
-
def log2: (Integer? x) -> nil
|
37
|
-
def foo: -> Integer?
|
38
|
-
def test_yield: { -> nil } -> nil
|
39
|
-
def bar: -> Integer?
|
40
|
-
end
|
data/smoke/block12.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
def foo
|
2
|
-
1.times do |_|
|
3
|
-
return [:foo]
|
4
|
-
end
|
5
|
-
end
|
6
|
-
|
7
|
-
def bar
|
8
|
-
a = [:bar]
|
9
|
-
1.times do |_|
|
10
|
-
return a
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
foo
|
15
|
-
bar
|
16
|
-
|
17
|
-
__END__
|
18
|
-
# Classes
|
19
|
-
class Object
|
20
|
-
private
|
21
|
-
def foo: -> [:foo]
|
22
|
-
def bar: -> [:bar]
|
23
|
-
end
|
data/smoke/block13.rb
DELETED
data/smoke/block13.rbs
DELETED
data/smoke/block14.rb
DELETED
data/smoke/block2.rb
DELETED
data/smoke/block3.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
class Common
|
2
|
-
def func(x)
|
3
|
-
yield 1
|
4
|
-
end
|
5
|
-
end
|
6
|
-
|
7
|
-
class Foo
|
8
|
-
def foo
|
9
|
-
Common.new.func("str") do |x|
|
10
|
-
1
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
class Bar
|
16
|
-
def bar
|
17
|
-
Common.new.func(:sym) do |x|
|
18
|
-
:sym2
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
Foo.new.foo
|
24
|
-
Bar.new.bar
|
25
|
-
|
26
|
-
__END__
|
27
|
-
# Classes
|
28
|
-
class Common
|
29
|
-
def func: (:sym | String x) { (Integer) -> (:sym2 | Integer) } -> (:sym2 | Integer)
|
30
|
-
end
|
31
|
-
|
32
|
-
class Foo
|
33
|
-
def foo: -> (:sym2 | Integer)
|
34
|
-
end
|
35
|
-
|
36
|
-
class Bar
|
37
|
-
def bar: -> (:sym2 | Integer)
|
38
|
-
end
|
data/smoke/block4.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
def foo
|
2
|
-
yield "str"
|
3
|
-
end
|
4
|
-
|
5
|
-
def bar
|
6
|
-
yield :sym
|
7
|
-
end
|
8
|
-
|
9
|
-
blk = -> x { x }
|
10
|
-
foo(&blk)
|
11
|
-
bar(&blk)
|
12
|
-
|
13
|
-
__END__
|
14
|
-
# Classes
|
15
|
-
class Object
|
16
|
-
private
|
17
|
-
def foo: { (:sym | String) -> (:sym | String) } -> (:sym | String)
|
18
|
-
def bar: { (:sym | String) -> (:sym | String) } -> (:sym | String)
|
19
|
-
end
|
data/smoke/block5.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
F = -> x { "str" }
|
2
|
-
|
3
|
-
def foo(&blk)
|
4
|
-
blk.call(:sym, &F)
|
5
|
-
end
|
6
|
-
|
7
|
-
foo do |dummy, &blk|
|
8
|
-
blk.call(42)
|
9
|
-
end
|
10
|
-
|
11
|
-
# truly expected:
|
12
|
-
# Object#foo :: (&Proc[(Symbol, &Proc[(Integer) -> String]) -> String]) -> String
|
13
|
-
|
14
|
-
__END__
|
15
|
-
# Classes
|
16
|
-
class Object
|
17
|
-
F: ^(Integer) -> String
|
18
|
-
|
19
|
-
private
|
20
|
-
def foo: { (:sym) -> String } -> String
|
21
|
-
end
|
data/smoke/block6.rb
DELETED
data/smoke/block7.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
def foo
|
2
|
-
yield
|
3
|
-
end
|
4
|
-
|
5
|
-
any = undefined_method
|
6
|
-
foo(&any)
|
7
|
-
|
8
|
-
foo(&1)
|
9
|
-
|
10
|
-
__END__
|
11
|
-
# Errors
|
12
|
-
smoke/block7.rb:5: [error] undefined method: Object#undefined_method
|
13
|
-
smoke/block7.rb:8: [error] wrong argument type Integer<1> (expected Proc)
|
14
|
-
|
15
|
-
# Classes
|
16
|
-
class Object
|
17
|
-
private
|
18
|
-
def foo: -> untyped
|
19
|
-
end
|