steep 0.40.0 → 0.41.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 +4 -0
- data/bin/output_rebaseline.rb +15 -30
- data/bin/output_test.rb +17 -57
- data/lib/steep.rb +4 -0
- data/lib/steep/cli.rb +9 -3
- data/lib/steep/drivers/check.rb +106 -14
- data/lib/steep/drivers/diagnostic_printer.rb +11 -11
- data/lib/steep/expectations.rb +159 -0
- data/lib/steep/project.rb +6 -0
- 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 +139 -0
- data/smoke/diagnostics-rbs-duplicated/test_expectations.yml +13 -0
- data/smoke/diagnostics-rbs/test_expectations.yml +229 -0
- data/smoke/diagnostics/test_expectations.yml +477 -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/test_expectations.yml +61 -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/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/test_expectations.yml +43 -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 +79 -0
- data/smoke/toplevel/test_expectations.yml +15 -0
- data/smoke/tsort/test_expectations.yml +43 -0
- data/smoke/type_case/test_expectations.yml +48 -0
- data/smoke/yield/test_expectations.yml +68 -0
- metadata +41 -44
- 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/Steepfile +0 -5
- 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/alias/test.yaml
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:4:0: [error] Cannot find compatible overloading of method `+` of type `(::String | ::Integer)`
|
7
|
-
│ Method types:
|
8
|
-
│ def +: ((::string & ::Integer)) -> (::String | ::Integer)
|
9
|
-
│ | ((::string & ::Float)) -> (::String | ::Float)
|
10
|
-
│ | ((::string & ::Rational)) -> (::String | ::Rational)
|
11
|
-
│ | ((::string & ::Complex)) -> (::String | ::Complex)
|
12
|
-
│
|
13
|
-
│ Diagnostic ID: Ruby::UnresolvedOverloading
|
14
|
-
│
|
15
|
-
└ x + 123
|
16
|
-
~~~~~~~
|
17
|
-
- |
|
18
|
-
a.rb:13:2: [error] Cannot assign a value of type `::String` to a variable of type `::Symbol`
|
19
|
-
│ ::String <: ::Symbol
|
20
|
-
│ ::Object <: ::Symbol
|
21
|
-
│ ::BasicObject <: ::Symbol
|
22
|
-
│
|
23
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
24
|
-
│
|
25
|
-
└ z = x
|
26
|
-
~~~~~
|
27
|
-
- |
|
28
|
-
a.rb:15:2: [error] Cannot assign a value of type `::Integer` to a variable of type `::Symbol`
|
29
|
-
│ ::Integer <: ::Symbol
|
30
|
-
│ ::Numeric <: ::Symbol
|
31
|
-
│ ::Object <: ::Symbol
|
32
|
-
│ ::BasicObject <: ::Symbol
|
33
|
-
│
|
34
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
35
|
-
│
|
36
|
-
└ z = x
|
37
|
-
~~~~~
|
38
|
-
b.rb:
|
39
|
-
diagnostics:
|
40
|
-
- |
|
41
|
-
b.rb:6:0: [error] Cannot assign a value of type `::String` to a variable of type `::Integer`
|
42
|
-
│ ::String <: ::Integer
|
43
|
-
│ ::Object <: ::Integer
|
44
|
-
│ ::BasicObject <: ::Integer
|
45
|
-
│
|
46
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
47
|
-
│
|
48
|
-
└ x = a[0]
|
49
|
-
~~~~~~~~
|
50
|
-
c.rb:
|
51
|
-
diagnostics:
|
52
|
-
- |
|
53
|
-
c.rb:3:0: [error] Cannot assign a value of type `::Integer` to a variable of type `::String`
|
54
|
-
│ ::Integer <: ::String
|
55
|
-
│ ::Numeric <: ::String
|
56
|
-
│ ::Object <: ::String
|
57
|
-
│ ::BasicObject <: ::String
|
58
|
-
│
|
59
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
60
|
-
│
|
61
|
-
└ x = AliasMethodArg.new.foo(:foo)
|
62
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
63
|
-
- |
|
64
|
-
c.rb:8:0: [error] Cannot assign a value of type `::Integer` to a variable of type `::String`
|
65
|
-
│ ::Integer <: ::String
|
66
|
-
│ ::Numeric <: ::String
|
67
|
-
│ ::Object <: ::String
|
68
|
-
│ ::BasicObject <: ::String
|
69
|
-
│
|
70
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
71
|
-
│
|
72
|
-
└ x = AliasMethodArg.new.foo(name)
|
73
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
data/smoke/and/test.yaml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:6:0: [error] Cannot assign a value of type `(::String | nil)` to a variable of type `::String`
|
7
|
-
│ (::String | nil) <: ::String
|
8
|
-
│ nil <: ::String
|
9
|
-
│
|
10
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
11
|
-
│
|
12
|
-
└ b = a && a.to_str
|
13
|
-
~~~~~~~~~~~~~~~~~
|
14
|
-
- |
|
15
|
-
a.rb:8:0: [error] Cannot assign a value of type `(::String | nil)` to a variable of type `::Integer`
|
16
|
-
│ (::String | nil) <: ::Integer
|
17
|
-
│ ::String <: ::Integer
|
18
|
-
│ ::Object <: ::Integer
|
19
|
-
│ ::BasicObject <: ::Integer
|
20
|
-
│
|
21
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
22
|
-
│
|
23
|
-
└ c = a && a.to_str
|
24
|
-
~~~~~~~~~~~~~~~~~
|
data/smoke/array/test.yaml
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:6:0: [error] Cannot find compatible overloading of method `[]=` of type `::Array[::Integer]`
|
7
|
-
│ Method types:
|
8
|
-
│ def []=: (::int, ::Integer) -> ::Integer
|
9
|
-
│ | (::int, ::int, ::Integer) -> ::Integer
|
10
|
-
│ | (::int, ::int, ::Array[::Integer]) -> ::Array[::Integer]
|
11
|
-
│ | (::int, ::int, nil) -> nil
|
12
|
-
│ | (::Range[::Integer], ::Integer) -> ::Integer
|
13
|
-
│ | (::Range[::Integer], ::Array[::Integer]) -> ::Array[::Integer]
|
14
|
-
│ | (::Range[::Integer], nil) -> nil
|
15
|
-
│
|
16
|
-
│ Diagnostic ID: Ruby::UnresolvedOverloading
|
17
|
-
│
|
18
|
-
└ a[2] = "foo"
|
19
|
-
~~~~~~~~~~~~
|
20
|
-
- |
|
21
|
-
a.rb:12:0: [error] Cannot assign a value of type `::Integer` to a variable of type `::String`
|
22
|
-
│ ::Integer <: ::String
|
23
|
-
│ ::Numeric <: ::String
|
24
|
-
│ ::Object <: ::String
|
25
|
-
│ ::BasicObject <: ::String
|
26
|
-
│
|
27
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
28
|
-
│
|
29
|
-
└ s = a[1]
|
30
|
-
~~~~~~~~
|
31
|
-
- |
|
32
|
-
a.rb:18:0: [error] Cannot assign a value of type `::String` to a variable of type `::Integer`
|
33
|
-
│ ::String <: ::Integer
|
34
|
-
│ ::Object <: ::Integer
|
35
|
-
│ ::BasicObject <: ::Integer
|
36
|
-
│
|
37
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
38
|
-
│
|
39
|
-
└ i = b[1]
|
40
|
-
~~~~~~~~
|
41
|
-
b.rb:
|
42
|
-
diagnostics:
|
43
|
-
- |
|
44
|
-
b.rb:11:0: [error] Cannot assign a value of type `::Array[::Integer]` to a variable of type `::Array[::String]`
|
45
|
-
│ ::Array[::Integer] <: ::Array[::String]
|
46
|
-
│ ::Integer <: ::String
|
47
|
-
│ ::Numeric <: ::String
|
48
|
-
│ ::Object <: ::String
|
49
|
-
│ ::BasicObject <: ::String
|
50
|
-
│
|
51
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
52
|
-
│
|
53
|
-
└ b = a
|
54
|
-
~~~~~
|
55
|
-
- |
|
56
|
-
b.rb:12:0: [error] Cannot assign a value of type `::Array[::String]` to a variable of type `::Array[::Integer]`
|
57
|
-
│ ::Array[::String] <: ::Array[::Integer]
|
58
|
-
│ ::String <: ::Integer
|
59
|
-
│ ::Object <: ::Integer
|
60
|
-
│ ::BasicObject <: ::Integer
|
61
|
-
│
|
62
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
63
|
-
│
|
64
|
-
└ a = b
|
65
|
-
~~~~~
|
66
|
-
c.rb:
|
67
|
-
diagnostics:
|
68
|
-
- |
|
69
|
-
c.rb:6:0: [error] Cannot assign a value of type `::Array[::Integer]` to a variable of type `::Array[(::String | nil)]`
|
70
|
-
│ ::Array[::Integer] <: ::Array[(::String | nil)]
|
71
|
-
│ ::Integer <: (::String | nil)
|
72
|
-
│ ::Integer <: ::String
|
73
|
-
│ ::Numeric <: ::String
|
74
|
-
│ ::Object <: ::String
|
75
|
-
│ ::BasicObject <: ::String
|
76
|
-
│
|
77
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
78
|
-
│
|
79
|
-
└ x = [1]
|
80
|
-
~~~~~~~
|
data/smoke/block/test.yaml
DELETED
@@ -1,96 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:8:0: [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
|
-
└ s = a.foo
|
15
|
-
~~~~~~~~~
|
16
|
-
- |
|
17
|
-
a.rb:10:0: [error] Cannot assign a value of type `::String` to a variable of type `::Integer`
|
18
|
-
│ ::String <: ::Integer
|
19
|
-
│ ::Object <: ::Integer
|
20
|
-
│ ::BasicObject <: ::Integer
|
21
|
-
│
|
22
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
23
|
-
│
|
24
|
-
└ i = a.foo { nil }
|
25
|
-
~~~~~~~~~~~~~~~~~
|
26
|
-
b.rb:
|
27
|
-
diagnostics:
|
28
|
-
- |
|
29
|
-
b.rb:5:2: [error] Cannot break with a value of type `::Integer` because type `::Symbol` is assumed
|
30
|
-
│ ::Integer <: ::Symbol
|
31
|
-
│ ::Numeric <: ::Symbol
|
32
|
-
│ ::Object <: ::Symbol
|
33
|
-
│ ::BasicObject <: ::Symbol
|
34
|
-
│
|
35
|
-
│ Diagnostic ID: Ruby::BreakTypeMismatch
|
36
|
-
│
|
37
|
-
└ break 3
|
38
|
-
~~~~~~~
|
39
|
-
- |
|
40
|
-
b.rb:10:0: [error] Cannot assign a value of type `(::Integer | ::Symbol)` to a variable of type `::String`
|
41
|
-
│ (::Integer | ::Symbol) <: ::String
|
42
|
-
│ ::Integer <: ::String
|
43
|
-
│ ::Numeric <: ::String
|
44
|
-
│ ::Object <: ::String
|
45
|
-
│ ::BasicObject <: ::String
|
46
|
-
│
|
47
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
48
|
-
│
|
49
|
-
└ s = a.bar do |x|
|
50
|
-
~~~~~~~~~~~~~~~~
|
51
|
-
c.rb:
|
52
|
-
diagnostics: []
|
53
|
-
d.rb:
|
54
|
-
diagnostics:
|
55
|
-
- |
|
56
|
-
d.rb:6:0: [error] Cannot assign a value of type `::Array[::String]` to a variable of type `::Array[::Float]`
|
57
|
-
│ ::Array[::String] <: ::Array[::Float]
|
58
|
-
│ ::String <: ::Float
|
59
|
-
│ ::Object <: ::Float
|
60
|
-
│ ::BasicObject <: ::Float
|
61
|
-
│
|
62
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
63
|
-
│
|
64
|
-
└ b = [1,2,3].map(&a)
|
65
|
-
~~~~~~~~~~~~~~~~~~~
|
66
|
-
- |
|
67
|
-
d.rb:8:0: [error] Cannot assign a value of type `::Array[::String]` to a variable of type `::Array[::Float]`
|
68
|
-
│ ::Array[::String] <: ::Array[::Float]
|
69
|
-
│ ::String <: ::Float
|
70
|
-
│ ::Object <: ::Float
|
71
|
-
│ ::BasicObject <: ::Float
|
72
|
-
│
|
73
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
74
|
-
│
|
75
|
-
└ b = [1,2,3].map(&:to_s)
|
76
|
-
~~~~~~~~~~~~~~~~~~~~~~~
|
77
|
-
- |
|
78
|
-
d.rb:10:0: [error] Cannot find compatible overloading of method `map` of type `::Array[::Integer]`
|
79
|
-
│ Method types:
|
80
|
-
│ def map: [U] () { (::Integer) -> U } -> ::Array[U]
|
81
|
-
│ | () -> ::Enumerator[::Integer, ::Array[untyped]]
|
82
|
-
│
|
83
|
-
│ Diagnostic ID: Ruby::UnresolvedOverloading
|
84
|
-
│
|
85
|
-
└ [1,2,3].map(&:no_such_method)
|
86
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
87
|
-
- |
|
88
|
-
d.rb:11:0: [error] Cannot find compatible overloading of method `map` of type `::Array[::Integer]`
|
89
|
-
│ Method types:
|
90
|
-
│ def map: [U] () { (::Integer) -> U } -> ::Array[U]
|
91
|
-
│ | () -> ::Enumerator[::Integer, ::Array[untyped]]
|
92
|
-
│
|
93
|
-
│ Diagnostic ID: Ruby::UnresolvedOverloading
|
94
|
-
│
|
95
|
-
└ [1,2,3].map(&:divmod)
|
96
|
-
~~~~~~~~~~~~~~~~~~~~~
|
data/smoke/broken/Steepfile
DELETED
data/smoke/broken/broken.rb
DELETED
Binary file
|
data/smoke/broken/broken.rbs
DELETED
Binary file
|
data/smoke/broken/test.yaml
DELETED
data/smoke/case/test.yaml
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:3:0: [error] Cannot assign a value of type `(::Integer | ::Array[::String] | nil | ::String)` to a variable of type `::Integer`
|
7
|
-
│ (::Integer | ::Array[::String] | nil | ::String) <: ::Integer
|
8
|
-
│ ::Array[::String] <: ::Integer
|
9
|
-
│ ::Object <: ::Integer
|
10
|
-
│ ::BasicObject <: ::Integer
|
11
|
-
│
|
12
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
13
|
-
│
|
14
|
-
└ a = case 1
|
15
|
-
~~~~~~~~~~
|
16
|
-
- |
|
17
|
-
a.rb:16:9: [error] Cannot find compatible overloading of method `+` of type `::Integer`
|
18
|
-
│ Method types:
|
19
|
-
│ def +: (::Integer) -> ::Integer
|
20
|
-
│ | (::Float) -> ::Float
|
21
|
-
│ | (::Rational) -> ::Rational
|
22
|
-
│ | (::Complex) -> ::Complex
|
23
|
-
│
|
24
|
-
│ Diagnostic ID: Ruby::UnresolvedOverloading
|
25
|
-
│
|
26
|
-
└ when 1+"a"
|
27
|
-
~~~~~
|
28
|
-
- |
|
29
|
-
a.rb:15:0: [error] Cannot assign a value of type `(::Integer | nil)` to a variable of type `::Integer`
|
30
|
-
│ (::Integer | nil) <: ::Integer
|
31
|
-
│ nil <: ::Integer
|
32
|
-
│
|
33
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
34
|
-
│
|
35
|
-
└ a = case
|
36
|
-
~~~~~~~~
|
data/smoke/class/test.yaml
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:8:9: [error] Method parameters are incompatible with declaration `() -> ::String`
|
7
|
-
│ Diagnostic ID: Ruby::MethodArityMismatch
|
8
|
-
│
|
9
|
-
└ def bar(y)
|
10
|
-
~~~
|
11
|
-
- |
|
12
|
-
a.rb:13:2: [error] Cannot allow method body have type `::Integer` because declared as type `::String`
|
13
|
-
│ ::Integer <: ::String
|
14
|
-
│ ::Numeric <: ::String
|
15
|
-
│ ::Object <: ::String
|
16
|
-
│ ::BasicObject <: ::String
|
17
|
-
│
|
18
|
-
│ Diagnostic ID: Ruby::MethodBodyTypeMismatch
|
19
|
-
│
|
20
|
-
└ def to_s
|
21
|
-
~~~~~~~~
|
22
|
-
- |
|
23
|
-
a.rb:22:2: [error] Cannot allow method body have type `::String` because declared as type `::Integer`
|
24
|
-
│ ::String <: ::Integer
|
25
|
-
│ ::Object <: ::Integer
|
26
|
-
│ ::BasicObject <: ::Integer
|
27
|
-
│
|
28
|
-
│ Diagnostic ID: Ruby::MethodBodyTypeMismatch
|
29
|
-
│
|
30
|
-
└ def self.baz
|
31
|
-
~~~~~~~~~~~~
|
32
|
-
b.rb:
|
33
|
-
diagnostics: []
|
34
|
-
c.rb:
|
35
|
-
diagnostics:
|
36
|
-
- |
|
37
|
-
c.rb:1:6: [error] @dynamic annotation contains unknown method name `type`
|
38
|
-
│ Diagnostic ID: Ruby::UnexpectedDynamicMethod
|
39
|
-
│
|
40
|
-
└ class B
|
41
|
-
~
|
42
|
-
f.rb:
|
43
|
-
diagnostics:
|
44
|
-
- |
|
45
|
-
f.rb:9:0: [error] Cannot assign a value of type `::_E` to a variable of type `::D`
|
46
|
-
│ ::_E <: ::D
|
47
|
-
│
|
48
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
49
|
-
│
|
50
|
-
└ d = e
|
51
|
-
~~~~~
|
52
|
-
g.rb:
|
53
|
-
diagnostics:
|
54
|
-
- |
|
55
|
-
g.rb:1:6: [error] Cannot find implementation of method `::B#name`
|
56
|
-
│ Diagnostic ID: Ruby::MethodDefinitionMissing
|
57
|
-
│
|
58
|
-
└ class B
|
59
|
-
~
|
60
|
-
- |
|
61
|
-
g.rb:4:6: [error] Cannot find implementation of method `::B#name`
|
62
|
-
│ Diagnostic ID: Ruby::MethodDefinitionMissing
|
63
|
-
│
|
64
|
-
└ class C
|
65
|
-
~
|
66
|
-
h.rb:
|
67
|
-
diagnostics: []
|
68
|
-
i.rb:
|
69
|
-
diagnostics:
|
70
|
-
- |
|
71
|
-
i.rb:4:4: [error] Cannot assign a value of type `::Integer` to a variable of type `::Symbol`
|
72
|
-
│ ::Integer <: ::Symbol
|
73
|
-
│ ::Numeric <: ::Symbol
|
74
|
-
│ ::Object <: ::Symbol
|
75
|
-
│ ::BasicObject <: ::Symbol
|
76
|
-
│
|
77
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
78
|
-
│
|
79
|
-
└ x = super()
|
80
|
-
~~~~~~~~~~~
|
81
|
-
- |
|
82
|
-
i.rb:10:4: [error] Cannot find method `initialize` of type `::IncompatibleChild` with compatible arity
|
83
|
-
│ Method types:
|
84
|
-
│ def initialize: (name: ::String) -> untyped
|
85
|
-
│
|
86
|
-
│ Diagnostic ID: Ruby::IncompatibleArguments
|
87
|
-
│
|
88
|
-
└ super()
|
89
|
-
~~~~~~~
|
data/smoke/const/test.yaml
DELETED
@@ -1,96 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:4:0: [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 = A
|
15
|
-
~~~~~
|
16
|
-
- |
|
17
|
-
a.rb:6:4: [error] Cannot detect the type of the expression
|
18
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
19
|
-
│
|
20
|
-
└ x = B
|
21
|
-
~
|
22
|
-
- |
|
23
|
-
a.rb:8:7: [error] Cannot detect the type of the expression
|
24
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
25
|
-
│
|
26
|
-
└ module X
|
27
|
-
~
|
28
|
-
- |
|
29
|
-
a.rb:14:4: [error] Cannot assign a value of type `::Integer` to a variable of type `::String`
|
30
|
-
│ ::Integer <: ::String
|
31
|
-
│ ::Numeric <: ::String
|
32
|
-
│ ::Object <: ::String
|
33
|
-
│ ::BasicObject <: ::String
|
34
|
-
│
|
35
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
36
|
-
│
|
37
|
-
└ x = A
|
38
|
-
~~~~~
|
39
|
-
- |
|
40
|
-
a.rb:16:8: [error] Cannot detect the type of the expression
|
41
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
42
|
-
│
|
43
|
-
└ x = B
|
44
|
-
~
|
45
|
-
- |
|
46
|
-
a.rb:23:0: [error] Cannot assign a value of type `::Integer` to a variable of type `::String`
|
47
|
-
│ ::Integer <: ::String
|
48
|
-
│ ::Numeric <: ::String
|
49
|
-
│ ::Object <: ::String
|
50
|
-
│ ::BasicObject <: ::String
|
51
|
-
│
|
52
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
53
|
-
│
|
54
|
-
└ x = Foo::Bar::Baz
|
55
|
-
~~~~~~~~~~~~~~~~~
|
56
|
-
- |
|
57
|
-
a.rb:26:4: [error] Cannot detect the type of the expression
|
58
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
59
|
-
│
|
60
|
-
└ x = z::Bar::Baz
|
61
|
-
~~~~~~
|
62
|
-
- |
|
63
|
-
a.rb:26:4: [error] Cannot detect the type of the expression
|
64
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
65
|
-
│
|
66
|
-
└ x = z::Bar::Baz
|
67
|
-
~~~~~~~~~~~
|
68
|
-
- |
|
69
|
-
a.rb:27:0: [error] Cannot assign a value of type `::Integer` to a variable of type `::String`
|
70
|
-
│ ::Integer <: ::String
|
71
|
-
│ ::Numeric <: ::String
|
72
|
-
│ ::Object <: ::String
|
73
|
-
│ ::BasicObject <: ::String
|
74
|
-
│
|
75
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
76
|
-
│
|
77
|
-
└ x = ::Foo::Bar::Baz
|
78
|
-
~~~~~~~~~~~~~~~~~~~
|
79
|
-
b.rb:
|
80
|
-
diagnostics:
|
81
|
-
- |
|
82
|
-
b.rb:3:4: [error] Cannot assign a value of type `::String` to a constant of type `::Integer`
|
83
|
-
│ ::String <: ::Integer
|
84
|
-
│ ::Object <: ::Integer
|
85
|
-
│ ::BasicObject <: ::Integer
|
86
|
-
│
|
87
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
88
|
-
│
|
89
|
-
└ Baz = "Hello"
|
90
|
-
~~~~~~~~~~~~~
|
91
|
-
- |
|
92
|
-
b.rb:5:4: [error] Cannot find the declaration of constant `Baz2`
|
93
|
-
│ Diagnostic ID: Ruby::UnknownConstantAssigned
|
94
|
-
│
|
95
|
-
└ Baz2 = "World"
|
96
|
-
~~~~
|