steep 0.37.0 → 0.42.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 +34 -0
- data/Rakefile +5 -2
- data/bin/output_rebaseline.rb +34 -0
- data/bin/output_test.rb +53 -0
- data/lib/steep.rb +95 -14
- data/lib/steep/ast/types/bot.rb +1 -1
- data/lib/steep/ast/types/class.rb +4 -0
- data/lib/steep/ast/types/factory.rb +10 -0
- data/lib/steep/ast/types/logic.rb +16 -3
- data/lib/steep/ast/types/top.rb +1 -1
- data/lib/steep/cli.rb +31 -7
- data/lib/steep/diagnostic/helper.rb +17 -0
- data/lib/steep/diagnostic/lsp_formatter.rb +16 -0
- data/lib/steep/diagnostic/ruby.rb +619 -0
- data/lib/steep/diagnostic/signature.rb +357 -0
- data/lib/steep/drivers/annotations.rb +19 -28
- data/lib/steep/drivers/check.rb +182 -60
- data/lib/steep/drivers/diagnostic_printer.rb +99 -0
- data/lib/steep/drivers/langserver.rb +3 -8
- data/lib/steep/drivers/print_project.rb +10 -9
- data/lib/steep/drivers/stats.rb +124 -32
- data/lib/steep/drivers/trace_printer.rb +5 -1
- data/lib/steep/drivers/utils/jobs_count.rb +9 -0
- data/lib/steep/drivers/validate.rb +31 -13
- data/lib/steep/drivers/watch.rb +69 -48
- data/lib/steep/drivers/worker.rb +16 -8
- data/lib/steep/expectations.rb +159 -0
- data/lib/steep/index/rbs_index.rb +334 -0
- data/lib/steep/index/signature_symbol_provider.rb +162 -0
- data/lib/steep/index/source_index.rb +100 -0
- data/lib/steep/project.rb +0 -30
- data/lib/steep/project/dsl.rb +5 -3
- data/lib/steep/project/options.rb +4 -4
- data/lib/steep/project/pattern.rb +56 -0
- data/lib/steep/project/target.rb +9 -214
- data/lib/steep/range_extension.rb +29 -0
- data/lib/steep/server/base_worker.rb +43 -7
- data/lib/steep/server/change_buffer.rb +63 -0
- data/lib/steep/server/interaction_worker.rb +73 -56
- data/lib/steep/server/master.rb +245 -109
- data/lib/steep/server/type_check_worker.rb +122 -0
- data/lib/steep/server/worker_process.rb +17 -15
- data/lib/steep/{project → services}/completion_provider.rb +3 -3
- data/lib/steep/services/content_change.rb +61 -0
- data/lib/steep/services/file_loader.rb +48 -0
- data/lib/steep/{project → services}/hover_content.rb +14 -16
- data/lib/steep/services/path_assignment.rb +29 -0
- data/lib/steep/services/signature_service.rb +369 -0
- data/lib/steep/services/stats_calculator.rb +69 -0
- data/lib/steep/services/type_check_service.rb +342 -0
- data/lib/steep/signature/validator.rb +174 -32
- data/lib/steep/subtyping/check.rb +248 -47
- data/lib/steep/subtyping/constraints.rb +2 -2
- data/lib/steep/type_construction.rb +565 -295
- data/lib/steep/type_inference/constant_env.rb +5 -1
- data/lib/steep/type_inference/local_variable_type_env.rb +26 -12
- data/lib/steep/type_inference/logic_type_interpreter.rb +99 -26
- data/lib/steep/type_inference/type_env.rb +43 -17
- data/lib/steep/typing.rb +8 -2
- 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_expectations.yml +96 -0
- data/smoke/and/a.rb +0 -3
- data/smoke/and/test_expectations.yml +31 -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_expectations.yml +103 -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_expectations.yml +125 -0
- data/smoke/case/a.rb +0 -3
- data/smoke/case/test_expectations.yml +47 -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_expectations.yml +120 -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_expectations.yml +139 -0
- data/smoke/diagnostics-rbs-duplicated/Steepfile +5 -0
- data/smoke/diagnostics-rbs-duplicated/a.rbs +5 -0
- data/smoke/diagnostics-rbs-duplicated/test_expectations.yml +13 -0
- data/smoke/diagnostics-rbs/Steepfile +8 -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_expectations.yml +231 -0
- data/smoke/diagnostics-rbs/unknown-method-alias.rbs +3 -0
- data/smoke/diagnostics-rbs/unknown-type-name-2.rbs +5 -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_expectations.yml +477 -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_expectations.yml +13 -0
- data/smoke/ensure/a.rb +0 -4
- data/smoke/ensure/test_expectations.yml +62 -0
- data/smoke/enumerator/a.rb +0 -6
- data/smoke/enumerator/b.rb +0 -3
- data/smoke/enumerator/test_expectations.yml +135 -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/f.rb +2 -0
- data/smoke/extension/f.rbs +3 -0
- data/smoke/extension/test_expectations.yml +73 -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_expectations.yml +81 -0
- data/smoke/hello/hello.rb +0 -2
- data/smoke/hello/test_expectations.yml +25 -0
- data/smoke/if/a.rb +0 -2
- data/smoke/if/test_expectations.yml +34 -0
- data/smoke/implements/a.rb +0 -2
- data/smoke/implements/test_expectations.yml +23 -0
- data/smoke/initialize/test_expectations.yml +1 -0
- data/smoke/integer/a.rb +0 -7
- data/smoke/integer/test_expectations.yml +101 -0
- data/smoke/interface/a.rb +0 -2
- data/smoke/interface/test_expectations.yml +23 -0
- data/smoke/kwbegin/a.rb +0 -1
- data/smoke/kwbegin/test_expectations.yml +17 -0
- data/smoke/lambda/a.rb +1 -4
- data/smoke/lambda/test_expectations.yml +39 -0
- data/smoke/literal/a.rb +0 -5
- data/smoke/literal/b.rb +0 -2
- data/smoke/literal/test_expectations.yml +106 -0
- data/smoke/map/test_expectations.yml +1 -0
- data/smoke/method/a.rb +0 -5
- data/smoke/method/b.rb +0 -1
- data/smoke/method/test_expectations.yml +90 -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_expectations.yml +75 -0
- data/smoke/regexp/a.rb +0 -38
- data/smoke/regexp/b.rb +0 -26
- data/smoke/regexp/test_expectations.yml +615 -0
- data/smoke/regression/set_divide.rb +0 -4
- data/smoke/regression/test_expectations.yml +43 -0
- data/smoke/rescue/a.rb +0 -5
- data/smoke/rescue/test_expectations.yml +79 -0
- data/smoke/self/a.rb +0 -2
- data/smoke/self/test_expectations.yml +23 -0
- data/smoke/skip/skip.rb +0 -2
- data/smoke/skip/test_expectations.yml +23 -0
- data/smoke/stdout/test_expectations.yml +1 -0
- data/smoke/super/a.rb +0 -4
- data/smoke/super/test_expectations.yml +79 -0
- data/smoke/toplevel/a.rb +0 -1
- data/smoke/toplevel/test_expectations.yml +15 -0
- data/smoke/tsort/Steepfile +2 -0
- data/smoke/tsort/a.rb +0 -3
- data/smoke/tsort/test_expectations.yml +63 -0
- data/smoke/type_case/a.rb +0 -4
- data/smoke/type_case/test_expectations.yml +48 -0
- data/smoke/unexpected/Steepfile +5 -0
- data/smoke/unexpected/test_expectations.yml +25 -0
- data/smoke/unexpected/unexpected.rb +1 -0
- data/smoke/unexpected/unexpected.rbs +3 -0
- data/smoke/yield/a.rb +0 -3
- data/smoke/yield/b.rb +6 -0
- data/smoke/yield/test_expectations.yml +68 -0
- data/steep.gemspec +4 -3
- metadata +144 -29
- data/bin/smoke_runner.rb +0 -139
- data/lib/steep/drivers/signature_error_printer.rb +0 -25
- data/lib/steep/errors.rb +0 -565
- data/lib/steep/project/file_loader.rb +0 -68
- data/lib/steep/project/signature_file.rb +0 -33
- data/lib/steep/project/source_file.rb +0 -129
- data/lib/steep/server/code_worker.rb +0 -137
- data/lib/steep/server/signature_worker.rb +0 -152
- data/lib/steep/server/utils.rb +0 -69
- data/lib/steep/signature/errors.rb +0 -82
- data/lib/steep/type_assignability.rb +0 -367
data/smoke/case/a.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# @type var a: Integer
|
2
2
|
|
3
|
-
# !expects IncompatibleAssignment: lhs_type=::Integer, rhs_type=(::Integer | ::Array[::String] | nil | ::String)
|
4
3
|
a = case 1
|
5
4
|
when 2
|
6
5
|
1
|
@@ -13,9 +12,7 @@ a = case 1
|
|
13
12
|
"string"
|
14
13
|
end
|
15
14
|
|
16
|
-
# !expects IncompatibleAssignment: lhs_type=::Integer, rhs_type=(::Integer | nil)
|
17
15
|
a = case
|
18
|
-
# !expects* UnresolvedOverloading: receiver=::Integer, method_name=+,
|
19
16
|
when 1+"a"
|
20
17
|
30
|
21
18
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
- file: a.rb
|
3
|
+
diagnostics:
|
4
|
+
- range:
|
5
|
+
start:
|
6
|
+
line: 3
|
7
|
+
character: 0
|
8
|
+
end:
|
9
|
+
line: 13
|
10
|
+
character: 7
|
11
|
+
severity: ERROR
|
12
|
+
message: |-
|
13
|
+
Cannot assign a value of type `(::Integer | ::Array[::String] | nil | ::String)` to a variable of type `::Integer`
|
14
|
+
(::Integer | ::Array[::String] | nil | ::String) <: ::Integer
|
15
|
+
::Array[::String] <: ::Integer
|
16
|
+
::Object <: ::Integer
|
17
|
+
::BasicObject <: ::Integer
|
18
|
+
code: Ruby::IncompatibleAssignment
|
19
|
+
- range:
|
20
|
+
start:
|
21
|
+
line: 15
|
22
|
+
character: 0
|
23
|
+
end:
|
24
|
+
line: 18
|
25
|
+
character: 7
|
26
|
+
severity: ERROR
|
27
|
+
message: |-
|
28
|
+
Cannot assign a value of type `(::Integer | nil)` to a variable of type `::Integer`
|
29
|
+
(::Integer | nil) <: ::Integer
|
30
|
+
nil <: ::Integer
|
31
|
+
code: Ruby::IncompatibleAssignment
|
32
|
+
- range:
|
33
|
+
start:
|
34
|
+
line: 16
|
35
|
+
character: 9
|
36
|
+
end:
|
37
|
+
line: 16
|
38
|
+
character: 14
|
39
|
+
severity: ERROR
|
40
|
+
message: |-
|
41
|
+
Cannot find compatible overloading of method `+` of type `::Integer`
|
42
|
+
Method types:
|
43
|
+
def +: (::Integer) -> ::Integer
|
44
|
+
| (::Float) -> ::Float
|
45
|
+
| (::Rational) -> ::Rational
|
46
|
+
| (::Complex) -> ::Complex
|
47
|
+
code: Ruby::UnresolvedOverloading
|
data/smoke/class/a.rb
CHANGED
@@ -5,13 +5,11 @@ class A
|
|
5
5
|
end
|
6
6
|
|
7
7
|
# A#bar is defined but the implementation is incompatible.
|
8
|
-
# !expects MethodArityMismatch: method=bar
|
9
8
|
def bar(y)
|
10
9
|
y
|
11
10
|
end
|
12
11
|
|
13
12
|
# Object#to_s is defined but the implementation is incompatible.
|
14
|
-
# !expects MethodBodyTypeMismatch: method=to_s, expected=::String, actual=::Integer
|
15
13
|
def to_s
|
16
14
|
3
|
17
15
|
end
|
@@ -21,7 +19,6 @@ class A
|
|
21
19
|
5
|
22
20
|
end
|
23
21
|
|
24
|
-
# !expects MethodBodyTypeMismatch: method=self.baz, expected=::Integer, actual=::String
|
25
22
|
def self.baz
|
26
23
|
"baz"
|
27
24
|
end
|
data/smoke/class/c.rb
CHANGED
data/smoke/class/f.rb
CHANGED
data/smoke/class/g.rb
CHANGED
data/smoke/class/i.rb
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
class IncompatibleChild
|
2
2
|
def foo(arg)
|
3
3
|
# @type var x: Symbol
|
4
|
-
# !expects IncompatibleAssignment: lhs_type=::Symbol, rhs_type=::Integer
|
5
4
|
x = super()
|
6
5
|
|
7
6
|
"123"
|
8
7
|
end
|
9
8
|
|
10
9
|
def initialize()
|
11
|
-
# !expects IncompatibleArguments: receiver=::IncompatibleChild, method_type=(name: ::String) -> untyped
|
12
10
|
super()
|
13
11
|
|
14
12
|
super
|
@@ -0,0 +1,120 @@
|
|
1
|
+
---
|
2
|
+
- file: a.rb
|
3
|
+
diagnostics:
|
4
|
+
- range:
|
5
|
+
start:
|
6
|
+
line: 8
|
7
|
+
character: 9
|
8
|
+
end:
|
9
|
+
line: 8
|
10
|
+
character: 12
|
11
|
+
severity: ERROR
|
12
|
+
message: Method parameters are incompatible with declaration `() -> ::String`
|
13
|
+
code: Ruby::MethodArityMismatch
|
14
|
+
- range:
|
15
|
+
start:
|
16
|
+
line: 13
|
17
|
+
character: 2
|
18
|
+
end:
|
19
|
+
line: 15
|
20
|
+
character: 5
|
21
|
+
severity: ERROR
|
22
|
+
message: |-
|
23
|
+
Cannot allow method body have type `::Integer` because declared as type `::String`
|
24
|
+
::Integer <: ::String
|
25
|
+
::Numeric <: ::String
|
26
|
+
::Object <: ::String
|
27
|
+
::BasicObject <: ::String
|
28
|
+
code: Ruby::MethodBodyTypeMismatch
|
29
|
+
- range:
|
30
|
+
start:
|
31
|
+
line: 22
|
32
|
+
character: 2
|
33
|
+
end:
|
34
|
+
line: 24
|
35
|
+
character: 5
|
36
|
+
severity: ERROR
|
37
|
+
message: |-
|
38
|
+
Cannot allow method body have type `::String` because declared as type `::Integer`
|
39
|
+
::String <: ::Integer
|
40
|
+
::Object <: ::Integer
|
41
|
+
::BasicObject <: ::Integer
|
42
|
+
code: Ruby::MethodBodyTypeMismatch
|
43
|
+
- file: c.rb
|
44
|
+
diagnostics:
|
45
|
+
- range:
|
46
|
+
start:
|
47
|
+
line: 1
|
48
|
+
character: 6
|
49
|
+
end:
|
50
|
+
line: 1
|
51
|
+
character: 7
|
52
|
+
severity: ERROR
|
53
|
+
message: "@dynamic annotation contains unknown method name `type`"
|
54
|
+
code: Ruby::UnexpectedDynamicMethod
|
55
|
+
- file: f.rb
|
56
|
+
diagnostics:
|
57
|
+
- range:
|
58
|
+
start:
|
59
|
+
line: 9
|
60
|
+
character: 0
|
61
|
+
end:
|
62
|
+
line: 9
|
63
|
+
character: 5
|
64
|
+
severity: ERROR
|
65
|
+
message: |-
|
66
|
+
Cannot assign a value of type `::_E` to a variable of type `::D`
|
67
|
+
::_E <: ::D
|
68
|
+
code: Ruby::IncompatibleAssignment
|
69
|
+
- file: g.rb
|
70
|
+
diagnostics:
|
71
|
+
- range:
|
72
|
+
start:
|
73
|
+
line: 1
|
74
|
+
character: 6
|
75
|
+
end:
|
76
|
+
line: 1
|
77
|
+
character: 7
|
78
|
+
severity: ERROR
|
79
|
+
message: Cannot find implementation of method `::B#name`
|
80
|
+
code: Ruby::MethodDefinitionMissing
|
81
|
+
- range:
|
82
|
+
start:
|
83
|
+
line: 4
|
84
|
+
character: 6
|
85
|
+
end:
|
86
|
+
line: 4
|
87
|
+
character: 7
|
88
|
+
severity: ERROR
|
89
|
+
message: Cannot find implementation of method `::B#name`
|
90
|
+
code: Ruby::MethodDefinitionMissing
|
91
|
+
- file: i.rb
|
92
|
+
diagnostics:
|
93
|
+
- range:
|
94
|
+
start:
|
95
|
+
line: 4
|
96
|
+
character: 4
|
97
|
+
end:
|
98
|
+
line: 4
|
99
|
+
character: 15
|
100
|
+
severity: ERROR
|
101
|
+
message: |-
|
102
|
+
Cannot assign a value of type `::Integer` to a variable of type `::Symbol`
|
103
|
+
::Integer <: ::Symbol
|
104
|
+
::Numeric <: ::Symbol
|
105
|
+
::Object <: ::Symbol
|
106
|
+
::BasicObject <: ::Symbol
|
107
|
+
code: Ruby::IncompatibleAssignment
|
108
|
+
- range:
|
109
|
+
start:
|
110
|
+
line: 10
|
111
|
+
character: 4
|
112
|
+
end:
|
113
|
+
line: 10
|
114
|
+
character: 11
|
115
|
+
severity: ERROR
|
116
|
+
message: |-
|
117
|
+
Cannot find method `initialize` of type `::IncompatibleChild` with compatible arity
|
118
|
+
Method types:
|
119
|
+
def initialize: (name: ::String) -> untyped
|
120
|
+
code: Ruby::IncompatibleArguments
|
data/smoke/const/a.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# @type const A: Integer
|
2
2
|
# @type var x: String
|
3
3
|
|
4
|
-
# !expects IncompatibleAssignment: lhs_type=::String, rhs_type=::Integer
|
5
4
|
x = A
|
6
5
|
|
7
6
|
x = B
|
@@ -12,7 +11,6 @@ module X
|
|
12
11
|
def foo
|
13
12
|
# @type var x: String
|
14
13
|
|
15
|
-
# !expects IncompatibleAssignment: lhs_type=::String, rhs_type=::Integer
|
16
14
|
x = A
|
17
15
|
|
18
16
|
x = B
|
@@ -22,7 +20,6 @@ end
|
|
22
20
|
|
23
21
|
# @type const Foo::Bar::Baz: Integer
|
24
22
|
|
25
|
-
# !expects IncompatibleAssignment: lhs_type=::String, rhs_type=::Integer
|
26
23
|
x = Foo::Bar::Baz
|
27
24
|
|
28
25
|
z = Foo
|
data/smoke/const/b.rb
ADDED
data/smoke/const/b.rbs
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
---
|
2
|
+
- file: a.rb
|
3
|
+
diagnostics:
|
4
|
+
- range:
|
5
|
+
start:
|
6
|
+
line: 4
|
7
|
+
character: 0
|
8
|
+
end:
|
9
|
+
line: 4
|
10
|
+
character: 5
|
11
|
+
severity: ERROR
|
12
|
+
message: |-
|
13
|
+
Cannot assign a value of type `::Integer` to a variable of type `::String`
|
14
|
+
::Integer <: ::String
|
15
|
+
::Numeric <: ::String
|
16
|
+
::Object <: ::String
|
17
|
+
::BasicObject <: ::String
|
18
|
+
code: Ruby::IncompatibleAssignment
|
19
|
+
- range:
|
20
|
+
start:
|
21
|
+
line: 6
|
22
|
+
character: 4
|
23
|
+
end:
|
24
|
+
line: 6
|
25
|
+
character: 5
|
26
|
+
severity: ERROR
|
27
|
+
message: Cannot detect the type of the expression
|
28
|
+
code: Ruby::FallbackAny
|
29
|
+
- range:
|
30
|
+
start:
|
31
|
+
line: 8
|
32
|
+
character: 7
|
33
|
+
end:
|
34
|
+
line: 8
|
35
|
+
character: 8
|
36
|
+
severity: ERROR
|
37
|
+
message: Cannot detect the type of the expression
|
38
|
+
code: Ruby::FallbackAny
|
39
|
+
- range:
|
40
|
+
start:
|
41
|
+
line: 14
|
42
|
+
character: 4
|
43
|
+
end:
|
44
|
+
line: 14
|
45
|
+
character: 9
|
46
|
+
severity: ERROR
|
47
|
+
message: |-
|
48
|
+
Cannot assign a value of type `::Integer` to a variable of type `::String`
|
49
|
+
::Integer <: ::String
|
50
|
+
::Numeric <: ::String
|
51
|
+
::Object <: ::String
|
52
|
+
::BasicObject <: ::String
|
53
|
+
code: Ruby::IncompatibleAssignment
|
54
|
+
- range:
|
55
|
+
start:
|
56
|
+
line: 16
|
57
|
+
character: 8
|
58
|
+
end:
|
59
|
+
line: 16
|
60
|
+
character: 9
|
61
|
+
severity: ERROR
|
62
|
+
message: Cannot detect the type of the expression
|
63
|
+
code: Ruby::FallbackAny
|
64
|
+
- range:
|
65
|
+
start:
|
66
|
+
line: 23
|
67
|
+
character: 0
|
68
|
+
end:
|
69
|
+
line: 23
|
70
|
+
character: 17
|
71
|
+
severity: ERROR
|
72
|
+
message: |-
|
73
|
+
Cannot assign a value of type `::Integer` to a variable of type `::String`
|
74
|
+
::Integer <: ::String
|
75
|
+
::Numeric <: ::String
|
76
|
+
::Object <: ::String
|
77
|
+
::BasicObject <: ::String
|
78
|
+
code: Ruby::IncompatibleAssignment
|
79
|
+
- range:
|
80
|
+
start:
|
81
|
+
line: 26
|
82
|
+
character: 4
|
83
|
+
end:
|
84
|
+
line: 26
|
85
|
+
character: 10
|
86
|
+
severity: ERROR
|
87
|
+
message: Cannot detect the type of the expression
|
88
|
+
code: Ruby::FallbackAny
|
89
|
+
- range:
|
90
|
+
start:
|
91
|
+
line: 26
|
92
|
+
character: 4
|
93
|
+
end:
|
94
|
+
line: 26
|
95
|
+
character: 15
|
96
|
+
severity: ERROR
|
97
|
+
message: Cannot detect the type of the expression
|
98
|
+
code: Ruby::FallbackAny
|
99
|
+
- range:
|
100
|
+
start:
|
101
|
+
line: 27
|
102
|
+
character: 0
|
103
|
+
end:
|
104
|
+
line: 27
|
105
|
+
character: 19
|
106
|
+
severity: ERROR
|
107
|
+
message: |-
|
108
|
+
Cannot assign a value of type `::Integer` to a variable of type `::String`
|
109
|
+
::Integer <: ::String
|
110
|
+
::Numeric <: ::String
|
111
|
+
::Object <: ::String
|
112
|
+
::BasicObject <: ::String
|
113
|
+
code: Ruby::IncompatibleAssignment
|
114
|
+
- file: b.rb
|
115
|
+
diagnostics:
|
116
|
+
- range:
|
117
|
+
start:
|
118
|
+
line: 3
|
119
|
+
character: 4
|
120
|
+
end:
|
121
|
+
line: 3
|
122
|
+
character: 17
|
123
|
+
severity: ERROR
|
124
|
+
message: |-
|
125
|
+
Cannot assign a value of type `::String` to a constant of type `::Integer`
|
126
|
+
::String <: ::Integer
|
127
|
+
::Object <: ::Integer
|
128
|
+
::BasicObject <: ::Integer
|
129
|
+
code: Ruby::IncompatibleAssignment
|
130
|
+
- range:
|
131
|
+
start:
|
132
|
+
line: 5
|
133
|
+
character: 4
|
134
|
+
end:
|
135
|
+
line: 5
|
136
|
+
character: 8
|
137
|
+
severity: ERROR
|
138
|
+
message: Cannot find the declaration of constant `Baz2`
|
139
|
+
code: Ruby::UnknownConstantAssigned
|