--- test: a.rb: diagnostics: - | a.rb:8:2: [error] Cannot assign a value of type `::Foo` to a variable of type `::String` │ ::Foo <: ::String │ ::Object <: ::String │ ::BasicObject <: ::String │ │ Diagnostic ID: Ruby::IncompatibleAssignment │ └ string = x ~~~~~~~~~~ b.rb: diagnostics: - | b.rb:7:0: [error] Cannot assign a value of type `::String` to a variable of type `::Integer` │ ::String <: ::Integer │ ::Object <: ::Integer │ ::BasicObject <: ::Integer │ │ Diagnostic ID: Ruby::IncompatibleAssignment │ └ integer = foo.f() ~~~~~~~~~~~~~~~~~ - | b.rb:10:0: [error] Cannot assign a value of type `::Object` to a variable of type `::Integer` │ ::Object <: ::Integer │ ::BasicObject <: ::Integer │ │ Diagnostic ID: Ruby::IncompatibleAssignment │ └ integer = "".f() ~~~~~~~~~~~~~~~~ c.rb: diagnostics: - | c.rb:6:4: [error] Cannot assign a value of type `::Object` to a variable of type `::String` │ ::Object <: ::String │ ::BasicObject <: ::String │ │ Diagnostic ID: Ruby::IncompatibleAssignment │ └ string = super() ~~~~~~~~~~~~~~~~ d.rb: diagnostics: [] e.rb: diagnostics: []