Open Blacksmoke16 opened 2 years ago
Reproduction code looks similar to
module Foo; end
Proc(Foo, Nil).new do |foo|
foo.some_missing_method
end
https://play.crystal-lang.org/#/r/cseq
It's produces:
Error: can't infer block return type, try to cast the block body with `as`. See: https://crystal-lang.org/reference/syntax_and_semantics/as.html#usage-for-when-the-compiler-cant-infer-the-type-of-a-block
I guess the same message would be suitable for the case above
https://play.crystal-lang.org/#/r/chwu
Produces:
Happens on master as well as
1.2.2
.Seems to only happen if the argument to the proc is a module.