typeprof 0.14.1 → 0.15.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/lib/typeprof/analyzer.rb +154 -85
- data/lib/typeprof/builtin.rb +22 -12
- data/lib/typeprof/cli.rb +1 -0
- data/lib/typeprof/config.rb +2 -1
- data/lib/typeprof/container-type.rb +7 -1
- data/lib/typeprof/export.rb +9 -5
- data/lib/typeprof/import.rb +60 -21
- data/lib/typeprof/iseq.rb +303 -201
- data/lib/typeprof/method.rb +2 -2
- data/lib/typeprof/type.rb +97 -47
- data/lib/typeprof/version.rb +1 -1
- data/smoke/alias2.rb +1 -1
- data/smoke/array15.rb +1 -1
- data/smoke/array3.rb +1 -1
- data/smoke/array6.rb +2 -2
- data/smoke/array8.rb +1 -1
- data/smoke/attr-module.rb +1 -4
- data/smoke/attr-vis.rb +1 -1
- data/smoke/attr.rb +1 -1
- data/smoke/block-args2.rb +3 -3
- data/smoke/block-args3.rb +4 -4
- data/smoke/break2.rb +1 -1
- data/smoke/gvar2.rb +0 -3
- data/smoke/hash-bot.rb +1 -1
- data/smoke/hash4.rb +1 -1
- data/smoke/huge_union.rb +86 -0
- data/smoke/identifier_keywords.rb +17 -0
- data/smoke/initialize.rb +1 -1
- data/smoke/ivar2.rb +1 -1
- data/smoke/ivar3.rb +1 -1
- data/smoke/kwrest.rb +2 -2
- data/smoke/kwrest.rbs +1 -1
- data/smoke/method_missing.rb +1 -1
- data/smoke/next2.rb +1 -1
- data/smoke/noname.rb +9 -0
- data/smoke/or_raise.rb +18 -0
- data/smoke/parameterizedd-self.rb +2 -2
- data/smoke/pattern-match1.rb +1 -6
- data/smoke/proc6.rb +13 -0
- data/smoke/proc7.rb +32 -0
- data/smoke/rbs-tyvar4.rb +1 -1
- data/smoke/rbs-vars.rb +0 -3
- data/smoke/require1.rb +13 -0
- data/smoke/require2.rb +13 -0
- data/smoke/struct5.rb +1 -1
- data/smoke/struct6.rb +1 -1
- data/smoke/struct7.rb +1 -1
- data/smoke/super3.rb +1 -1
- data/smoke/symbol-proc-attr.rb +1 -1
- data/smoke/symbol-proc-attr2.rb +1 -1
- data/testbed/ao.rb +1 -1
- data/typeprof.gemspec +1 -1
- metadata +12 -4
@@ -0,0 +1,17 @@
|
|
1
|
+
def type(type)
|
2
|
+
end
|
3
|
+
|
4
|
+
def out(*out)
|
5
|
+
end
|
6
|
+
|
7
|
+
def untyped(untyped:)
|
8
|
+
end
|
9
|
+
|
10
|
+
__END__
|
11
|
+
# Classes
|
12
|
+
class Object
|
13
|
+
private
|
14
|
+
def type: (untyped `type`) -> nil
|
15
|
+
def out: (*untyped `out`) -> nil
|
16
|
+
def untyped: (untyped: untyped) -> nil
|
17
|
+
end
|
data/smoke/initialize.rb
CHANGED
data/smoke/ivar2.rb
CHANGED
data/smoke/ivar3.rb
CHANGED
data/smoke/kwrest.rb
CHANGED
data/smoke/kwrest.rbs
CHANGED
data/smoke/method_missing.rb
CHANGED
data/smoke/next2.rb
CHANGED
data/smoke/noname.rb
ADDED
data/smoke/or_raise.rb
ADDED
data/smoke/pattern-match1.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# RUBY_VERSION >= 3.0
|
2
|
+
# NO_SHOW_ERRORS
|
2
3
|
|
3
4
|
def foo
|
4
5
|
case [:a, :b, :c]
|
@@ -11,12 +12,6 @@ end
|
|
11
12
|
foo
|
12
13
|
|
13
14
|
__END__
|
14
|
-
# Errors
|
15
|
-
smoke/pattern-match1.rb:5: [error] undefined method: nil#length
|
16
|
-
smoke/pattern-match1.rb:5: [error] undefined method: nil#[]
|
17
|
-
smoke/pattern-match1.rb:5: [error] undefined method: nil#[]
|
18
|
-
smoke/pattern-match1.rb:5: [error] undefined method: nil#[]
|
19
|
-
|
20
15
|
# Classes
|
21
16
|
class Object
|
22
17
|
private
|
data/smoke/proc6.rb
ADDED
data/smoke/proc7.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
class Foo
|
2
|
+
def id(&blk)
|
3
|
+
blk
|
4
|
+
end
|
5
|
+
|
6
|
+
def check(v)
|
7
|
+
rand < 0.5 ? v : [v]
|
8
|
+
end
|
9
|
+
|
10
|
+
def foo
|
11
|
+
check(id {}).call # cause "undefined method: [^-> nil?]#call"
|
12
|
+
end
|
13
|
+
|
14
|
+
def foo1
|
15
|
+
id { }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
__END__
|
20
|
+
# Errors
|
21
|
+
smoke/proc7.rb:11: [error] undefined method: nil#call
|
22
|
+
smoke/proc7.rb:11: [error] undefined method: [(^(unknown) -> bot | untyped)?]#call
|
23
|
+
smoke/proc7.rb:11: [error] undefined method: nil#call
|
24
|
+
smoke/proc7.rb:11: [error] undefined method: [(^-> nil | untyped)?]#call
|
25
|
+
|
26
|
+
# Classes
|
27
|
+
class Foo
|
28
|
+
def id: ?{ -> nil } -> ^-> nil?
|
29
|
+
def check: ((^-> nil | untyped)? v) -> (([(^-> nil | untyped)?] | ^-> nil | untyped)?)
|
30
|
+
def foo: -> untyped?
|
31
|
+
def foo1: -> ^-> nil?
|
32
|
+
end
|
data/smoke/rbs-tyvar4.rb
CHANGED
data/smoke/rbs-vars.rb
CHANGED
data/smoke/require1.rb
ADDED
data/smoke/require2.rb
ADDED
data/smoke/struct5.rb
CHANGED
data/smoke/struct6.rb
CHANGED
data/smoke/struct7.rb
CHANGED
data/smoke/super3.rb
CHANGED
data/smoke/symbol-proc-attr.rb
CHANGED
data/smoke/symbol-proc-attr2.rb
CHANGED
data/testbed/ao.rb
CHANGED
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
|
+
version: 0.15.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yusuke Endoh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-07 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: 1.
|
19
|
+
version: 1.3.1
|
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: 1.
|
26
|
+
version: 1.3.1
|
27
27
|
description: |
|
28
28
|
TypeProf performs a type analysis of non-annotated Ruby code.
|
29
29
|
|
@@ -216,6 +216,8 @@ files:
|
|
216
216
|
- smoke/hash3.rb
|
217
217
|
- smoke/hash4.rb
|
218
218
|
- smoke/hash5.rb
|
219
|
+
- smoke/huge_union.rb
|
220
|
+
- smoke/identifier_keywords.rb
|
219
221
|
- smoke/included.rb
|
220
222
|
- smoke/inheritance.rb
|
221
223
|
- smoke/inheritance2.rb
|
@@ -267,6 +269,7 @@ files:
|
|
267
269
|
- smoke/multiple-superclass.rb
|
268
270
|
- smoke/next1.rb
|
269
271
|
- smoke/next2.rb
|
272
|
+
- smoke/noname.rb
|
270
273
|
- smoke/object-send1.rb
|
271
274
|
- smoke/object-send2.rb
|
272
275
|
- smoke/object-send3.rb
|
@@ -274,6 +277,7 @@ files:
|
|
274
277
|
- smoke/optional1.rb
|
275
278
|
- smoke/optional2.rb
|
276
279
|
- smoke/optional3.rb
|
280
|
+
- smoke/or_raise.rb
|
277
281
|
- smoke/parameterizedd-self.rb
|
278
282
|
- smoke/parameterizedd-self2.rb
|
279
283
|
- smoke/pathname1.rb
|
@@ -290,6 +294,8 @@ files:
|
|
290
294
|
- smoke/proc3.rb
|
291
295
|
- smoke/proc4.rb
|
292
296
|
- smoke/proc5.rb
|
297
|
+
- smoke/proc6.rb
|
298
|
+
- smoke/proc7.rb
|
293
299
|
- smoke/public.rb
|
294
300
|
- smoke/range.rb
|
295
301
|
- smoke/rbs-alias.rb
|
@@ -332,6 +338,8 @@ files:
|
|
332
338
|
- smoke/redo1.rb
|
333
339
|
- smoke/redo2.rb
|
334
340
|
- smoke/req-keyword.rb
|
341
|
+
- smoke/require1.rb
|
342
|
+
- smoke/require2.rb
|
335
343
|
- smoke/rescue1.rb
|
336
344
|
- smoke/rescue2.rb
|
337
345
|
- smoke/rescue3.rb
|