steep 1.3.0.pre.2 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +3 -3
- data/Gemfile.steep +1 -2
- data/Gemfile.steep.lock +4 -5
- data/lib/steep/ast/types/class.rb +9 -3
- data/lib/steep/ast/types/factory.rb +9 -2
- data/lib/steep/ast/types/instance.rb +8 -3
- data/lib/steep/ast/types/intersection.rb +6 -2
- data/lib/steep/ast/types/literal.rb +1 -1
- data/lib/steep/ast/types/logic.rb +1 -3
- data/lib/steep/ast/types/name.rb +11 -5
- data/lib/steep/ast/types/proc.rb +5 -5
- data/lib/steep/ast/types/record.rb +5 -1
- data/lib/steep/ast/types/self.rb +8 -2
- data/lib/steep/ast/types/tuple.rb +7 -5
- data/lib/steep/ast/types/union.rb +10 -4
- data/lib/steep/ast/types/var.rb +1 -1
- data/lib/steep/interface/substitution.rb +11 -10
- data/lib/steep/signature/validator.rb +13 -13
- data/lib/steep/type_inference/logic_type_interpreter.rb +2 -2
- data/lib/steep/version.rb +1 -1
- data/lib/steep.rb +0 -1
- data/rbs_collection.steep.lock.yaml +1 -1
- data/sig/steep/ast/builtin.rbs +1 -1
- data/sig/steep/ast/types/any.rbs +5 -5
- data/sig/steep/ast/types/boolean.rbs +6 -6
- data/sig/steep/ast/types/bot.rbs +5 -5
- data/sig/steep/ast/types/class.rbs +7 -6
- data/sig/steep/ast/types/helper.rbs +2 -2
- data/sig/steep/ast/types/instance.rbs +6 -5
- data/sig/steep/ast/types/intersection.rbs +12 -9
- data/sig/steep/ast/types/literal.rbs +6 -4
- data/sig/steep/ast/types/logic.rbs +7 -9
- data/sig/steep/ast/types/name.rbs +7 -3
- data/sig/steep/ast/types/nil.rbs +6 -6
- data/sig/steep/ast/types/proc.rbs +8 -3
- data/sig/steep/ast/types/record.rbs +7 -8
- data/sig/steep/ast/types/self.rbs +7 -6
- data/sig/steep/ast/types/top.rbs +6 -6
- data/sig/steep/ast/types/tuple.rbs +5 -4
- data/sig/steep/ast/types/union.rbs +8 -8
- data/sig/steep/ast/types/var.rbs +16 -11
- data/sig/steep/ast/types/void.rbs +5 -5
- data/sig/steep/ast/types.rbs +5 -26
- data/sig/steep/interface/substitution.rbs +9 -9
- data/steep.gemspec +1 -1
- metadata +6 -7
- data/lib/steep/ast/types.rb +0 -62
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f878620b37610ff6bb38ba9f71c8275ebebf1a119969acca92dae226e9e82371
|
4
|
+
data.tar.gz: e5cfe0950b4cfe16d3ac2aeb0992601b5a0b43315736b637cae05792b0774bb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c81207ff4dd7893ccc4680b4d6bc1c74b36a59badbfac8c08f02f7ecb6e17f887bc440f40c2dcfe840f219df003c384d0365f54b55340c2ddce771492945b232
|
7
|
+
data.tar.gz: bca9c65b22080f4d8e4f8cf162146a7868f520f4f13e34c22e79a95e5ba81f186b914f422afb89918c6d095d896badcd07832a731d8dd0cd152a908a6f7a71ad
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
steep (1.3.0
|
4
|
+
steep (1.3.0)
|
5
5
|
activesupport (>= 5.1)
|
6
6
|
csv (>= 3.0.9)
|
7
7
|
fileutils (>= 1.1.0)
|
@@ -12,7 +12,7 @@ PATH
|
|
12
12
|
parallel (>= 1.0.0)
|
13
13
|
parser (>= 3.1)
|
14
14
|
rainbow (>= 2.2.2, < 4.0)
|
15
|
-
rbs (>= 2.8.0
|
15
|
+
rbs (>= 2.8.0)
|
16
16
|
securerandom (>= 0.1)
|
17
17
|
strscan (>= 1.0.0)
|
18
18
|
terminal-table (>= 2, < 4)
|
@@ -54,7 +54,7 @@ GEM
|
|
54
54
|
rb-fsevent (0.11.2)
|
55
55
|
rb-inotify (0.10.1)
|
56
56
|
ffi (~> 1.0)
|
57
|
-
rbs (2.8.0
|
57
|
+
rbs (2.8.0)
|
58
58
|
ruby-debug-ide (0.7.3)
|
59
59
|
rake (>= 0.8.1)
|
60
60
|
securerandom (0.2.0)
|
data/Gemfile.steep
CHANGED
data/Gemfile.steep.lock
CHANGED
@@ -27,9 +27,9 @@ GEM
|
|
27
27
|
rb-fsevent (0.11.2)
|
28
28
|
rb-inotify (0.10.1)
|
29
29
|
ffi (~> 1.0)
|
30
|
-
rbs (2.8.0
|
30
|
+
rbs (2.8.0)
|
31
31
|
securerandom (0.2.0)
|
32
|
-
steep (1.2
|
32
|
+
steep (1.3.0.pre.2)
|
33
33
|
activesupport (>= 5.1)
|
34
34
|
csv (>= 3.0.9)
|
35
35
|
fileutils (>= 1.1.0)
|
@@ -40,7 +40,7 @@ GEM
|
|
40
40
|
parallel (>= 1.0.0)
|
41
41
|
parser (>= 3.1)
|
42
42
|
rainbow (>= 2.2.2, < 4.0)
|
43
|
-
rbs (>= 2.
|
43
|
+
rbs (>= 2.8.0.pre)
|
44
44
|
securerandom (>= 0.1)
|
45
45
|
strscan (>= 1.0.0)
|
46
46
|
terminal-table (>= 2, < 4)
|
@@ -55,8 +55,7 @@ PLATFORMS
|
|
55
55
|
arm64-darwin-21
|
56
56
|
|
57
57
|
DEPENDENCIES
|
58
|
-
|
59
|
-
steep (~> 1.2.0)
|
58
|
+
steep (~> 1.3.0.pre)
|
60
59
|
|
61
60
|
BUNDLED WITH
|
62
61
|
2.3.15
|
@@ -27,11 +27,17 @@ module Steep
|
|
27
27
|
alias eql? ==
|
28
28
|
|
29
29
|
def subst(s)
|
30
|
-
s.module_type
|
30
|
+
if s.module_type
|
31
|
+
s.module_type
|
32
|
+
else
|
33
|
+
self
|
34
|
+
end
|
31
35
|
end
|
32
36
|
|
33
|
-
|
34
|
-
|
37
|
+
@@fvs = Set[instance]
|
38
|
+
|
39
|
+
def free_variables
|
40
|
+
@@fvs
|
35
41
|
end
|
36
42
|
|
37
43
|
include Helper::NoChild
|
@@ -204,7 +204,7 @@ module Steep
|
|
204
204
|
when Logic::Base
|
205
205
|
RBS::Types::Bases::Bool.new(location: type.location)
|
206
206
|
else
|
207
|
-
raise "Unexpected type given: #{type} (#{type.class})"
|
207
|
+
__skip__ = raise "Unexpected type given: #{type} (#{type.class})"
|
208
208
|
end
|
209
209
|
end
|
210
210
|
|
@@ -248,7 +248,14 @@ module Steep
|
|
248
248
|
RBS::AST::TypeParam.new(
|
249
249
|
name: type_param.name,
|
250
250
|
variance: type_param.variance,
|
251
|
-
upper_bound: type_param.upper_bound&.yield_self {|u|
|
251
|
+
upper_bound: type_param.upper_bound&.yield_self {|u|
|
252
|
+
case u_ = type_1(u)
|
253
|
+
when RBS::Types::ClassInstance, RBS::Types::ClassSingleton, RBS::Types::Interface
|
254
|
+
u_
|
255
|
+
else
|
256
|
+
raise "`#{u_}` cannot be type parameter upper bound"
|
257
|
+
end
|
258
|
+
},
|
252
259
|
location: type_param.location
|
253
260
|
).unchecked!(type_param.unchecked)
|
254
261
|
end
|
@@ -23,11 +23,16 @@ module Steep
|
|
23
23
|
alias eql? ==
|
24
24
|
|
25
25
|
def subst(s)
|
26
|
-
s.instance_type
|
26
|
+
if s.instance_type
|
27
|
+
s.instance_type
|
28
|
+
else
|
29
|
+
self
|
30
|
+
end
|
27
31
|
end
|
28
32
|
|
29
|
-
|
30
|
-
|
33
|
+
@@fvs = Set[instance]
|
34
|
+
def free_variables
|
35
|
+
@@fvs
|
31
36
|
end
|
32
37
|
|
33
38
|
include Helper::NoChild
|
@@ -35,7 +35,7 @@ module Steep
|
|
35
35
|
when 0
|
36
36
|
AST::Types::Top.new(location: location)
|
37
37
|
when 1
|
38
|
-
tys.first
|
38
|
+
tys.first || raise
|
39
39
|
else
|
40
40
|
new(types: dups.to_a, location: location)
|
41
41
|
end
|
@@ -73,7 +73,11 @@ module Steep
|
|
73
73
|
include Helper::ChildrenLevel
|
74
74
|
|
75
75
|
def each_child(&block)
|
76
|
-
|
76
|
+
if block
|
77
|
+
types.each(&block)
|
78
|
+
else
|
79
|
+
types.each
|
80
|
+
end
|
77
81
|
end
|
78
82
|
|
79
83
|
def level
|
data/lib/steep/ast/types/name.rb
CHANGED
@@ -51,14 +51,16 @@ module Steep
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def with_location(new_location)
|
54
|
-
self.class.new(name: name, args: args, location: new_location)
|
54
|
+
_ = self.class.new(name: name, args: args, location: new_location)
|
55
55
|
end
|
56
56
|
|
57
57
|
def subst(s)
|
58
58
|
if free_variables.intersect?(s.domain)
|
59
|
-
self.class.new(
|
60
|
-
|
61
|
-
|
59
|
+
_ = self.class.new(
|
60
|
+
location: location,
|
61
|
+
name: name,
|
62
|
+
args: args.map {|a| a.subst(s) }
|
63
|
+
)
|
62
64
|
else
|
63
65
|
self
|
64
66
|
end
|
@@ -73,7 +75,11 @@ module Steep
|
|
73
75
|
end
|
74
76
|
|
75
77
|
def each_child(&block)
|
76
|
-
|
78
|
+
if block
|
79
|
+
args.each(&block)
|
80
|
+
else
|
81
|
+
args.each
|
82
|
+
end
|
77
83
|
end
|
78
84
|
|
79
85
|
include Helper::ChildrenLevel
|
data/lib/steep/ast/types/proc.rb
CHANGED
@@ -68,10 +68,6 @@ module Steep
|
|
68
68
|
[0] + level_of_children(children)
|
69
69
|
end
|
70
70
|
|
71
|
-
def closed?
|
72
|
-
type.closed? && (block.nil? || block.closed?) && (self_type ? self_type.closed? : false)
|
73
|
-
end
|
74
|
-
|
75
71
|
def with_location(new_location)
|
76
72
|
self.class.new(location: new_location, block: block, type: type, self_type: self_type)
|
77
73
|
end
|
@@ -103,7 +99,11 @@ module Steep
|
|
103
99
|
end
|
104
100
|
|
105
101
|
def block_required?
|
106
|
-
|
102
|
+
if block
|
103
|
+
!block.optional?
|
104
|
+
else
|
105
|
+
false
|
106
|
+
end
|
107
107
|
end
|
108
108
|
|
109
109
|
def each_child(&block)
|
data/lib/steep/ast/types/self.rb
CHANGED
@@ -29,11 +29,17 @@ module Steep
|
|
29
29
|
include Helper::NoChild
|
30
30
|
|
31
31
|
def subst(s)
|
32
|
-
s.self_type
|
32
|
+
if s.self_type
|
33
|
+
s.self_type
|
34
|
+
else
|
35
|
+
self
|
36
|
+
end
|
33
37
|
end
|
34
38
|
|
39
|
+
@@fvs = Set[instance]
|
40
|
+
|
35
41
|
def free_variables
|
36
|
-
|
42
|
+
@@fvs
|
37
43
|
end
|
38
44
|
|
39
45
|
def level
|
@@ -31,17 +31,19 @@ module Steep
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def free_variables()
|
34
|
-
@fvs ||= Set
|
35
|
-
|
36
|
-
set.merge(type.free_variables)
|
37
|
-
end
|
34
|
+
@fvs ||= each_child.with_object(Set[]) do |type, set| #$ Set[variable]
|
35
|
+
set.merge(type.free_variables)
|
38
36
|
end
|
39
37
|
end
|
40
38
|
|
41
39
|
include Helper::ChildrenLevel
|
42
40
|
|
43
41
|
def each_child(&block)
|
44
|
-
|
42
|
+
if block
|
43
|
+
types.each(&block)
|
44
|
+
else
|
45
|
+
types.each
|
46
|
+
end
|
45
47
|
end
|
46
48
|
|
47
49
|
def level
|
@@ -12,7 +12,9 @@ module Steep
|
|
12
12
|
|
13
13
|
def self.build(types:, location: nil)
|
14
14
|
return AST::Types::Bot.new if types.empty?
|
15
|
-
|
15
|
+
if types.size == 1
|
16
|
+
return types.first || raise
|
17
|
+
end
|
16
18
|
|
17
19
|
types.flat_map do |type|
|
18
20
|
if type.is_a?(Union)
|
@@ -36,7 +38,7 @@ module Steep
|
|
36
38
|
when 0
|
37
39
|
AST::Types::Bot.new
|
38
40
|
when 1
|
39
|
-
tys.first
|
41
|
+
tys.first || raise
|
40
42
|
else
|
41
43
|
new(types: tys, location: location)
|
42
44
|
end
|
@@ -49,7 +51,7 @@ module Steep
|
|
49
51
|
end
|
50
52
|
|
51
53
|
def hash
|
52
|
-
@hash ||= types.inject(self.class.hash) {|c, type| type.hash ^ c }
|
54
|
+
@hash ||= types.inject(self.class.hash) {|c, type| type.hash ^ c } #$ Integer
|
53
55
|
end
|
54
56
|
|
55
57
|
alias eql? ==
|
@@ -71,7 +73,11 @@ module Steep
|
|
71
73
|
end
|
72
74
|
|
73
75
|
def each_child(&block)
|
74
|
-
|
76
|
+
if block
|
77
|
+
types.each(&block)
|
78
|
+
else
|
79
|
+
types.each
|
80
|
+
end
|
75
81
|
end
|
76
82
|
|
77
83
|
include Helper::ChildrenLevel
|
data/lib/steep/ast/types/var.rb
CHANGED
@@ -6,7 +6,7 @@ module Steep
|
|
6
6
|
attr_reader :types_size
|
7
7
|
|
8
8
|
def initialize(vars_size:, types_size:)
|
9
|
-
@
|
9
|
+
@vars_size = vars_size
|
10
10
|
@types_size = types_size
|
11
11
|
|
12
12
|
super "Invalid substitution: vars.size=#{vars_size}, types.size=#{types_size}"
|
@@ -43,15 +43,15 @@ module Steep
|
|
43
43
|
set = Set.new
|
44
44
|
|
45
45
|
set.merge(dictionary.keys)
|
46
|
-
set << AST::Types::
|
47
|
-
set << AST::Types::Class.instance
|
48
|
-
set << AST::Types::Instance.instance
|
46
|
+
set << AST::Types::Self.instance if self_type
|
47
|
+
set << AST::Types::Class.instance if module_type
|
48
|
+
set << AST::Types::Instance.instance if instance_type
|
49
49
|
|
50
50
|
set
|
51
51
|
end
|
52
52
|
|
53
53
|
def to_s
|
54
|
-
a = []
|
54
|
+
a = [] #: Array[String]
|
55
55
|
|
56
56
|
dictionary.each do |x, ty|
|
57
57
|
a << "#{x} -> #{ty}"
|
@@ -87,12 +87,13 @@ module Steep
|
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
-
def self.build(vars, types = nil, instance_type:
|
90
|
+
def self.build(vars, types = nil, instance_type: nil, module_type: nil, self_type: nil)
|
91
91
|
types ||= vars.map {|var| AST::Types::Var.fresh(var) }
|
92
92
|
|
93
93
|
raise InvalidSubstitutionError.new(vars_size: vars.size, types_size: types.size) unless vars.size == types.size
|
94
94
|
|
95
|
-
dic = vars.zip(types).each.with_object({}) do |(var, type), d|
|
95
|
+
dic = vars.zip(types).each.with_object({}) do |(var, type), d| #$ Hash[Symbol, AST::Types::t]
|
96
|
+
type or raise
|
96
97
|
d[var] = type
|
97
98
|
end
|
98
99
|
|
@@ -130,9 +131,9 @@ module Steep
|
|
130
131
|
end
|
131
132
|
end
|
132
133
|
|
133
|
-
@instance_type = instance_type.subst(s)
|
134
|
-
@module_type = module_type.subst(s)
|
135
|
-
@self_type = self_type.subst(s)
|
134
|
+
@instance_type = instance_type.subst(s) if instance_type
|
135
|
+
@module_type = module_type.subst(s) if module_type
|
136
|
+
@self_type = self_type.subst(s) if self_type
|
136
137
|
|
137
138
|
self
|
138
139
|
end
|
@@ -270,9 +270,9 @@ module Steep
|
|
270
270
|
mixin_constraints(definition, ancestors.included_modules || raise, immediate_self_types: ancestors.self_types).each do |relation, ancestor|
|
271
271
|
checker.check(
|
272
272
|
relation,
|
273
|
-
self_type: AST::Types::Self.
|
274
|
-
instance_type: AST::Types::Instance.
|
275
|
-
class_type: AST::Types::Class.
|
273
|
+
self_type: AST::Types::Self.instance,
|
274
|
+
instance_type: AST::Types::Instance.instance,
|
275
|
+
class_type: AST::Types::Class.instance,
|
276
276
|
constraints: Subtyping::Constraints.empty
|
277
277
|
).else do
|
278
278
|
raise if ancestor.source.is_a?(Symbol)
|
@@ -314,16 +314,16 @@ module Steep
|
|
314
314
|
relation = Subtyping::Relation.new(sub_type: var_type, super_type: parent_type)
|
315
315
|
result1 = checker.check(
|
316
316
|
relation,
|
317
|
-
self_type: AST::Types::Self.
|
318
|
-
instance_type: AST::Types::Instance.
|
319
|
-
class_type: AST::Types::Class.
|
317
|
+
self_type: AST::Types::Self.instance,
|
318
|
+
instance_type: AST::Types::Instance.instance,
|
319
|
+
class_type: AST::Types::Class.instance,
|
320
320
|
constraints: Subtyping::Constraints.empty
|
321
321
|
)
|
322
322
|
result2 = checker.check(
|
323
323
|
relation.flip,
|
324
|
-
self_type: AST::Types::Self.
|
325
|
-
instance_type: AST::Types::Instance.
|
326
|
-
class_type: AST::Types::Class.
|
324
|
+
self_type: AST::Types::Self.instance,
|
325
|
+
instance_type: AST::Types::Instance.instance,
|
326
|
+
class_type: AST::Types::Class.instance,
|
327
327
|
constraints: Subtyping::Constraints.empty
|
328
328
|
)
|
329
329
|
|
@@ -362,13 +362,13 @@ module Steep
|
|
362
362
|
mixin_constraints(definition, ancestors.extended_modules, immediate_self_types: ancestors.self_types).each do |relation, ancestor|
|
363
363
|
checker.check(
|
364
364
|
relation,
|
365
|
-
self_type: AST::Types::Self.
|
366
|
-
instance_type: AST::Types::Instance.
|
367
|
-
class_type: AST::Types::Class.
|
365
|
+
self_type: AST::Types::Self.instance ,
|
366
|
+
instance_type: AST::Types::Instance.instance,
|
367
|
+
class_type: AST::Types::Class.instance,
|
368
368
|
constraints: Subtyping::Constraints.empty
|
369
369
|
).else do
|
370
370
|
raise if ancestor.source.is_a?(Symbol)
|
371
|
-
|
371
|
+
|
372
372
|
@errors << Diagnostic::Signature::ModuleSelfTypeError.new(
|
373
373
|
name: name,
|
374
374
|
location: ancestor.source&.location || raise,
|
@@ -390,14 +390,14 @@ module Steep
|
|
390
390
|
# 4. none of the above (example: T = String, K = Integer)
|
391
391
|
|
392
392
|
relation = Subtyping::Relation.new(sub_type: type, super_type: instance_type)
|
393
|
-
if subtyping.check(relation, constraints: Subtyping::Constraints.empty, self_type: AST::Types::Self.
|
393
|
+
if subtyping.check(relation, constraints: Subtyping::Constraints.empty, self_type: AST::Types::Self.instance, instance_type: AST::Types::Instance.instance, class_type: AST::Types::Class.instance).success?
|
394
394
|
# 1 or 2. Satisfies the condition, no narrowing because `type` is already more specific than/equals to `instance_type`
|
395
395
|
[
|
396
396
|
[type],
|
397
397
|
[]
|
398
398
|
]
|
399
399
|
else
|
400
|
-
if subtyping.check(relation.flip, constraints: Subtyping::Constraints.empty, self_type: AST::Types::Self.
|
400
|
+
if subtyping.check(relation.flip, constraints: Subtyping::Constraints.empty, self_type: AST::Types::Self.instance, instance_type: AST::Types::Instance.instance, class_type: AST::Types::Class.instance).success?
|
401
401
|
# 3. Satisfied the condition, narrows to `instance_type`, but cannot remove it from *falsy* list
|
402
402
|
[
|
403
403
|
[instance_type],
|
data/lib/steep/version.rb
CHANGED
data/lib/steep.rb
CHANGED
@@ -93,7 +93,6 @@ require "steep/type_inference/type_env_builder"
|
|
93
93
|
require "steep/type_inference/logic_type_interpreter"
|
94
94
|
require "steep/type_inference/multiple_assignment"
|
95
95
|
require "steep/type_inference/method_call"
|
96
|
-
require "steep/ast/types"
|
97
96
|
|
98
97
|
require "steep/index/rbs_index"
|
99
98
|
require "steep/index/signature_symbol_provider"
|
data/sig/steep/ast/builtin.rbs
CHANGED
data/sig/steep/ast/types/any.rbs
CHANGED
@@ -6,15 +6,15 @@ module Steep
|
|
6
6
|
|
7
7
|
def initialize: (?location: untyped?) -> void
|
8
8
|
|
9
|
-
def ==: (untyped other) ->
|
9
|
+
def ==: (untyped other) -> bool
|
10
10
|
|
11
|
-
def hash: () ->
|
11
|
+
def hash: () -> Integer
|
12
12
|
|
13
13
|
alias eql? ==
|
14
14
|
|
15
|
-
def subst: (
|
15
|
+
def subst: (Interface::Substitution s) -> Any
|
16
16
|
|
17
|
-
def to_s: () ->
|
17
|
+
def to_s: () -> String
|
18
18
|
|
19
19
|
include Helper::NoFreeVariables
|
20
20
|
|
@@ -22,7 +22,7 @@ module Steep
|
|
22
22
|
|
23
23
|
def level: () -> Array[Integer]
|
24
24
|
|
25
|
-
def with_location: (untyped new_location) ->
|
25
|
+
def with_location: (untyped new_location) -> Any
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -6,15 +6,15 @@ module Steep
|
|
6
6
|
|
7
7
|
def initialize: (?location: untyped?) -> void
|
8
8
|
|
9
|
-
def ==: (untyped other) ->
|
9
|
+
def ==: (untyped other) -> bool
|
10
10
|
|
11
|
-
def hash: () ->
|
11
|
+
def hash: () -> Integer
|
12
12
|
|
13
13
|
alias eql? ==
|
14
14
|
|
15
|
-
def subst: (
|
15
|
+
def subst: (Interface::Substitution) -> Boolean
|
16
16
|
|
17
|
-
def to_s: () ->
|
17
|
+
def to_s: () -> String
|
18
18
|
|
19
19
|
include Helper::NoFreeVariables
|
20
20
|
|
@@ -22,9 +22,9 @@ module Steep
|
|
22
22
|
|
23
23
|
def level: () -> Array[Integer]
|
24
24
|
|
25
|
-
def with_location: (untyped new_location) ->
|
25
|
+
def with_location: (untyped new_location) -> Boolean
|
26
26
|
|
27
|
-
def back_type: () ->
|
27
|
+
def back_type: () -> t
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
data/sig/steep/ast/types/bot.rbs
CHANGED
@@ -6,15 +6,15 @@ module Steep
|
|
6
6
|
|
7
7
|
def initialize: (?location: untyped?) -> void
|
8
8
|
|
9
|
-
def ==: (untyped other) ->
|
9
|
+
def ==: (untyped other) -> bool
|
10
10
|
|
11
|
-
def hash: () ->
|
11
|
+
def hash: () -> Integer
|
12
12
|
|
13
13
|
alias eql? ==
|
14
14
|
|
15
|
-
def subst: (
|
15
|
+
def subst: (Interface::Substitution) -> Bot
|
16
16
|
|
17
|
-
def to_s: () ->
|
17
|
+
def to_s: () -> String
|
18
18
|
|
19
19
|
include Helper::NoFreeVariables
|
20
20
|
|
@@ -22,7 +22,7 @@ module Steep
|
|
22
22
|
|
23
23
|
def level: () -> Array[Integer]
|
24
24
|
|
25
|
-
def with_location: (untyped new_location) ->
|
25
|
+
def with_location: (untyped new_location) -> Bot
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -6,23 +6,24 @@ module Steep
|
|
6
6
|
|
7
7
|
def initialize: (?location: untyped?) -> void
|
8
8
|
|
9
|
-
def to_s: () ->
|
9
|
+
def to_s: () -> String
|
10
10
|
|
11
|
-
def ==: (untyped other) ->
|
11
|
+
def ==: (untyped other) -> bool
|
12
12
|
|
13
|
-
def hash: () ->
|
13
|
+
def hash: () -> Integer
|
14
14
|
|
15
15
|
alias eql? ==
|
16
16
|
|
17
|
-
def subst: (
|
17
|
+
def subst: (Interface::Substitution s) -> t
|
18
18
|
|
19
|
-
|
19
|
+
@@fvs: Set[variable]
|
20
|
+
def free_variables: () -> Set[variable]
|
20
21
|
|
21
22
|
include Helper::NoChild
|
22
23
|
|
23
24
|
def level: () -> Array[Integer]
|
24
25
|
|
25
|
-
def with_location: (untyped new_location) ->
|
26
|
+
def with_location: (untyped new_location) -> Class
|
26
27
|
|
27
28
|
self.@instance: Class
|
28
29
|
def self.instance: () -> Class
|