You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
arr = [{ "foo" => "bar" }]
arr.map do |v|
case v
whenHash
pp :hashelse
pp v.as(typeof(v))
endend
raises ICE:
BUG: `typeof(v)` at eval:7:13 has no type (Exception)
from Crystal::ASTNode+@Crystal::ASTNode#type:Crystal::Type+
from Crystal::Cast#update<Nil>:(Crystal::Type+ | Nil)
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::MainVisitor#visit<Crystal::Call>:Bool
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::MainVisitor#visit<Crystal::If>:Bool
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::MainVisitor#expand<Crystal::Case>:Bool
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::MainVisitor#visit<Crystal::Block>:(Bool | Nil)
from Crystal::Block@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::Call#match_block_arg<Crystal::Match>:Tuple(Array(Crystal::Var+) | Nil, Crystal::Type+ | Nil)
from Crystal::Call#instantiate<Crystal::Matches, Crystal::Type+, Nil, Bool>:Array(Crystal::Def+)
from Crystal::Call#lookup_matches_in_type<Crystal::Type+, Array(Crystal::Type+), (Array(Crystal::NamedArgumentType) | Nil), Nil, String, Bool, Bool, Bool>:Array(Crystal::Def+)
from Crystal::Call#lookup_matches_in:with_literals<Crystal::Type+, Array(Crystal::Type+), (Array(Crystal::NamedArgumentType) | Nil), Bool>:Array(Crystal::Def+)
from Crystal::Call#lookup_matches:with_literals<Bool>:Array(Crystal::Def+)
from Crystal::Call#recalculate:Nil
from Crystal::MainVisitor#visit<Crystal::Call>:Bool
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::Call#lookup_matches_in_type<Crystal::Program, Array(Crystal::Type+), (Array(Crystal::NamedArgumentType) | Nil), Nil, String, Bool, Bool, Bool>:Array(Crystal::Def+)
from Crystal::Call#lookup_matches_without_splat<Array(Crystal::Type+), (Array(Crystal::NamedArgumentType) | Nil), Bool>:Array(Crystal::Def+)
from Crystal::Call#lookup_matches:with_literals<Bool>:Array(Crystal::Def+)
from Crystal::Call#recalculate:Nil
from Crystal::MainVisitor#visit<Crystal::Call>:Bool
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::MainVisitor#visit<Crystal::Call>:Bool
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::MainVisitor#visit<Crystal::Call>:Bool
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::MainVisitor#visit<Crystal::Call>:Bool
from Crystal::MainVisitor#expand<Crystal::StringInterpolation>:Bool
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::MainVisitor#visit<Crystal::Call>:Bool
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::ASTNode+@Crystal::ASTNode#accept<Crystal::MainVisitor>:Nil
from Crystal::Program#visit_main<Crystal::ASTNode+, Crystal::MainVisitor, Bool, Bool>:Crystal::ASTNode+
from Crystal::Program#semantic<Crystal::ASTNode+, Bool>:Crystal::ASTNode+
from Crystal::Compiler#compile<Array(Crystal::Compiler::Source), String>:Crystal::Compiler::Result
from Crystal::Command#run_command<Bool>:Nil
from Crystal::Command#run:(Bool | Crystal::Compiler::Result | Nil)
from __crystal_main
from main
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues
Below code:
raises ICE:
Might be a duplicate of #5805
The text was updated successfully, but these errors were encountered: