--- test: a.rb: diagnostics: - | a.rb:7:0: [error] Cannot assign a value of type `^() -> ::Hash[::Integer, ::Array[::Integer]]` to a variable of type `^() { (::Integer) -> void } -> void` │ ^() -> ::Hash[::Integer, ::Array[::Integer]] <: ^() { (::Integer) -> void } -> void │ │ Diagnostic ID: Ruby::IncompatibleAssignment │ └ each_node = -> (&b) { g.each_key(&b) } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - | a.rb:9:0: [error] Cannot assign a value of type `^(::Integer) -> ::Array[::Integer]` to a variable of type `^(::Integer) { (::Integer) -> void } -> void` │ ^(::Integer) -> ::Array[::Integer] <: ^(::Integer) { (::Integer) -> void } -> void │ │ Diagnostic ID: Ruby::IncompatibleAssignment │ └ each_child = -> (n, &b) { g[n].each(&b) } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - | a.rb:12:0: [error] Cannot assign a value of type `::Array[::Integer]` to a variable of type `::Array[::String]` │ ::Array[::Integer] <: ::Array[::String] │ ::Integer <: ::String │ ::Numeric <: ::String │ ::Object <: ::String │ ::BasicObject <: ::String │ │ Diagnostic ID: Ruby::IncompatibleAssignment │ └ xs = TSort.tsort(each_node, each_child) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~