steep 0.39.0 → 0.40.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/Rakefile +5 -2
- data/bin/output_rebaseline.rb +49 -0
- data/bin/output_test.rb +93 -0
- data/lib/steep.rb +8 -3
- data/lib/steep/cli.rb +1 -1
- data/lib/steep/diagnostic/helper.rb +17 -0
- data/lib/steep/diagnostic/lsp_formatter.rb +16 -0
- data/lib/steep/diagnostic/ruby.rb +623 -0
- data/lib/steep/diagnostic/signature.rb +224 -0
- data/lib/steep/drivers/annotations.rb +13 -6
- data/lib/steep/drivers/check.rb +83 -60
- data/lib/steep/drivers/diagnostic_printer.rb +94 -0
- data/lib/steep/drivers/stats.rb +125 -29
- data/lib/steep/drivers/trace_printer.rb +5 -1
- data/lib/steep/drivers/validate.rb +13 -6
- data/lib/steep/drivers/watch.rb +26 -9
- data/lib/steep/drivers/worker.rb +5 -0
- data/lib/steep/project/options.rb +4 -4
- data/lib/steep/project/signature_file.rb +8 -2
- data/lib/steep/project/stats_calculator.rb +80 -0
- data/lib/steep/project/target.rb +64 -53
- data/lib/steep/range_extension.rb +29 -0
- data/lib/steep/server/base_worker.rb +42 -4
- data/lib/steep/server/code_worker.rb +37 -24
- data/lib/steep/server/interaction_worker.rb +1 -0
- data/lib/steep/server/master.rb +268 -82
- data/lib/steep/server/signature_worker.rb +7 -59
- data/lib/steep/server/worker_process.rb +9 -9
- data/lib/steep/signature/validator.rb +33 -9
- data/lib/steep/type_construction.rb +276 -194
- data/lib/steep/version.rb +1 -1
- data/smoke/alias/a.rb +0 -3
- data/smoke/alias/b.rb +0 -1
- data/smoke/alias/c.rb +0 -2
- data/smoke/alias/test.yaml +73 -0
- data/smoke/and/a.rb +0 -3
- data/smoke/and/test.yaml +24 -0
- data/smoke/array/a.rb +0 -3
- data/smoke/array/b.rb +0 -2
- data/smoke/array/c.rb +0 -1
- data/smoke/array/test.yaml +80 -0
- data/smoke/block/a.rb +0 -2
- data/smoke/block/b.rb +0 -2
- data/smoke/block/d.rb +0 -4
- data/smoke/block/test.yaml +96 -0
- data/smoke/broken/Steepfile +5 -0
- data/smoke/broken/broken.rb +0 -0
- data/smoke/broken/broken.rbs +0 -0
- data/smoke/broken/test.yaml +6 -0
- data/smoke/case/a.rb +0 -3
- data/smoke/case/test.yaml +36 -0
- data/smoke/class/a.rb +0 -3
- data/smoke/class/c.rb +0 -1
- data/smoke/class/f.rb +0 -1
- data/smoke/class/g.rb +0 -2
- data/smoke/class/i.rb +0 -2
- data/smoke/class/test.yaml +89 -0
- data/smoke/const/a.rb +0 -3
- data/smoke/const/b.rb +7 -0
- data/smoke/const/b.rbs +5 -0
- data/smoke/const/test.yaml +96 -0
- data/smoke/diagnostics-rbs-duplicated/Steepfile +5 -0
- data/smoke/diagnostics-rbs-duplicated/a.rbs +5 -0
- data/smoke/diagnostics-rbs-duplicated/test.yaml +10 -0
- data/smoke/diagnostics-rbs/Steepfile +5 -0
- data/smoke/diagnostics-rbs/duplicated-method-definition.rbs +20 -0
- data/smoke/diagnostics-rbs/generic-parameter-mismatch.rbs +7 -0
- data/smoke/diagnostics-rbs/invalid-method-overload.rbs +3 -0
- data/smoke/diagnostics-rbs/invalid-type-application.rbs +7 -0
- data/smoke/diagnostics-rbs/invalid_variance_annotation.rbs +3 -0
- data/smoke/diagnostics-rbs/recursive-alias.rbs +5 -0
- data/smoke/diagnostics-rbs/recursive-class.rbs +8 -0
- data/smoke/diagnostics-rbs/superclass-mismatch.rbs +7 -0
- data/smoke/diagnostics-rbs/test.yaml +142 -0
- data/smoke/diagnostics-rbs/unknown-method-alias.rbs +3 -0
- data/smoke/diagnostics-rbs/unknown-type-name.rbs +13 -0
- data/smoke/diagnostics/Steepfile +5 -0
- data/smoke/diagnostics/a.rbs +26 -0
- data/smoke/diagnostics/argument_type_mismatch.rb +1 -0
- data/smoke/diagnostics/block_body_type_mismatch.rb +1 -0
- data/smoke/diagnostics/block_type_mismatch.rb +3 -0
- data/smoke/diagnostics/break_type_mismatch.rb +1 -0
- data/smoke/diagnostics/else_on_exhaustive_case.rb +12 -0
- data/smoke/diagnostics/incompatible_annotation.rb +6 -0
- data/smoke/diagnostics/incompatible_argument.rb +1 -0
- data/smoke/diagnostics/incompatible_assignment.rb +8 -0
- data/smoke/diagnostics/method_arity_mismatch.rb +11 -0
- data/smoke/diagnostics/method_body_type_mismatch.rb +6 -0
- data/smoke/diagnostics/method_definition_missing.rb +2 -0
- data/smoke/diagnostics/method_return_type_annotation_mismatch.rb +7 -0
- data/smoke/diagnostics/missing_keyword.rb +1 -0
- data/smoke/diagnostics/no_method.rb +1 -0
- data/smoke/diagnostics/required_block_missing.rb +1 -0
- data/smoke/diagnostics/return_type_mismatch.rb +6 -0
- data/smoke/diagnostics/test.yaml +333 -0
- data/smoke/diagnostics/unexpected_block_given.rb +1 -0
- data/smoke/diagnostics/unexpected_dynamic_method.rb +3 -0
- data/smoke/diagnostics/unexpected_jump.rb +4 -0
- data/smoke/diagnostics/unexpected_jump_value.rb +3 -0
- data/smoke/diagnostics/unexpected_keyword.rb +1 -0
- data/smoke/diagnostics/unexpected_splat.rb +1 -0
- data/smoke/diagnostics/unexpected_yield.rb +6 -0
- data/smoke/diagnostics/unknown_constant_assigned.rb +7 -0
- data/smoke/diagnostics/unresolved_overloading.rb +1 -0
- data/smoke/diagnostics/unsatisfiable_constraint.rb +7 -0
- data/smoke/diagnostics/unsupported_syntax.rb +2 -0
- data/smoke/dstr/a.rb +0 -1
- data/smoke/dstr/test.yaml +10 -0
- data/smoke/ensure/a.rb +0 -4
- data/smoke/ensure/test.yaml +47 -0
- data/smoke/enumerator/a.rb +0 -6
- data/smoke/enumerator/b.rb +0 -3
- data/smoke/enumerator/test.yaml +100 -0
- data/smoke/extension/a.rb +0 -1
- data/smoke/extension/b.rb +0 -2
- data/smoke/extension/c.rb +0 -1
- data/smoke/extension/test.yaml +50 -0
- data/smoke/hash/b.rb +0 -1
- data/smoke/hash/c.rb +0 -3
- data/smoke/hash/d.rb +0 -1
- data/smoke/hash/e.rb +0 -1
- data/smoke/hash/test.yaml +62 -0
- data/smoke/hello/hello.rb +0 -2
- data/smoke/hello/test.yaml +18 -0
- data/smoke/if/a.rb +0 -2
- data/smoke/if/test.yaml +27 -0
- data/smoke/implements/a.rb +0 -2
- data/smoke/implements/test.yaml +16 -0
- data/smoke/initialize/test.yaml +4 -0
- data/smoke/integer/a.rb +0 -7
- data/smoke/integer/test.yaml +66 -0
- data/smoke/interface/a.rb +0 -2
- data/smoke/interface/test.yaml +16 -0
- data/smoke/kwbegin/a.rb +0 -1
- data/smoke/kwbegin/test.yaml +14 -0
- data/smoke/lambda/a.rb +1 -4
- data/smoke/lambda/test.yaml +28 -0
- data/smoke/literal/a.rb +0 -5
- data/smoke/literal/b.rb +0 -2
- data/smoke/literal/test.yaml +79 -0
- data/smoke/map/test.yaml +4 -0
- data/smoke/method/a.rb +0 -5
- data/smoke/method/b.rb +0 -1
- data/smoke/method/test.yaml +71 -0
- data/smoke/module/a.rb +0 -2
- data/smoke/module/b.rb +0 -2
- data/smoke/module/c.rb +0 -1
- data/smoke/module/d.rb +0 -1
- data/smoke/module/f.rb +0 -2
- data/smoke/module/test.yaml +51 -0
- data/smoke/regexp/a.rb +0 -38
- data/smoke/regexp/b.rb +0 -26
- data/smoke/regexp/test.yaml +372 -0
- data/smoke/regression/set_divide.rb +0 -4
- data/smoke/regression/test.yaml +38 -0
- data/smoke/rescue/a.rb +0 -5
- data/smoke/rescue/test.yaml +60 -0
- data/smoke/self/a.rb +0 -2
- data/smoke/self/test.yaml +16 -0
- data/smoke/skip/skip.rb +0 -2
- data/smoke/skip/test.yaml +16 -0
- data/smoke/stdout/test.yaml +4 -0
- data/smoke/super/a.rb +0 -4
- data/smoke/super/test.yaml +52 -0
- data/smoke/toplevel/a.rb +0 -1
- data/smoke/toplevel/test.yaml +12 -0
- data/smoke/tsort/a.rb +0 -3
- data/smoke/tsort/test.yaml +32 -0
- data/smoke/type_case/a.rb +0 -4
- data/smoke/type_case/test.yaml +33 -0
- data/smoke/yield/a.rb +0 -3
- data/smoke/yield/b.rb +6 -0
- data/smoke/yield/test.yaml +49 -0
- data/steep.gemspec +3 -3
- metadata +108 -17
- data/bin/smoke_runner.rb +0 -139
- data/lib/steep/drivers/signature_error_printer.rb +0 -25
- data/lib/steep/errors.rb +0 -594
- data/lib/steep/signature/errors.rb +0 -128
- data/lib/steep/type_assignability.rb +0 -367
@@ -0,0 +1,26 @@
|
|
1
|
+
class BlockBodyTypeMismatch
|
2
|
+
def foo: () { () -> Integer } -> void
|
3
|
+
end
|
4
|
+
|
5
|
+
class MethodDefinitionMissing
|
6
|
+
def foo: () -> void
|
7
|
+
end
|
8
|
+
|
9
|
+
class UnexpectedDynamicMethod
|
10
|
+
def bar: () -> void
|
11
|
+
end
|
12
|
+
|
13
|
+
class UnknownConstantAssigned
|
14
|
+
end
|
15
|
+
|
16
|
+
class UnsatisfiableConstraint
|
17
|
+
def foo: [A, B] (A) { (A) -> void } -> B
|
18
|
+
end
|
19
|
+
|
20
|
+
class UnexpectedKeyword
|
21
|
+
def foo: (foo: Integer) -> void
|
22
|
+
end
|
23
|
+
|
24
|
+
class MissingKeyword
|
25
|
+
def foo: (?String, foo: Integer, ?bar: Symbol) -> void
|
26
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[123].at("")
|
@@ -0,0 +1 @@
|
|
1
|
+
BlockBodyTypeMismatch.new.foo { "" }
|
@@ -0,0 +1 @@
|
|
1
|
+
123.tap { break "" }
|
@@ -0,0 +1 @@
|
|
1
|
+
[123].at(1,2,3)
|
@@ -0,0 +1 @@
|
|
1
|
+
MissingKeyword.new.foo bar: :bar
|
@@ -0,0 +1 @@
|
|
1
|
+
1.foo()
|
@@ -0,0 +1 @@
|
|
1
|
+
123.tap()
|
@@ -0,0 +1,333 @@
|
|
1
|
+
---
|
2
|
+
test:
|
3
|
+
argument_type_mismatch.rb:
|
4
|
+
diagnostics:
|
5
|
+
- |
|
6
|
+
argument_type_mismatch.rb:1:9: [error] Cannot pass a value of type `::String` as an argument of type `::int`
|
7
|
+
│ ::String <: ::int
|
8
|
+
│ ::String <: (::Integer | ::_ToInt)
|
9
|
+
│ ::String <: ::Integer
|
10
|
+
│ ::Object <: ::Integer
|
11
|
+
│ ::BasicObject <: ::Integer
|
12
|
+
│
|
13
|
+
│ Diagnostic ID: Ruby::ArgumentTypeMismatch
|
14
|
+
│
|
15
|
+
└ [123].at("")
|
16
|
+
~~
|
17
|
+
block_body_type_mismatch.rb:
|
18
|
+
diagnostics:
|
19
|
+
- |
|
20
|
+
block_body_type_mismatch.rb:1:30: [error] Cannot allow block body have type `::String` because declared as type `::Integer`
|
21
|
+
│ ::String <: ::Integer
|
22
|
+
│ ::Object <: ::Integer
|
23
|
+
│ ::BasicObject <: ::Integer
|
24
|
+
│
|
25
|
+
│ Diagnostic ID: Ruby::BlockBodyTypeMismatch
|
26
|
+
│
|
27
|
+
└ BlockBodyTypeMismatch.new.foo { "" }
|
28
|
+
~~~~~~
|
29
|
+
block_type_mismatch.rb:
|
30
|
+
diagnostics:
|
31
|
+
- |
|
32
|
+
block_type_mismatch.rb:3:8: [error] Cannot pass a value of type `^(untyped, untyped, untyped) -> untyped` as a block-pass-argument of type `^(::Integer) -> void`
|
33
|
+
│ ^(untyped, untyped, untyped) -> untyped <: ^(::Integer) -> void
|
34
|
+
│
|
35
|
+
│ Diagnostic ID: Ruby::BlockTypeMismatch
|
36
|
+
│
|
37
|
+
└ 123.tap(&lam)
|
38
|
+
~~~~
|
39
|
+
break_type_mismatch.rb:
|
40
|
+
diagnostics:
|
41
|
+
- |
|
42
|
+
break_type_mismatch.rb:1:10: [error] Cannot break with a value of type `::String` because type `::Integer` is assumed
|
43
|
+
│ ::String <: ::Integer
|
44
|
+
│ ::Object <: ::Integer
|
45
|
+
│ ::BasicObject <: ::Integer
|
46
|
+
│
|
47
|
+
│ Diagnostic ID: Ruby::BreakTypeMismatch
|
48
|
+
│
|
49
|
+
└ 123.tap { break "" }
|
50
|
+
~~~~~~~~
|
51
|
+
else_on_exhaustive_case.rb:
|
52
|
+
diagnostics:
|
53
|
+
- |
|
54
|
+
else_on_exhaustive_case.rb:11:2: [error] The branch is unreachable because the condition is exhaustive
|
55
|
+
│ Diagnostic ID: Ruby::ElseOnExhaustiveCase
|
56
|
+
│
|
57
|
+
└ raise "Unexpected value"
|
58
|
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
59
|
+
incompatible_annotation.rb:
|
60
|
+
diagnostics:
|
61
|
+
- |
|
62
|
+
incompatible_annotation.rb:5:2: [error] Type annotation about `a` is incompatible since ::String <: ::Array[::Integer] doesn't hold
|
63
|
+
│ ::String <: ::Array[::Integer]
|
64
|
+
│ ::Object <: ::Array[::Integer]
|
65
|
+
│ ::BasicObject <: ::Array[::Integer]
|
66
|
+
│
|
67
|
+
│ Diagnostic ID: Ruby::IncompatibleAnnotation
|
68
|
+
│
|
69
|
+
└ a + ""
|
70
|
+
~~~~~~
|
71
|
+
incompatible_argument.rb:
|
72
|
+
diagnostics:
|
73
|
+
- |
|
74
|
+
incompatible_argument.rb:1:6: [error] Cannot find method `at` of type `::Array[::Integer]` with compatible arity
|
75
|
+
│ Method types:
|
76
|
+
│ def at: (::int) -> (::Integer | nil)
|
77
|
+
│
|
78
|
+
│ Diagnostic ID: Ruby::IncompatibleArguments
|
79
|
+
│
|
80
|
+
└ [123].at(1,2,3)
|
81
|
+
~~
|
82
|
+
incompatible_assignment.rb:
|
83
|
+
diagnostics:
|
84
|
+
- |
|
85
|
+
incompatible_assignment.rb:2:0: [error] Cannot assign a value of type `::Integer` to a variable of type `::String`
|
86
|
+
│ ::Integer <: ::String
|
87
|
+
│ ::Numeric <: ::String
|
88
|
+
│ ::Object <: ::String
|
89
|
+
│ ::BasicObject <: ::String
|
90
|
+
│
|
91
|
+
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
92
|
+
│
|
93
|
+
└ x = 3
|
94
|
+
~~~~~
|
95
|
+
- |
|
96
|
+
incompatible_assignment.rb:5:0: [error] Cannot assign a value of type `::Integer` to a constant of type `::String`
|
97
|
+
│ ::Integer <: ::String
|
98
|
+
│ ::Numeric <: ::String
|
99
|
+
│ ::Object <: ::String
|
100
|
+
│ ::BasicObject <: ::String
|
101
|
+
│
|
102
|
+
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
103
|
+
│
|
104
|
+
└ X = 123
|
105
|
+
~~~~~~~
|
106
|
+
- |
|
107
|
+
incompatible_assignment.rb:8:0: [error] Cannot assign a value of type `::Symbol` to a variable of type `::Integer`
|
108
|
+
│ ::Symbol <: ::Integer
|
109
|
+
│ ::Object <: ::Integer
|
110
|
+
│ ::BasicObject <: ::Integer
|
111
|
+
│
|
112
|
+
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
113
|
+
│
|
114
|
+
└ @x = :foo
|
115
|
+
~~~~~~~~~
|
116
|
+
method_arity_mismatch.rb:
|
117
|
+
diagnostics:
|
118
|
+
- |
|
119
|
+
method_arity_mismatch.rb:3:9: [error] Method parameters are incompatible with declaration `() -> void`
|
120
|
+
│ Diagnostic ID: Ruby::MethodArityMismatch
|
121
|
+
│
|
122
|
+
└ def foo(x)
|
123
|
+
~~~
|
124
|
+
- |
|
125
|
+
method_arity_mismatch.rb:8:11: [error] Method parameters are incompatible with declaration `(::String) -> void`
|
126
|
+
│ Diagnostic ID: Ruby::MethodArityMismatch
|
127
|
+
│
|
128
|
+
└ def self.bar
|
129
|
+
~~~
|
130
|
+
method_body_type_mismatch.rb:
|
131
|
+
diagnostics:
|
132
|
+
- |
|
133
|
+
method_body_type_mismatch.rb:3:2: [error] Cannot allow method body have type `::String` because declared as type `::Integer`
|
134
|
+
│ ::String <: ::Integer
|
135
|
+
│ ::Object <: ::Integer
|
136
|
+
│ ::BasicObject <: ::Integer
|
137
|
+
│
|
138
|
+
│ Diagnostic ID: Ruby::MethodBodyTypeMismatch
|
139
|
+
│
|
140
|
+
└ def foo
|
141
|
+
~~~~~~~
|
142
|
+
method_definition_missing.rb:
|
143
|
+
diagnostics:
|
144
|
+
- |
|
145
|
+
method_definition_missing.rb:1:6: [error] Cannot find implementation of method `::MethodDefinitionMissing#foo`
|
146
|
+
│ Diagnostic ID: Ruby::MethodDefinitionMissing
|
147
|
+
│
|
148
|
+
└ class MethodDefinitionMissing
|
149
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
150
|
+
method_return_type_annotation_mismatch.rb:
|
151
|
+
diagnostics:
|
152
|
+
- |
|
153
|
+
method_return_type_annotation_mismatch.rb:3:2: [error] Annotation `@type return` specifies type `::Integer` where declared as type `::String`
|
154
|
+
│ ::Integer <: ::String
|
155
|
+
│ ::Numeric <: ::String
|
156
|
+
│ ::Object <: ::String
|
157
|
+
│ ::BasicObject <: ::String
|
158
|
+
│
|
159
|
+
│ Diagnostic ID: Ruby::MethodReturnTypeAnnotationMismatch
|
160
|
+
│
|
161
|
+
└ def foo
|
162
|
+
~~~~~~~
|
163
|
+
missing_keyword.rb:
|
164
|
+
diagnostics:
|
165
|
+
- |
|
166
|
+
missing_keyword.rb:1:23: [error] Cannot omit required keywords: `foo`
|
167
|
+
│ Diagnostic ID: Ruby::MissingKeyword
|
168
|
+
│
|
169
|
+
└ MissingKeyword.new.foo bar: :bar
|
170
|
+
~~~~~~~~~
|
171
|
+
no_method.rb:
|
172
|
+
diagnostics:
|
173
|
+
- |
|
174
|
+
no_method.rb:1:2: [error] Type `::Integer` does not have method `foo`
|
175
|
+
│ Diagnostic ID: Ruby::NoMethod
|
176
|
+
│
|
177
|
+
└ 1.foo()
|
178
|
+
~~~
|
179
|
+
required_block_missing.rb:
|
180
|
+
diagnostics:
|
181
|
+
- |
|
182
|
+
required_block_missing.rb:1:4: [error] The method cannot be called without a block
|
183
|
+
│ Diagnostic ID: Ruby::RequiredBlockMissing
|
184
|
+
│
|
185
|
+
└ 123.tap()
|
186
|
+
~~~
|
187
|
+
return_type_mismatch.rb:
|
188
|
+
diagnostics:
|
189
|
+
- |
|
190
|
+
return_type_mismatch.rb:4:4: [error] The method cannot return a value of type `::Integer` because declared as type `::String`
|
191
|
+
│ ::Integer <: ::String
|
192
|
+
│ ::Numeric <: ::String
|
193
|
+
│ ::Object <: ::String
|
194
|
+
│ ::BasicObject <: ::String
|
195
|
+
│
|
196
|
+
│ Diagnostic ID: Ruby::ReturnTypeMismatch
|
197
|
+
│
|
198
|
+
└ return 30
|
199
|
+
~~~~~~~~~
|
200
|
+
unexpected_block_given.rb:
|
201
|
+
diagnostics:
|
202
|
+
- |
|
203
|
+
unexpected_block_given.rb:1:10: [error] The method cannot be called with a block
|
204
|
+
│ Diagnostic ID: Ruby::UnexpectedBlockGiven
|
205
|
+
│
|
206
|
+
└ [1].at(1) { 123 }
|
207
|
+
~~~~~~~
|
208
|
+
unexpected_dynamic_method.rb:
|
209
|
+
diagnostics:
|
210
|
+
- |
|
211
|
+
unexpected_dynamic_method.rb:1:6: [error] @dynamic annotation contains unknown method name `foo`
|
212
|
+
│ Diagnostic ID: Ruby::UnexpectedDynamicMethod
|
213
|
+
│
|
214
|
+
└ class UnexpectedDynamicMethod
|
215
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
216
|
+
unexpected_jump.rb:
|
217
|
+
diagnostics:
|
218
|
+
- |
|
219
|
+
unexpected_jump.rb:1:0: [error] Cannot jump from here
|
220
|
+
│ Diagnostic ID: Ruby::UnexpectedJump
|
221
|
+
│
|
222
|
+
└ break
|
223
|
+
~~~~~
|
224
|
+
- |
|
225
|
+
unexpected_jump.rb:3:0: [error] Cannot jump from here
|
226
|
+
│ Diagnostic ID: Ruby::UnexpectedJump
|
227
|
+
│
|
228
|
+
└ next
|
229
|
+
~~~~
|
230
|
+
unexpected_jump_value.rb:
|
231
|
+
diagnostics:
|
232
|
+
- |
|
233
|
+
unexpected_jump_value.rb:2:2: [error] The value given to break will be ignored
|
234
|
+
│ Diagnostic ID: Ruby::UnexpectedJumpValue
|
235
|
+
│
|
236
|
+
└ break 10
|
237
|
+
~~~~~~~~
|
238
|
+
unexpected_keyword.rb:
|
239
|
+
diagnostics:
|
240
|
+
- |
|
241
|
+
unexpected_keyword.rb:1:26: [error] Cannot specify unexpected keyword arguments: `bar`
|
242
|
+
│ Diagnostic ID: Ruby::UnexpectedKeyword
|
243
|
+
│
|
244
|
+
└ UnexpectedKeyword.new.foo(foo: 123, bar: :bar)
|
245
|
+
~~~~~~~~~~~~~~~~~~~
|
246
|
+
unexpected_splat.rb:
|
247
|
+
diagnostics:
|
248
|
+
- |
|
249
|
+
unexpected_splat.rb:1:13: [error] Hash splat is given with object other than `Hash[X, Y]`
|
250
|
+
│ Diagnostic ID: Ruby::UnexpectedSplat
|
251
|
+
│
|
252
|
+
└ { foo: :bar, **123 }
|
253
|
+
~~~~~
|
254
|
+
unexpected_yield.rb:
|
255
|
+
diagnostics:
|
256
|
+
- |
|
257
|
+
unexpected_yield.rb:4:4: [error] No block given for `yield`
|
258
|
+
│ Diagnostic ID: Ruby::UnexpectedYield
|
259
|
+
│
|
260
|
+
└ yield
|
261
|
+
~~~~~
|
262
|
+
- |
|
263
|
+
unexpected_yield.rb:4:4: [error] Cannot detect the type of the expression
|
264
|
+
│ Diagnostic ID: Ruby::FallbackAny
|
265
|
+
│
|
266
|
+
└ yield
|
267
|
+
~~~~~
|
268
|
+
unknown_constant_assigned.rb:
|
269
|
+
diagnostics:
|
270
|
+
- |
|
271
|
+
unknown_constant_assigned.rb:2:2: [error] Cannot find the declaration of constant `FOO`
|
272
|
+
│ Diagnostic ID: Ruby::UnknownConstantAssigned
|
273
|
+
│
|
274
|
+
└ FOO = 123
|
275
|
+
~~~
|
276
|
+
- |
|
277
|
+
unknown_constant_assigned.rb:4:2: [error] Cannot detect the type of the expression
|
278
|
+
│ Diagnostic ID: Ruby::FallbackAny
|
279
|
+
│
|
280
|
+
└ FOO::BAR = 123
|
281
|
+
~~~
|
282
|
+
- |
|
283
|
+
unknown_constant_assigned.rb:4:2: [error] Cannot find the declaration of constant `FOO::BAR`
|
284
|
+
│ Diagnostic ID: Ruby::UnknownConstantAssigned
|
285
|
+
│
|
286
|
+
└ FOO::BAR = 123
|
287
|
+
~~~~~~~~
|
288
|
+
- |
|
289
|
+
unknown_constant_assigned.rb:6:2: [error] Cannot find the declaration of constant `::FOO`
|
290
|
+
│ Diagnostic ID: Ruby::UnknownConstantAssigned
|
291
|
+
│
|
292
|
+
└ ::FOO = :foo
|
293
|
+
~~~~~
|
294
|
+
unresolved_overloading.rb:
|
295
|
+
diagnostics:
|
296
|
+
- |
|
297
|
+
unresolved_overloading.rb:1:0: [error] Cannot find compatible overloading of method `+` of type `::Integer`
|
298
|
+
│ Method types:
|
299
|
+
│ def +: (::Integer) -> ::Integer
|
300
|
+
│ | (::Float) -> ::Float
|
301
|
+
│ | (::Rational) -> ::Rational
|
302
|
+
│ | (::Complex) -> ::Complex
|
303
|
+
│
|
304
|
+
│ Diagnostic ID: Ruby::UnresolvedOverloading
|
305
|
+
│
|
306
|
+
└ 1 + ""
|
307
|
+
~~~~~~
|
308
|
+
unsatisfiable_constraint.rb:
|
309
|
+
diagnostics:
|
310
|
+
- |
|
311
|
+
unsatisfiable_constraint.rb:6:4: [error] Type `::String` does not have method `foo`
|
312
|
+
│ Diagnostic ID: Ruby::NoMethod
|
313
|
+
│
|
314
|
+
└ x.foo()
|
315
|
+
~~~
|
316
|
+
- |
|
317
|
+
unsatisfiable_constraint.rb:4:0: [error] Unsatisfiable constraint `::Array[untyped] <: A(1) <: ::String` is generated through (A(1)) { (A(1)) -> void } -> B(2)
|
318
|
+
│ ::Array[untyped] <: ::String
|
319
|
+
│ ::Object <: ::String
|
320
|
+
│ ::BasicObject <: ::String
|
321
|
+
│
|
322
|
+
│ Diagnostic ID: Ruby::UnsatisfiableConstraint
|
323
|
+
│
|
324
|
+
└ test.foo([]) do |x|
|
325
|
+
~~~~~~~~~~~~~~~~~~~
|
326
|
+
unsupported_syntax.rb:
|
327
|
+
diagnostics:
|
328
|
+
- |
|
329
|
+
unsupported_syntax.rb:1:0: [error] sclass receiver must be instance type or singleton type, but type given `(::Integer | ::String | nil)`
|
330
|
+
│ Diagnostic ID: Ruby::UnsupportedSyntax
|
331
|
+
│
|
332
|
+
└ class <<[1, ""].sample
|
333
|
+
~~~~~~~~~~~~~~~~~~~~~~
|