steep 0.40.0 → 0.44.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 +38 -0
- data/Gemfile +1 -0
- data/bin/output_rebaseline.rb +15 -30
- data/bin/output_test.rb +23 -57
- data/lib/steep.rb +89 -15
- data/lib/steep/annotation_parser.rb +10 -2
- data/lib/steep/ast/types/class.rb +4 -0
- data/lib/steep/cli.rb +31 -6
- data/lib/steep/diagnostic/ruby.rb +13 -8
- data/lib/steep/diagnostic/signature.rb +152 -2
- data/lib/steep/drivers/annotations.rb +18 -36
- data/lib/steep/drivers/check.rb +140 -31
- data/lib/steep/drivers/diagnostic_printer.rb +20 -11
- data/lib/steep/drivers/langserver.rb +4 -8
- data/lib/steep/drivers/print_project.rb +10 -9
- data/lib/steep/drivers/stats.rb +135 -119
- data/lib/steep/drivers/utils/driver_helper.rb +35 -0
- data/lib/steep/drivers/utils/jobs_count.rb +9 -0
- data/lib/steep/drivers/validate.rb +29 -18
- data/lib/steep/drivers/watch.rb +55 -49
- data/lib/steep/drivers/worker.rb +11 -8
- data/lib/steep/expectations.rb +159 -0
- data/lib/steep/index/signature_symbol_provider.rb +23 -1
- data/lib/steep/index/source_index.rb +55 -5
- data/lib/steep/interface/block.rb +4 -0
- data/lib/steep/project.rb +0 -30
- data/lib/steep/project/dsl.rb +5 -3
- data/lib/steep/project/pattern.rb +56 -0
- data/lib/steep/project/target.rb +11 -227
- data/lib/steep/server/base_worker.rb +1 -3
- data/lib/steep/server/change_buffer.rb +63 -0
- data/lib/steep/server/interaction_worker.rb +72 -57
- data/lib/steep/server/master.rb +652 -234
- data/lib/steep/server/type_check_worker.rb +304 -0
- data/lib/steep/server/worker_process.rb +16 -11
- data/lib/steep/{project → services}/completion_provider.rb +5 -5
- data/lib/steep/services/content_change.rb +61 -0
- data/lib/steep/services/file_loader.rb +48 -0
- data/lib/steep/services/goto_service.rb +321 -0
- data/lib/steep/{project → services}/hover_content.rb +19 -20
- data/lib/steep/services/path_assignment.rb +27 -0
- data/lib/steep/services/signature_service.rb +403 -0
- data/lib/steep/services/stats_calculator.rb +69 -0
- data/lib/steep/services/type_check_service.rb +413 -0
- data/lib/steep/signature/validator.rb +187 -85
- data/lib/steep/source.rb +21 -18
- data/lib/steep/subtyping/check.rb +246 -45
- data/lib/steep/subtyping/constraints.rb +4 -4
- data/lib/steep/type_construction.rb +428 -193
- data/lib/steep/type_inference/block_params.rb +1 -1
- data/lib/steep/type_inference/context.rb +22 -0
- data/lib/steep/type_inference/local_variable_type_env.rb +26 -12
- data/lib/steep/type_inference/logic.rb +1 -1
- data/lib/steep/type_inference/logic_type_interpreter.rb +4 -4
- data/lib/steep/type_inference/type_env.rb +43 -17
- data/lib/steep/version.rb +1 -1
- data/smoke/alias/test_expectations.yml +96 -0
- data/smoke/and/test_expectations.yml +31 -0
- data/smoke/array/test_expectations.yml +103 -0
- data/smoke/block/test_expectations.yml +125 -0
- data/smoke/case/test_expectations.yml +47 -0
- data/smoke/class/test_expectations.yml +120 -0
- data/smoke/const/test_expectations.yml +129 -0
- data/smoke/diagnostics-rbs-duplicated/test_expectations.yml +13 -0
- data/smoke/diagnostics-rbs/Steepfile +7 -4
- data/smoke/diagnostics-rbs/test_expectations.yml +231 -0
- data/smoke/diagnostics-rbs/unknown-type-name-2.rbs +5 -0
- data/smoke/{broken → diagnostics-ruby-unsat}/Steepfile +0 -0
- data/smoke/diagnostics-ruby-unsat/a.rbs +3 -0
- data/smoke/diagnostics-ruby-unsat/test_expectations.yml +27 -0
- data/smoke/{diagnostics → diagnostics-ruby-unsat}/unsatisfiable_constraint.rb +0 -1
- data/smoke/diagnostics/a.rbs +0 -4
- data/smoke/diagnostics/test_expectations.yml +451 -0
- data/smoke/dstr/test_expectations.yml +13 -0
- data/smoke/ensure/test_expectations.yml +62 -0
- data/smoke/enumerator/test_expectations.yml +135 -0
- 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/test_expectations.yml +81 -0
- data/smoke/hello/test_expectations.yml +25 -0
- data/smoke/if/test_expectations.yml +34 -0
- data/smoke/implements/b.rb +13 -0
- data/smoke/implements/b.rbs +12 -0
- data/smoke/implements/test_expectations.yml +23 -0
- data/smoke/initialize/test_expectations.yml +1 -0
- data/smoke/integer/test_expectations.yml +101 -0
- data/smoke/interface/test_expectations.yml +23 -0
- data/smoke/kwbegin/test_expectations.yml +17 -0
- data/smoke/lambda/test_expectations.yml +39 -0
- data/smoke/literal/test_expectations.yml +106 -0
- data/smoke/map/test_expectations.yml +1 -0
- data/smoke/method/test_expectations.yml +90 -0
- data/smoke/module/test_expectations.yml +75 -0
- data/smoke/regexp/test_expectations.yml +615 -0
- data/smoke/regression/issue_328.rb +1 -0
- data/smoke/regression/issue_328.rbs +0 -0
- data/smoke/regression/issue_332.rb +11 -0
- data/smoke/regression/issue_332.rbs +19 -0
- data/smoke/regression/issue_372.rb +8 -0
- data/smoke/regression/issue_372.rbs +4 -0
- data/smoke/regression/masgn.rb +4 -0
- data/smoke/regression/test_expectations.yml +60 -0
- data/smoke/regression/thread.rb +7 -0
- data/smoke/rescue/test_expectations.yml +79 -0
- data/smoke/self/test_expectations.yml +23 -0
- data/smoke/skip/test_expectations.yml +23 -0
- data/smoke/stdout/test_expectations.yml +1 -0
- data/smoke/super/test_expectations.yml +69 -0
- data/smoke/toplevel/test_expectations.yml +15 -0
- data/smoke/tsort/Steepfile +2 -0
- data/smoke/tsort/test_expectations.yml +63 -0
- 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/test_expectations.yml +68 -0
- data/steep.gemspec +4 -3
- metadata +127 -80
- data/lib/steep/project/file_loader.rb +0 -68
- data/lib/steep/project/signature_file.rb +0 -39
- data/lib/steep/project/source_file.rb +0 -129
- data/lib/steep/project/stats_calculator.rb +0 -80
- data/lib/steep/server/code_worker.rb +0 -150
- data/lib/steep/server/signature_worker.rb +0 -157
- data/lib/steep/server/utils.rb +0 -69
- data/smoke/alias/test.yaml +0 -73
- data/smoke/and/test.yaml +0 -24
- data/smoke/array/test.yaml +0 -80
- data/smoke/block/test.yaml +0 -96
- data/smoke/broken/broken.rb +0 -0
- data/smoke/broken/broken.rbs +0 -0
- data/smoke/broken/test.yaml +0 -6
- data/smoke/case/test.yaml +0 -36
- data/smoke/class/test.yaml +0 -89
- data/smoke/const/test.yaml +0 -96
- data/smoke/diagnostics-rbs-duplicated/test.yaml +0 -10
- data/smoke/diagnostics-rbs/test.yaml +0 -142
- data/smoke/diagnostics/test.yaml +0 -333
- data/smoke/dstr/test.yaml +0 -10
- data/smoke/ensure/test.yaml +0 -47
- data/smoke/enumerator/test.yaml +0 -100
- data/smoke/extension/test.yaml +0 -50
- data/smoke/hash/test.yaml +0 -62
- data/smoke/hello/test.yaml +0 -18
- data/smoke/if/test.yaml +0 -27
- data/smoke/implements/test.yaml +0 -16
- data/smoke/initialize/test.yaml +0 -4
- data/smoke/integer/test.yaml +0 -66
- data/smoke/interface/test.yaml +0 -16
- data/smoke/kwbegin/test.yaml +0 -14
- data/smoke/lambda/test.yaml +0 -28
- data/smoke/literal/test.yaml +0 -79
- data/smoke/map/test.yaml +0 -4
- data/smoke/method/test.yaml +0 -71
- data/smoke/module/test.yaml +0 -51
- data/smoke/regexp/test.yaml +0 -372
- data/smoke/regression/test.yaml +0 -38
- data/smoke/rescue/test.yaml +0 -60
- data/smoke/self/test.yaml +0 -16
- data/smoke/skip/test.yaml +0 -16
- data/smoke/stdout/test.yaml +0 -4
- data/smoke/super/test.yaml +0 -52
- data/smoke/toplevel/test.yaml +0 -12
- data/smoke/tsort/test.yaml +0 -32
- data/smoke/type_case/test.yaml +0 -33
- data/smoke/yield/test.yaml +0 -49
data/smoke/regression/test.yaml
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
array.rb:
|
4
|
-
diagnostics: []
|
5
|
-
fun.rb:
|
6
|
-
diagnostics: []
|
7
|
-
hash.rb:
|
8
|
-
diagnostics: []
|
9
|
-
poly_new.rb:
|
10
|
-
diagnostics: []
|
11
|
-
range.rb:
|
12
|
-
diagnostics: []
|
13
|
-
set_divide.rb:
|
14
|
-
diagnostics:
|
15
|
-
- |
|
16
|
-
set_divide.rb:2:2: [error] Type `::Set[::String]` does not have method `ffffffff`
|
17
|
-
│ Diagnostic ID: Ruby::NoMethod
|
18
|
-
│
|
19
|
-
└ d.ffffffff
|
20
|
-
~~~~~~~~
|
21
|
-
- |
|
22
|
-
set_divide.rb:5:4: [error] Type `::String` does not have method `ggggg`
|
23
|
-
│ Diagnostic ID: Ruby::NoMethod
|
24
|
-
│
|
25
|
-
└ x.ggggg
|
26
|
-
~~~~~
|
27
|
-
- |
|
28
|
-
set_divide.rb:7:4: [error] Type `::String` does not have method `ggggg`
|
29
|
-
│ Diagnostic ID: Ruby::NoMethod
|
30
|
-
│
|
31
|
-
└ y.ggggg
|
32
|
-
~~~~~
|
33
|
-
- |
|
34
|
-
set_divide.rb:11:4: [error] Type `::String` does not have method `ggggg`
|
35
|
-
│ Diagnostic ID: Ruby::NoMethod
|
36
|
-
│
|
37
|
-
└ x.ggggg
|
38
|
-
~~~~~
|
data/smoke/rescue/test.yaml
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:3:0: [error] Cannot assign a value of type `(::String | ::Integer)` to a variable of type `::Integer`
|
7
|
-
│ (::String | ::Integer) <: ::Integer
|
8
|
-
│ ::String <: ::Integer
|
9
|
-
│ ::Object <: ::Integer
|
10
|
-
│ ::BasicObject <: ::Integer
|
11
|
-
│
|
12
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
13
|
-
│
|
14
|
-
└ a = begin
|
15
|
-
~~~~~~~~~
|
16
|
-
- |
|
17
|
-
a.rb:11:0: [error] Cannot assign a value of type `(::String | ::Integer)` to a variable of type `::Integer`
|
18
|
-
│ (::String | ::Integer) <: ::Integer
|
19
|
-
│ ::String <: ::Integer
|
20
|
-
│ ::Object <: ::Integer
|
21
|
-
│ ::BasicObject <: ::Integer
|
22
|
-
│
|
23
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
24
|
-
│
|
25
|
-
└ b = 'foo' rescue 1
|
26
|
-
~~~~~~~~~~~~~~~~~~
|
27
|
-
- |
|
28
|
-
a.rb:15:0: [error] Cannot assign a value of type `(::String | ::Symbol | ::Integer)` to a variable of type `::Integer`
|
29
|
-
│ (::String | ::Symbol | ::Integer) <: ::Integer
|
30
|
-
│ ::String <: ::Integer
|
31
|
-
│ ::Object <: ::Integer
|
32
|
-
│ ::BasicObject <: ::Integer
|
33
|
-
│
|
34
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
35
|
-
│
|
36
|
-
└ c = begin
|
37
|
-
~~~~~~~~~
|
38
|
-
- |
|
39
|
-
a.rb:25:0: [error] Cannot assign a value of type `(::Array[::Integer] | ::Symbol | ::Integer)` to a variable of type `::Integer`
|
40
|
-
│ (::Array[::Integer] | ::Symbol | ::Integer) <: ::Integer
|
41
|
-
│ ::Array[::Integer] <: ::Integer
|
42
|
-
│ ::Object <: ::Integer
|
43
|
-
│ ::BasicObject <: ::Integer
|
44
|
-
│
|
45
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
46
|
-
│
|
47
|
-
└ e = begin
|
48
|
-
~~~~~~~~~
|
49
|
-
- |
|
50
|
-
a.rb:37:0: [error] Cannot allow method body have type `(::Integer | ::String)` because declared as type `::String`
|
51
|
-
│ (::Integer | ::String) <: ::String
|
52
|
-
│ ::Integer <: ::String
|
53
|
-
│ ::Numeric <: ::String
|
54
|
-
│ ::Object <: ::String
|
55
|
-
│ ::BasicObject <: ::String
|
56
|
-
│
|
57
|
-
│ Diagnostic ID: Ruby::MethodBodyTypeMismatch
|
58
|
-
│
|
59
|
-
└ def foo(a)
|
60
|
-
~~~~~~~~~~
|
data/smoke/self/test.yaml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:16:2: [error] Type `::Object` does not have method `baz`
|
7
|
-
│ Diagnostic ID: Ruby::NoMethod
|
8
|
-
│
|
9
|
-
└ baz
|
10
|
-
~~~
|
11
|
-
- |
|
12
|
-
a.rb:19:4: [error] Type `::Object` does not have method `baz`
|
13
|
-
│ Diagnostic ID: Ruby::NoMethod
|
14
|
-
│
|
15
|
-
└ baz
|
16
|
-
~~~
|
data/smoke/skip/test.yaml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
skip.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
skip.rb:8:7: [error] Type `::Object` does not have method `no_such_method`
|
7
|
-
│ Diagnostic ID: Ruby::NoMethod
|
8
|
-
│
|
9
|
-
└ self.no_such_method
|
10
|
-
~~~~~~~~~~~~~~
|
11
|
-
- |
|
12
|
-
skip.rb:12:7: [error] Type `::Object` does not have method `no_such_method`
|
13
|
-
│ Diagnostic ID: Ruby::NoMethod
|
14
|
-
│
|
15
|
-
└ self.no_such_method
|
16
|
-
~~~~~~~~~~~~~~
|
data/smoke/stdout/test.yaml
DELETED
data/smoke/super/test.yaml
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:6:4: [error] Cannot assign a value of type `::Object` to a variable of type `::Integer`
|
7
|
-
│ ::Object <: ::Integer
|
8
|
-
│ ::BasicObject <: ::Integer
|
9
|
-
│
|
10
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
11
|
-
│
|
12
|
-
└ a = super(x)
|
13
|
-
~~~~~~~~~~~~
|
14
|
-
- |
|
15
|
-
a.rb:7:4: [error] Cannot assign a value of type `::Object` to a variable of type `::Integer`
|
16
|
-
│ ::Object <: ::Integer
|
17
|
-
│ ::BasicObject <: ::Integer
|
18
|
-
│
|
19
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
20
|
-
│
|
21
|
-
└ a = super
|
22
|
-
~~~~~~~~~
|
23
|
-
- |
|
24
|
-
a.rb:19:4: [error] Cannot detect the type of the expression
|
25
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
26
|
-
│
|
27
|
-
└ super()
|
28
|
-
~~~~~~~
|
29
|
-
- |
|
30
|
-
a.rb:20:4: [error] Cannot detect the type of the expression
|
31
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
32
|
-
│
|
33
|
-
└ super
|
34
|
-
~~~~~
|
35
|
-
- |
|
36
|
-
a.rb:26:4: [error] UnexpectedSuper
|
37
|
-
│ Diagnostic ID: Ruby::UnexpectedSuper
|
38
|
-
│
|
39
|
-
└ super()
|
40
|
-
~~~~~~~
|
41
|
-
- |
|
42
|
-
a.rb:28:4: [error] UnexpectedSuper
|
43
|
-
│ Diagnostic ID: Ruby::UnexpectedSuper
|
44
|
-
│
|
45
|
-
└ super
|
46
|
-
~~~~~
|
47
|
-
- |
|
48
|
-
a.rb:28:4: [error] Cannot detect the type of the expression
|
49
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
50
|
-
│
|
51
|
-
└ super
|
52
|
-
~~~~~
|
data/smoke/toplevel/test.yaml
DELETED
data/smoke/tsort/test.yaml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:7:0: [error] Cannot assign a value of type `^() -> ::Hash[::Integer, ::Array[::Integer]]` to a variable of type `^() { (::Integer) -> void } -> void`
|
7
|
-
│ ^() -> ::Hash[::Integer, ::Array[::Integer]] <: ^() { (::Integer) -> void } -> void
|
8
|
-
│
|
9
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
10
|
-
│
|
11
|
-
└ each_node = -> (&b) { g.each_key(&b) }
|
12
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
13
|
-
- |
|
14
|
-
a.rb:9:0: [error] Cannot assign a value of type `^(::Integer) -> ::Array[::Integer]` to a variable of type `^(::Integer) { (::Integer) -> void } -> void`
|
15
|
-
│ ^(::Integer) -> ::Array[::Integer] <: ^(::Integer) { (::Integer) -> void } -> void
|
16
|
-
│
|
17
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
18
|
-
│
|
19
|
-
└ each_child = -> (n, &b) { g[n].each(&b) }
|
20
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
21
|
-
- |
|
22
|
-
a.rb:12:0: [error] Cannot assign a value of type `::Array[::Integer]` to a variable of type `::Array[::String]`
|
23
|
-
│ ::Array[::Integer] <: ::Array[::String]
|
24
|
-
│ ::Integer <: ::String
|
25
|
-
│ ::Numeric <: ::String
|
26
|
-
│ ::Object <: ::String
|
27
|
-
│ ::BasicObject <: ::String
|
28
|
-
│
|
29
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
30
|
-
│
|
31
|
-
└ xs = TSort.tsort(each_node, each_child)
|
32
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
data/smoke/type_case/test.yaml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:7:4: [error] Type `(::Integer | ::String)` does not have method `foobar`
|
7
|
-
│ Diagnostic ID: Ruby::NoMethod
|
8
|
-
│
|
9
|
-
└ x.foobar()
|
10
|
-
~~~~~~
|
11
|
-
- |
|
12
|
-
a.rb:12:4: [error] Type `(::Integer | ::String | ::Symbol)` does not have method `foobar`
|
13
|
-
│ Diagnostic ID: Ruby::NoMethod
|
14
|
-
│
|
15
|
-
└ x.foobar
|
16
|
-
~~~~~~
|
17
|
-
- |
|
18
|
-
a.rb:17:4: [error] Type `1` does not have method `foobar`
|
19
|
-
│ Diagnostic ID: Ruby::NoMethod
|
20
|
-
│
|
21
|
-
└ x.foobar
|
22
|
-
~~~~~~
|
23
|
-
- |
|
24
|
-
a.rb:23:2: [error] Type annotation about `x` is incompatible since ::Integer <: ::String doesn't hold
|
25
|
-
│ ::Integer <: ::String
|
26
|
-
│ ::Numeric <: ::String
|
27
|
-
│ ::Object <: ::String
|
28
|
-
│ ::BasicObject <: ::String
|
29
|
-
│
|
30
|
-
│ Diagnostic ID: Ruby::IncompatibleAnnotation
|
31
|
-
│
|
32
|
-
└ x + 1
|
33
|
-
~~~~~
|
data/smoke/yield/test.yaml
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:6:4: [error] Cannot assign a value of type `::Integer` to a variable of type `::String`
|
7
|
-
│ ::Integer <: ::String
|
8
|
-
│ ::Numeric <: ::String
|
9
|
-
│ ::Object <: ::String
|
10
|
-
│ ::BasicObject <: ::String
|
11
|
-
│
|
12
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
13
|
-
│
|
14
|
-
└ x = yield(3)
|
15
|
-
~~~~~~~~~~~~
|
16
|
-
- |
|
17
|
-
a.rb:8:10: [error] Cannot assign a value of type `::String` to an expression of type `::Integer`
|
18
|
-
│ ::String <: ::Integer
|
19
|
-
│ ::Object <: ::Integer
|
20
|
-
│ ::BasicObject <: ::Integer
|
21
|
-
│
|
22
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
23
|
-
│
|
24
|
-
└ yield(x)
|
25
|
-
~
|
26
|
-
- |
|
27
|
-
a.rb:13:4: [error] No block given for `yield`
|
28
|
-
│ Diagnostic ID: Ruby::UnexpectedYield
|
29
|
-
│
|
30
|
-
└ yield 4
|
31
|
-
~~~~~~~
|
32
|
-
- |
|
33
|
-
a.rb:13:4: [error] Cannot detect the type of the expression
|
34
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
35
|
-
│
|
36
|
-
└ yield 4
|
37
|
-
~~~~~~~
|
38
|
-
b.rb:
|
39
|
-
diagnostics:
|
40
|
-
- |
|
41
|
-
b.rb:4:10: [error] Cannot assign a value of type `::String` to an expression of type `::Integer`
|
42
|
-
│ ::String <: ::Integer
|
43
|
-
│ ::Object <: ::Integer
|
44
|
-
│ ::BasicObject <: ::Integer
|
45
|
-
│
|
46
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
47
|
-
│
|
48
|
-
└ yield ""
|
49
|
-
~~
|