typeprof 0.20.0 → 0.20.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (344) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/doc/ide.md +81 -0
  4. data/doc/typeprof-for-ide-log.png +0 -0
  5. data/doc/typeprof-for-ide.png +0 -0
  6. data/lib/typeprof/analyzer.rb +7 -2
  7. data/lib/typeprof/cli.rb +1 -3
  8. data/lib/typeprof/config.rb +1 -5
  9. data/lib/typeprof/import.rb +22 -19
  10. data/lib/typeprof/iseq.rb +5 -0
  11. data/lib/typeprof/lsp.rb +40 -21
  12. data/lib/typeprof/version.rb +1 -1
  13. data/lib/typeprof.rb +0 -5
  14. data/typeprof.gemspec +1 -1
  15. metadata +5 -331
  16. data/smoke/alias.rb +0 -31
  17. data/smoke/alias2.rb +0 -21
  18. data/smoke/any-cbase.rb +0 -5
  19. data/smoke/any1.rb +0 -16
  20. data/smoke/any2.rb +0 -18
  21. data/smoke/arguments.rb +0 -17
  22. data/smoke/arguments2.rb +0 -56
  23. data/smoke/array-each.rb +0 -15
  24. data/smoke/array-each2.rb +0 -16
  25. data/smoke/array-each3.rb +0 -13
  26. data/smoke/array-ltlt.rb +0 -14
  27. data/smoke/array-ltlt2.rb +0 -17
  28. data/smoke/array-map.rb +0 -12
  29. data/smoke/array-map2.rb +0 -11
  30. data/smoke/array-map3.rb +0 -23
  31. data/smoke/array-mul.rb +0 -18
  32. data/smoke/array-plus1.rb +0 -11
  33. data/smoke/array-plus2.rb +0 -16
  34. data/smoke/array-pop.rb +0 -12
  35. data/smoke/array-range-aref.rb +0 -71
  36. data/smoke/array-replace.rb +0 -13
  37. data/smoke/array-s-aref.rb +0 -12
  38. data/smoke/array1.rb +0 -27
  39. data/smoke/array10.rb +0 -15
  40. data/smoke/array11.rb +0 -14
  41. data/smoke/array12.rb +0 -25
  42. data/smoke/array13.rb +0 -31
  43. data/smoke/array14.rb +0 -14
  44. data/smoke/array15.rb +0 -16
  45. data/smoke/array2.rb +0 -28
  46. data/smoke/array3.rb +0 -26
  47. data/smoke/array4.rb +0 -15
  48. data/smoke/array5.rb +0 -14
  49. data/smoke/array6.rb +0 -17
  50. data/smoke/array7.rb +0 -14
  51. data/smoke/array8.rb +0 -13
  52. data/smoke/array9.rb +0 -13
  53. data/smoke/attr-module.rb +0 -24
  54. data/smoke/attr-vis.rb +0 -43
  55. data/smoke/attr-vis.rbs +0 -4
  56. data/smoke/attr.rb +0 -28
  57. data/smoke/autoload.rb +0 -14
  58. data/smoke/backtrace.rb +0 -33
  59. data/smoke/block-ambiguous.rb +0 -37
  60. data/smoke/block-args1-rest.rb +0 -64
  61. data/smoke/block-args1.rb +0 -60
  62. data/smoke/block-args2-rest.rb +0 -64
  63. data/smoke/block-args2.rb +0 -60
  64. data/smoke/block-args3-rest.rb +0 -75
  65. data/smoke/block-args3.rb +0 -71
  66. data/smoke/block-blockarg.rb +0 -28
  67. data/smoke/block-kwarg.rb +0 -53
  68. data/smoke/block1.rb +0 -23
  69. data/smoke/block10.rb +0 -15
  70. data/smoke/block11.rb +0 -40
  71. data/smoke/block12.rb +0 -23
  72. data/smoke/block13.rb +0 -9
  73. data/smoke/block13.rbs +0 -3
  74. data/smoke/block14.rb +0 -18
  75. data/smoke/block2.rb +0 -15
  76. data/smoke/block3.rb +0 -38
  77. data/smoke/block4.rb +0 -19
  78. data/smoke/block5.rb +0 -21
  79. data/smoke/block6.rb +0 -21
  80. data/smoke/block7.rb +0 -19
  81. data/smoke/block8.rb +0 -28
  82. data/smoke/block9.rb +0 -13
  83. data/smoke/block_given.rb +0 -37
  84. data/smoke/blown.rb +0 -13
  85. data/smoke/break1.rb +0 -19
  86. data/smoke/break2.rb +0 -16
  87. data/smoke/break3.rb +0 -13
  88. data/smoke/break4.rb +0 -17
  89. data/smoke/case.rb +0 -17
  90. data/smoke/case2.rb +0 -18
  91. data/smoke/case3.rb +0 -17
  92. data/smoke/class-hierarchy.rb +0 -54
  93. data/smoke/class-hierarchy2.rb +0 -27
  94. data/smoke/class-new.rb +0 -15
  95. data/smoke/class.rb +0 -7
  96. data/smoke/class_eval.rb +0 -22
  97. data/smoke/class_instance_var.rb +0 -9
  98. data/smoke/class_method.rb +0 -25
  99. data/smoke/class_method2.rb +0 -21
  100. data/smoke/class_method3.rb +0 -29
  101. data/smoke/constant1.rb +0 -46
  102. data/smoke/constant2.rb +0 -36
  103. data/smoke/constant3.rb +0 -10
  104. data/smoke/constant4.rb +0 -12
  105. data/smoke/context-sensitive1.rb +0 -13
  106. data/smoke/cvar.rb +0 -31
  107. data/smoke/cvar2.rb +0 -17
  108. data/smoke/define_method.rb +0 -16
  109. data/smoke/define_method2.rb +0 -18
  110. data/smoke/define_method3.rb +0 -14
  111. data/smoke/define_method3.rbs +0 -3
  112. data/smoke/define_method4.rb +0 -15
  113. data/smoke/define_method4.rbs +0 -3
  114. data/smoke/define_method5.rb +0 -12
  115. data/smoke/define_method6.rb +0 -19
  116. data/smoke/define_method7.rb +0 -18
  117. data/smoke/demo.rb +0 -81
  118. data/smoke/demo1.rb +0 -17
  119. data/smoke/demo10.rb +0 -21
  120. data/smoke/demo11.rb +0 -12
  121. data/smoke/demo2.rb +0 -15
  122. data/smoke/demo3.rb +0 -17
  123. data/smoke/demo4.rb +0 -27
  124. data/smoke/demo5.rb +0 -16
  125. data/smoke/demo6.rb +0 -22
  126. data/smoke/demo7.rb +0 -15
  127. data/smoke/demo8.rb +0 -19
  128. data/smoke/demo9.rb +0 -18
  129. data/smoke/dummy-execution1.rb +0 -15
  130. data/smoke/dummy-execution2.rb +0 -16
  131. data/smoke/dummy_element.rb +0 -14
  132. data/smoke/ensure1.rb +0 -21
  133. data/smoke/enum_for.rb +0 -15
  134. data/smoke/enum_for2.rb +0 -17
  135. data/smoke/enumerator.rb +0 -16
  136. data/smoke/expandarray1.rb +0 -23
  137. data/smoke/expandarray2.rb +0 -24
  138. data/smoke/extended.rb +0 -38
  139. data/smoke/fib.rb +0 -28
  140. data/smoke/flip-flop.rb +0 -28
  141. data/smoke/flow1.rb +0 -17
  142. data/smoke/flow10.rb +0 -17
  143. data/smoke/flow11.rb +0 -17
  144. data/smoke/flow2.rb +0 -15
  145. data/smoke/flow3.rb +0 -15
  146. data/smoke/flow4.rb +0 -5
  147. data/smoke/flow5.rb +0 -20
  148. data/smoke/flow6.rb +0 -20
  149. data/smoke/flow7.rb +0 -21
  150. data/smoke/flow8.rb +0 -14
  151. data/smoke/flow9.rb +0 -12
  152. data/smoke/for.rb +0 -9
  153. data/smoke/freeze.rb +0 -12
  154. data/smoke/function.rb +0 -17
  155. data/smoke/gvar.rb +0 -14
  156. data/smoke/gvar2.rb +0 -15
  157. data/smoke/gvar2.rbs +0 -1
  158. data/smoke/hash-bot.rb +0 -12
  159. data/smoke/hash-fetch.rb +0 -28
  160. data/smoke/hash-merge-bang.rb +0 -12
  161. data/smoke/hash1.rb +0 -20
  162. data/smoke/hash2.rb +0 -13
  163. data/smoke/hash3.rb +0 -14
  164. data/smoke/hash4.rb +0 -11
  165. data/smoke/hash5.rb +0 -14
  166. data/smoke/huge_union.rb +0 -86
  167. data/smoke/identifier_keywords.rb +0 -17
  168. data/smoke/included.rb +0 -38
  169. data/smoke/inheritance.rb +0 -34
  170. data/smoke/inheritance2.rb +0 -35
  171. data/smoke/inherited.rb +0 -26
  172. data/smoke/initialize.rb +0 -28
  173. data/smoke/instance_eval.rb +0 -18
  174. data/smoke/instance_eval2.rb +0 -10
  175. data/smoke/instance_eval3.rb +0 -25
  176. data/smoke/instance_eval4.rb +0 -12
  177. data/smoke/int_times.rb +0 -15
  178. data/smoke/integer.rb +0 -11
  179. data/smoke/ivar.rb +0 -31
  180. data/smoke/ivar2.rb +0 -30
  181. data/smoke/ivar3.rb +0 -17
  182. data/smoke/ivar3.rbs +0 -3
  183. data/smoke/ivar4.rb +0 -21
  184. data/smoke/kernel-class.rb +0 -13
  185. data/smoke/keyword1.rb +0 -12
  186. data/smoke/keyword2.rb +0 -12
  187. data/smoke/keyword3.rb +0 -12
  188. data/smoke/keyword4.rb +0 -12
  189. data/smoke/keyword5.rb +0 -16
  190. data/smoke/kwrest.rb +0 -13
  191. data/smoke/kwrest.rbs +0 -3
  192. data/smoke/kwsplat1.rb +0 -43
  193. data/smoke/kwsplat2.rb +0 -13
  194. data/smoke/lit-complex.rb +0 -10
  195. data/smoke/lit-encoding.rb +0 -10
  196. data/smoke/manual-rbs.rb +0 -29
  197. data/smoke/manual-rbs.rbs +0 -3
  198. data/smoke/manual-rbs2.rb +0 -21
  199. data/smoke/manual-rbs2.rbs +0 -8
  200. data/smoke/manual-rbs3.rb +0 -13
  201. data/smoke/manual-rbs3.rbs +0 -3
  202. data/smoke/masgn1.rb +0 -14
  203. data/smoke/masgn2.rb +0 -18
  204. data/smoke/masgn3.rb +0 -13
  205. data/smoke/method_in_branch.rb +0 -23
  206. data/smoke/method_missing.rb +0 -29
  207. data/smoke/module1.rb +0 -29
  208. data/smoke/module2.rb +0 -28
  209. data/smoke/module3.rb +0 -33
  210. data/smoke/module4.rb +0 -35
  211. data/smoke/module5.rb +0 -17
  212. data/smoke/module6.rb +0 -40
  213. data/smoke/module_function1.rb +0 -29
  214. data/smoke/module_function2.rb +0 -29
  215. data/smoke/multiple-include.rb +0 -15
  216. data/smoke/multiple-superclass.rb +0 -28
  217. data/smoke/next1.rb +0 -21
  218. data/smoke/next2.rb +0 -17
  219. data/smoke/noname.rb +0 -9
  220. data/smoke/object-send1.rb +0 -23
  221. data/smoke/object-send2.rb +0 -10
  222. data/smoke/object-send3.rb +0 -18
  223. data/smoke/once.rb +0 -13
  224. data/smoke/optional1.rb +0 -14
  225. data/smoke/optional2.rb +0 -16
  226. data/smoke/optional3.rb +0 -11
  227. data/smoke/or_raise.rb +0 -18
  228. data/smoke/parameterizedd-self.rb +0 -20
  229. data/smoke/parameterizedd-self2.rb +0 -15
  230. data/smoke/pathname1.rb +0 -14
  231. data/smoke/pathname2.rb +0 -14
  232. data/smoke/pattern-match1.rb +0 -19
  233. data/smoke/pattern-match2.rb +0 -16
  234. data/smoke/prepend1.rb +0 -33
  235. data/smoke/prepend2.rb +0 -10
  236. data/smoke/prepend2.rbs +0 -9
  237. data/smoke/primitive_method.rb +0 -19
  238. data/smoke/printf.rb +0 -20
  239. data/smoke/proc.rb +0 -20
  240. data/smoke/proc2.rb +0 -17
  241. data/smoke/proc3.rb +0 -15
  242. data/smoke/proc4.rb +0 -12
  243. data/smoke/proc5.rb +0 -19
  244. data/smoke/proc6.rb +0 -13
  245. data/smoke/proc7.rb +0 -32
  246. data/smoke/public.rb +0 -38
  247. data/smoke/range.rb +0 -14
  248. data/smoke/rbs-alias.rb +0 -10
  249. data/smoke/rbs-alias.rbs +0 -4
  250. data/smoke/rbs-attr.rb +0 -27
  251. data/smoke/rbs-attr.rbs +0 -5
  252. data/smoke/rbs-attr2.rb +0 -11
  253. data/smoke/rbs-attr2.rbs +0 -3
  254. data/smoke/rbs-extend.rb +0 -10
  255. data/smoke/rbs-extend.rbs +0 -7
  256. data/smoke/rbs-interface.rb +0 -25
  257. data/smoke/rbs-interface.rbs +0 -12
  258. data/smoke/rbs-module.rb +0 -26
  259. data/smoke/rbs-module.rbs +0 -4
  260. data/smoke/rbs-opt-and-rest.rb +0 -10
  261. data/smoke/rbs-opt-and-rest.rbs +0 -3
  262. data/smoke/rbs-proc1.rb +0 -10
  263. data/smoke/rbs-proc1.rbs +0 -3
  264. data/smoke/rbs-proc2.rb +0 -21
  265. data/smoke/rbs-proc2.rbs +0 -3
  266. data/smoke/rbs-proc3.rb +0 -14
  267. data/smoke/rbs-proc3.rbs +0 -4
  268. data/smoke/rbs-record.rb +0 -18
  269. data/smoke/rbs-record.rbs +0 -4
  270. data/smoke/rbs-tyvar.rb +0 -19
  271. data/smoke/rbs-tyvar.rbs +0 -5
  272. data/smoke/rbs-tyvar2.rb +0 -21
  273. data/smoke/rbs-tyvar2.rbs +0 -9
  274. data/smoke/rbs-tyvar3.rb +0 -18
  275. data/smoke/rbs-tyvar3.rbs +0 -5
  276. data/smoke/rbs-tyvar4.rb +0 -37
  277. data/smoke/rbs-tyvar5.rb +0 -13
  278. data/smoke/rbs-tyvar5.rbs +0 -8
  279. data/smoke/rbs-tyvar6.rb +0 -18
  280. data/smoke/rbs-tyvar6.rbs +0 -12
  281. data/smoke/rbs-tyvar7.rb +0 -12
  282. data/smoke/rbs-tyvar7.rbs +0 -7
  283. data/smoke/rbs-vars.rb +0 -35
  284. data/smoke/rbs-vars.rbs +0 -7
  285. data/smoke/redo1.rb +0 -22
  286. data/smoke/redo2.rb +0 -23
  287. data/smoke/req-keyword.rb +0 -13
  288. data/smoke/require1.rb +0 -13
  289. data/smoke/require2.rb +0 -13
  290. data/smoke/rescue1.rb +0 -21
  291. data/smoke/rescue2.rb +0 -23
  292. data/smoke/rescue3.rb +0 -20
  293. data/smoke/rescue4.rb +0 -17
  294. data/smoke/respond_to.rb +0 -23
  295. data/smoke/rest-farg.rb +0 -11
  296. data/smoke/rest1.rb +0 -26
  297. data/smoke/rest2.rb +0 -31
  298. data/smoke/rest3.rb +0 -37
  299. data/smoke/rest4.rb +0 -19
  300. data/smoke/rest5.rb +0 -11
  301. data/smoke/rest6.rb +0 -12
  302. data/smoke/retry1.rb +0 -21
  303. data/smoke/return.rb +0 -14
  304. data/smoke/reveal.rb +0 -13
  305. data/smoke/simple.rb +0 -12
  306. data/smoke/singleton_class.rb +0 -8
  307. data/smoke/singleton_method.rb +0 -12
  308. data/smoke/step.rb +0 -18
  309. data/smoke/string-split.rb +0 -12
  310. data/smoke/struct-keyword_init.rb +0 -10
  311. data/smoke/struct.rb +0 -13
  312. data/smoke/struct2.rb +0 -25
  313. data/smoke/struct3.rb +0 -14
  314. data/smoke/struct4.rb +0 -7
  315. data/smoke/struct5.rb +0 -16
  316. data/smoke/struct6.rb +0 -15
  317. data/smoke/struct7.rb +0 -17
  318. data/smoke/stub-keyword.rb +0 -10
  319. data/smoke/super1.rb +0 -69
  320. data/smoke/super2.rb +0 -16
  321. data/smoke/super3.rb +0 -20
  322. data/smoke/super4.rb +0 -45
  323. data/smoke/super5.rb +0 -38
  324. data/smoke/svar1.rb +0 -13
  325. data/smoke/symbol-proc-attr.rb +0 -22
  326. data/smoke/symbol-proc-attr2.rb +0 -15
  327. data/smoke/symbol-proc-bot.rb +0 -13
  328. data/smoke/symbol-proc.rb +0 -25
  329. data/smoke/tap1.rb +0 -18
  330. data/smoke/toplevel.rb +0 -13
  331. data/smoke/two-map.rb +0 -18
  332. data/smoke/type_var.rb +0 -11
  333. data/smoke/typed_method.rb +0 -16
  334. data/smoke/uninitialize-var.rb +0 -13
  335. data/smoke/union-recv.rb +0 -35
  336. data/smoke/user-demo.rb +0 -15
  337. data/smoke/wrong-extend.rb +0 -27
  338. data/smoke/wrong-include.rb +0 -27
  339. data/smoke/wrong-include2.rb +0 -17
  340. data/smoke/wrong-rbs.rb +0 -15
  341. data/smoke/wrong-rbs.rbs +0 -7
  342. data/testbed/ao.rb +0 -297
  343. data/testbed/diff-lcs-entrypoint.rb +0 -4
  344. data/testbed/goodcheck-Gemfile.lock +0 -51
data/smoke/ivar.rb DELETED
@@ -1,31 +0,0 @@
1
- class Foo
2
- def foo=(x)
3
- @foo = x
4
- end
5
-
6
- def foo
7
- @foo
8
- end
9
- end
10
-
11
- def log(x)
12
- end
13
-
14
- Foo.new.foo = 1
15
- log(Foo.new.foo)
16
- Foo.new.foo = "str"
17
- log(Foo.new.foo)
18
-
19
- __END__
20
- # Classes
21
- class Object
22
- private
23
- def log: (Integer | String x) -> nil
24
- end
25
-
26
- class Foo
27
- @foo: Integer | String
28
-
29
- def foo=: (Integer | String x) -> (Integer | String)
30
- def foo: -> (Integer | String)
31
- end
data/smoke/ivar2.rb DELETED
@@ -1,30 +0,0 @@
1
- class Foo
2
- def initialize
3
- @array = []
4
- @hash = {}
5
- end
6
-
7
- def set
8
- @array << 1
9
- @array << "str"
10
- @array << :sym
11
- @hash[:a] = 1
12
- @hash[:b] = "str"
13
- @hash[:c] = :sym
14
- end
15
-
16
- attr_reader :array, :hash
17
- end
18
-
19
- Foo.new.array
20
- Foo.new.hash
21
- Foo.new.set
22
-
23
- __END__
24
- # Classes
25
- class Foo
26
- def initialize: -> void
27
- def set: -> :sym
28
- attr_reader array: Array[:sym | Integer | String]
29
- attr_reader hash: {a: Integer, b: String, c: :sym}
30
- end
data/smoke/ivar3.rb DELETED
@@ -1,17 +0,0 @@
1
- class Foo
2
- def initialize
3
- @foo = "str"
4
- @bar = "str"
5
- end
6
- end
7
-
8
- __END__
9
- # Errors
10
- smoke/ivar3.rb:3: [warning] inconsistent assignment to RBS-declared variable
11
-
12
- # Classes
13
- class Foo
14
- @bar: String
15
-
16
- def initialize: -> void
17
- end
data/smoke/ivar3.rbs DELETED
@@ -1,3 +0,0 @@
1
- class Foo
2
- @foo : Integer
3
- end
data/smoke/ivar4.rb DELETED
@@ -1,21 +0,0 @@
1
- def foo
2
- bot = @undefined_ivar
3
- unless bot
4
- bot.nil?
5
- end
6
- end
7
-
8
- foo # There were a bug that type profiling is terminated at this line
9
-
10
- def bar
11
- end
12
-
13
- __END__
14
- # Classes
15
- class Object
16
- @undefined_ivar: bot
17
-
18
- private
19
- def foo: -> bool
20
- def bar: -> nil
21
- end
@@ -1,13 +0,0 @@
1
- def foo(n)
2
- n.class
3
- end
4
-
5
- foo(1)
6
- foo("")
7
-
8
- __END__
9
- # Classes
10
- class Object
11
- private
12
- def foo: (Integer | String n) -> (singleton(Integer) | singleton(String))
13
- end
data/smoke/keyword1.rb DELETED
@@ -1,12 +0,0 @@
1
- def foo(n:, s:)
2
- [n, s]
3
- end
4
-
5
- foo(n: 42, s: "str")
6
-
7
- __END__
8
- # Classes
9
- class Object
10
- private
11
- def foo: (n: Integer, s: String) -> [Integer, String]
12
- end
data/smoke/keyword2.rb DELETED
@@ -1,12 +0,0 @@
1
- def foo(n: 42, s: 42)
2
- [n, s]
3
- end
4
-
5
- foo(n: 42, s: "str")
6
-
7
- __END__
8
- # Classes
9
- class Object
10
- private
11
- def foo: (?n: Integer, ?s: Integer | String) -> ([Integer, Integer | String])
12
- end
data/smoke/keyword3.rb DELETED
@@ -1,12 +0,0 @@
1
- def foo(n: 42, s: [n])
2
- [n, s]
3
- end
4
-
5
- foo(n: 42, s: "str")
6
-
7
- __END__
8
- # Classes
9
- class Object
10
- private
11
- def foo: (?n: Integer, ?s: String | [Integer]) -> ([Integer, String | [Integer]])
12
- end
data/smoke/keyword4.rb DELETED
@@ -1,12 +0,0 @@
1
- def foo(**kw)
2
- kw
3
- end
4
-
5
- foo(n: 42, s: "str")
6
-
7
- __END__
8
- # Classes
9
- class Object
10
- private
11
- def foo: (**Integer | String) -> {n: Integer, s: String}
12
- end
data/smoke/keyword5.rb DELETED
@@ -1,16 +0,0 @@
1
- def foo(req:)
2
- req
3
- end
4
-
5
- foo()
6
- foo(req: 1)
7
-
8
- __END__
9
- # Errors
10
- smoke/keyword5.rb:5: [error] no argument for required keywords
11
-
12
- # Classes
13
- class Object
14
- private
15
- def foo: (req: Integer) -> Integer
16
- end
data/smoke/kwrest.rb DELETED
@@ -1,13 +0,0 @@
1
- class Foo
2
- def foo(**r)
3
- @r = r["foo".to_sym][42]
4
- end
5
- end
6
-
7
- __END__
8
- # Classes
9
- class Foo
10
- @r: Integer
11
-
12
- # def foo: (**Integer) -> void
13
- end
data/smoke/kwrest.rbs DELETED
@@ -1,3 +0,0 @@
1
- class Foo
2
- def foo: (**Integer) -> void
3
- end
data/smoke/kwsplat1.rb DELETED
@@ -1,43 +0,0 @@
1
- def foo(k:)
2
- end
3
-
4
- h = { k: 42 }
5
- foo(**h)
6
-
7
- def bar(int:, str:)
8
- end
9
-
10
- if rand < 0.5
11
- h = { int: 42 }
12
- else
13
- h = { str: "str" }
14
- end
15
- bar(**h)
16
-
17
- def baz(**kw)
18
- end
19
-
20
- if rand < 0.5
21
- h = { int: 42 }
22
- else
23
- h = { str: "str" }
24
- end
25
- baz(**h)
26
-
27
- def qux(**kw)
28
- end
29
-
30
- qux(**any)
31
-
32
- __END__
33
- # Errors
34
- smoke/kwsplat1.rb:30: [error] undefined method: Object#any
35
-
36
- # Classes
37
- class Object
38
- private
39
- def foo: (k: Integer) -> nil
40
- def bar: (int: Integer, str: String) -> nil
41
- def baz: (**Integer | String) -> nil
42
- def qux: (**untyped) -> nil
43
- end
data/smoke/kwsplat2.rb DELETED
@@ -1,13 +0,0 @@
1
- def foo(*r, k:)
2
- end
3
-
4
- a = [1, 2, 3]
5
- h = { k: 42 }
6
- foo(*a, **h)
7
-
8
- __END__
9
- # Classes
10
- class Object
11
- private
12
- def foo: (*Integer | {k: Integer} r, k: Integer) -> nil
13
- end
data/smoke/lit-complex.rb DELETED
@@ -1,10 +0,0 @@
1
- def foo
2
- 1i
3
- end
4
-
5
- __END__
6
- # Classes
7
- class Object
8
- private
9
- def foo: -> Complex
10
- end
@@ -1,10 +0,0 @@
1
- def foo
2
- __ENCODING__
3
- end
4
-
5
- __END__
6
- # Classes
7
- class Object
8
- private
9
- def foo: -> Encoding
10
- end
data/smoke/manual-rbs.rb DELETED
@@ -1,29 +0,0 @@
1
- def foo(n)
2
- case n
3
- when Integer
4
- n + 1
5
- when String
6
- n + "STR"
7
- else
8
- raise
9
- end
10
- end
11
-
12
- def ret_int
13
- foo(42)
14
- end
15
-
16
- def ret_str
17
- foo("str")
18
- end
19
-
20
- __END__
21
- # Classes
22
- class Object
23
- # def foo: (Integer) -> Integer
24
- # | (String) -> String
25
-
26
- private
27
- def ret_int: -> Integer
28
- def ret_str: -> String
29
- end
data/smoke/manual-rbs.rbs DELETED
@@ -1,3 +0,0 @@
1
- class Object
2
- def foo: (Integer) -> Integer | (String) -> String
3
- end
data/smoke/manual-rbs2.rb DELETED
@@ -1,21 +0,0 @@
1
- class A
2
- class B
3
- def foo
4
- unknown
5
- end
6
- end
7
- end
8
-
9
- def bar
10
- A::B.new.foo + 1
11
- end
12
-
13
- __END__
14
- # Errors
15
- smoke/manual-rbs2.rb:4: [error] undefined method: A::B#unknown
16
-
17
- # Classes
18
- class Object
19
- private
20
- def bar: -> untyped
21
- end
@@ -1,8 +0,0 @@
1
- class A
2
- end
3
-
4
- type A::int_or_float = Integer | Float
5
-
6
- class A::B
7
- def foo: -> int_or_float
8
- end
data/smoke/manual-rbs3.rb DELETED
@@ -1,13 +0,0 @@
1
- class Foo
2
- def foo
3
- @foo = 1
4
- end
5
- end
6
-
7
- __END__
8
- # Classes
9
- class Foo
10
- @foo: Integer
11
-
12
- # def foo: -> Integer
13
- end
@@ -1,3 +0,0 @@
1
- class Foo
2
- def foo: -> Integer
3
- end
data/smoke/masgn1.rb DELETED
@@ -1,14 +0,0 @@
1
- def foo
2
- ary = [1, "str", :sym, nil]
3
- a, *rest, z = *ary
4
- [a, rest, z]
5
- end
6
-
7
- foo
8
-
9
- __END__
10
- # Classes
11
- class Object
12
- private
13
- def foo: -> [Integer, [String, :sym], nil]
14
- end
data/smoke/masgn2.rb DELETED
@@ -1,18 +0,0 @@
1
- def ary
2
- [1, "str", :sym, 1.0]
3
- end
4
-
5
- def foo
6
- a, *rest, z = *ary
7
- [a, rest, z]
8
- end
9
-
10
- foo
11
-
12
- __END__
13
- # Classes
14
- class Object
15
- private
16
- def ary: -> [Integer, String, :sym, Float]
17
- def foo: -> [Integer, [String, :sym], Float]
18
- end
data/smoke/masgn3.rb DELETED
@@ -1,13 +0,0 @@
1
- def foo
2
- a, b, c = 42
3
- [a, b, c]
4
- end
5
-
6
- foo
7
-
8
- __END__
9
- # Classes
10
- class Object
11
- private
12
- def foo: -> [Integer, nil, nil]
13
- end
@@ -1,23 +0,0 @@
1
- if 1+1
2
- def foo
3
- end
4
- def bar
5
- foo
6
- 42
7
- end
8
- else
9
- def bar
10
- "str"
11
- end
12
- end
13
-
14
- bar
15
-
16
- __END__
17
- # Classes
18
- class Object
19
- private
20
- def foo: -> nil
21
- def bar: -> Integer
22
- | -> String
23
- end
@@ -1,29 +0,0 @@
1
- class D
2
- def foo(x, y, z)
3
- end
4
- end
5
-
6
- class C
7
- def initialize(x)
8
- @target = x
9
- end
10
-
11
- def method_missing(m, *args)
12
- @target.send(m, *args)
13
- end
14
- end
15
-
16
- C.new(D.new).foo(:X, :Y, :Z)
17
-
18
- __END__
19
- # Classes
20
- class D
21
- def foo: (:X x, :Y y, :Z z) -> nil
22
- end
23
-
24
- class C
25
- @target: D
26
-
27
- def initialize: (D x) -> void
28
- def method_missing: (:foo m, *:X | :Y | :Z args) -> nil
29
- end
data/smoke/module1.rb DELETED
@@ -1,29 +0,0 @@
1
- module M
2
- def foo
3
- :foo
4
- end
5
- end
6
-
7
- class C
8
- include M
9
- end
10
-
11
- module M
12
- def bar
13
- :bar
14
- end
15
- end
16
-
17
- C.new.foo
18
- C.new.bar
19
-
20
- __END__
21
- # Classes
22
- module M
23
- def foo: -> :foo
24
- def bar: -> :bar
25
- end
26
-
27
- class C
28
- include M
29
- end
data/smoke/module2.rb DELETED
@@ -1,28 +0,0 @@
1
- module M1
2
- def foo
3
- :foo
4
- end
5
- end
6
-
7
- module M2
8
- include M1
9
- end
10
-
11
- class C
12
- include M2
13
- end
14
-
15
- C.new.foo
16
- __END__
17
- # Classes
18
- module M1
19
- def foo: -> :foo
20
- end
21
-
22
- module M2
23
- include M1
24
- end
25
-
26
- class C
27
- include M2
28
- end
data/smoke/module3.rb DELETED
@@ -1,33 +0,0 @@
1
- module M1
2
- def foo
3
- :m1
4
- end
5
- end
6
-
7
- module M2
8
- def foo
9
- :m2
10
- end
11
- end
12
-
13
- class C
14
- include M1
15
- include M2
16
- end
17
-
18
- C.new.foo
19
-
20
- __END__
21
- # Classes
22
- module M1
23
- def foo: -> :m1
24
- end
25
-
26
- module M2
27
- def foo: -> :m2
28
- end
29
-
30
- class C
31
- include M2
32
- include M1
33
- end
data/smoke/module4.rb DELETED
@@ -1,35 +0,0 @@
1
- module M2
2
- def foo
3
- :m2_foo
4
- end
5
- end
6
-
7
- module M1
8
- extend M2
9
-
10
- def foo
11
- :m1_foo
12
- end
13
- end
14
-
15
- class C
16
- extend M1
17
- end
18
-
19
- M1.foo
20
- C.foo
21
- __END__
22
- # Classes
23
- module M2
24
- def foo: -> :m2_foo
25
- end
26
-
27
- module M1
28
- extend M2
29
-
30
- def foo: -> :m1_foo
31
- end
32
-
33
- class C
34
- extend M1
35
- end
data/smoke/module5.rb DELETED
@@ -1,17 +0,0 @@
1
- module Foo
2
- Module.new do
3
- include Foo
4
- extend Foo
5
- end
6
- end
7
-
8
- Foo.foo
9
- __END__
10
- # Errors
11
- smoke/module5.rb:8: [error] undefined method: singleton(Foo)#foo
12
-
13
- # Classes
14
- module Foo
15
- extend Foo
16
- include Foo
17
- end
data/smoke/module6.rb DELETED
@@ -1,40 +0,0 @@
1
- module A
2
- end
3
-
4
- module B
5
- include A
6
- end
7
-
8
- module A
9
- include B
10
- end
11
-
12
- class C
13
- include A
14
- end
15
-
16
- def log
17
- C.new.foo
18
- end
19
-
20
- __END__
21
- # Errors
22
- smoke/module6.rb:17: [error] undefined method: C#foo
23
-
24
- # Classes
25
- class Object
26
- private
27
- def log: -> untyped
28
- end
29
-
30
- module A
31
- include B
32
- end
33
-
34
- module B
35
- include A
36
- end
37
-
38
- class C
39
- include A
40
- end
@@ -1,29 +0,0 @@
1
- module Foo
2
- def foo(x)
3
- x
4
- end
5
- module_function :foo
6
- end
7
-
8
- class Bar
9
- include Foo
10
- def bar
11
- foo(:y)
12
- end
13
- end
14
-
15
- Foo.foo(:x)
16
- Bar.new.bar
17
-
18
- __END__
19
- # Classes
20
- module Foo
21
- def foo: (:x | :y x) -> (:x | :y)
22
- def self.foo: (:x | :y x) -> (:x | :y)
23
- end
24
-
25
- class Bar
26
- include Foo
27
-
28
- def bar: -> (:x | :y)
29
- end