steep 1.7.0.dev.2 → 1.7.0.dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -12
- data/gemfile_steep/Gemfile.lock +8 -10
- data/lib/steep/ast/types/helper.rb +4 -0
- data/lib/steep/ast/types/intersection.rb +7 -0
- data/lib/steep/ast/types/record.rb +7 -0
- data/lib/steep/ast/types/tuple.rb +7 -0
- data/lib/steep/ast/types/union.rb +7 -0
- data/lib/steep/drivers/stats.rb +2 -2
- data/lib/steep/drivers/validate.rb +4 -2
- data/lib/steep/expectations.rb +2 -2
- data/lib/steep/interface/builder.rb +336 -360
- data/lib/steep/interface/function.rb +69 -6
- data/lib/steep/interface/method_type.rb +3 -3
- data/lib/steep/interface/shape.rb +69 -18
- data/lib/steep/interface/substitution.rb +4 -0
- data/lib/steep/node_helper.rb +18 -1
- data/lib/steep/services/completion_provider.rb +19 -17
- data/lib/steep/services/signature_help_provider.rb +6 -9
- data/lib/steep/subtyping/check.rb +4 -16
- data/lib/steep/test.rb +9 -0
- data/lib/steep/type_construction.rb +13 -9
- data/lib/steep/type_inference/block_params.rb +11 -3
- data/lib/steep/type_inference/context.rb +1 -1
- data/lib/steep/type_inference/logic_type_interpreter.rb +1 -1
- data/lib/steep/version.rb +1 -1
- data/lib/steep.rb +11 -7
- data/sig/steep/ast/types/helper.rbs +2 -0
- data/sig/steep/ast/types/intersection.rbs +2 -0
- data/sig/steep/ast/types/name.rbs +4 -0
- data/sig/steep/ast/types/record.rbs +2 -0
- data/sig/steep/ast/types/tuple.rbs +2 -0
- data/sig/steep/ast/types/union.rbs +2 -0
- data/sig/steep/expectations.rbs +1 -1
- data/sig/steep/interface/block.rbs +2 -2
- data/sig/steep/interface/builder.rbs +94 -108
- data/sig/steep/interface/function.rbs +34 -29
- data/sig/steep/interface/shape.rbs +23 -4
- data/sig/steep/interface/substitution.rbs +2 -0
- data/sig/steep/node_helper.rbs +11 -0
- data/sig/steep/services/signature_help_provider.rbs +2 -0
- data/sig/steep/subtyping/constraints.rbs +2 -2
- data/sig/steep/type_construction.rbs +1 -1
- data/sig/steep/type_inference/block_params.rbs +2 -2
- data/sig/steep/type_inference/context.rbs +2 -0
- data/sig/steep.rbs +1 -1
- metadata +3 -2
data/sig/steep/node_helper.rbs
CHANGED
@@ -66,6 +66,17 @@ module Steep
|
|
66
66
|
|
67
67
|
def test_send_node: (Node) { (Node?, Symbol, Array[Node], send_loc) -> bool } -> bool
|
68
68
|
|
69
|
+
# Returns if given node allows calling private method
|
70
|
+
#
|
71
|
+
# The node must be:
|
72
|
+
#
|
73
|
+
# * A `send` node,
|
74
|
+
# * A `csend` node,
|
75
|
+
# * A `block` node, or
|
76
|
+
# * A `nblock` node
|
77
|
+
#
|
78
|
+
def private_send?: (Node) -> bool
|
79
|
+
|
69
80
|
# Deconstruct sendish node and it's associated block node
|
70
81
|
#
|
71
82
|
# Receives a sequence of node tree where the leaf node comes first.
|
@@ -91,8 +91,8 @@ module Steep
|
|
91
91
|
|
92
92
|
def lower_bound: (Symbol var, ?skip: bool) -> AST::Types::t
|
93
93
|
|
94
|
-
def solution: (Check checker, variables: Enumerable[
|
95
|
-
| (Check checker, variables: Enumerable[
|
94
|
+
def solution: (Check checker, variables: Enumerable[AST::Types::variable], variance: VariableVariance, self_type: AST::Types::t, instance_type: AST::Types::t, class_type: AST::Types::t) -> Interface::Substitution
|
95
|
+
| (Check checker, variables: Enumerable[AST::Types::variable], context: Context) -> Interface::Substitution
|
96
96
|
|
97
97
|
def has_constraint?: (Symbol var) -> bool
|
98
98
|
|
@@ -325,7 +325,7 @@ module Steep
|
|
325
325
|
def set_up_block_mlhs_params_env: (
|
326
326
|
Parser::AST::Node mlhs_node,
|
327
327
|
AST::Types::t type,
|
328
|
-
Hash[Symbol
|
328
|
+
Hash[Symbol?, AST::Types::t]
|
329
329
|
) { (Parser::AST::Node error_mlhs_node, AST::Types::t type) -> void } -> void
|
330
330
|
|
331
331
|
# Returns a Pair of
|
@@ -37,7 +37,7 @@ module Steep
|
|
37
37
|
# * `node` is the node of the parameter
|
38
38
|
#
|
39
39
|
class Param
|
40
|
-
attr_reader var: Symbol
|
40
|
+
attr_reader var: Symbol?
|
41
41
|
|
42
42
|
attr_reader type: AST::Types::t?
|
43
43
|
|
@@ -45,7 +45,7 @@ module Steep
|
|
45
45
|
|
46
46
|
attr_reader node: Parser::AST::Node
|
47
47
|
|
48
|
-
def initialize: (var: Symbol
|
48
|
+
def initialize: (var: Symbol?, type: AST::Types::t?, value: Parser::AST::Node?, node: Parser::AST::Node) -> void
|
49
49
|
|
50
50
|
def ==: (untyped other) -> bool
|
51
51
|
|
@@ -147,6 +147,8 @@ module Steep
|
|
147
147
|
# Returns the upper bound of a type variable
|
148
148
|
def []: (Symbol name) -> AST::Types::t?
|
149
149
|
|
150
|
+
@upper_bounds: Hash[Symbol, AST::Types::t]?
|
151
|
+
|
150
152
|
def upper_bounds: () -> Hash[Symbol, AST::Types::t]
|
151
153
|
|
152
154
|
def self.empty: () -> TypeVariableContext
|
data/sig/steep.rbs
CHANGED
@@ -14,7 +14,7 @@ module Steep
|
|
14
14
|
|
15
15
|
attr_accessor self.log_output: IO
|
16
16
|
|
17
|
-
def self.measure: [A] (String message, ?level: ::Symbol) { () -> A } -> A
|
17
|
+
def self.measure: [A] (String message, ?level: ::Symbol, ?threshold: Float) { () -> A } -> A
|
18
18
|
|
19
19
|
def self.log_error: (Exception exn, ?message: ::String) -> void
|
20
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: steep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.0.dev.
|
4
|
+
version: 1.7.0.dev.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -362,6 +362,7 @@ files:
|
|
362
362
|
- lib/steep/subtyping/relation.rb
|
363
363
|
- lib/steep/subtyping/result.rb
|
364
364
|
- lib/steep/subtyping/variable_variance.rb
|
365
|
+
- lib/steep/test.rb
|
365
366
|
- lib/steep/thread_waiter.rb
|
366
367
|
- lib/steep/type_construction.rb
|
367
368
|
- lib/steep/type_inference/block_params.rb
|