The Crystal Programming Language Forum

Missing location info

https://play.crystal-lang.org/#/r/7ki6

struct Foo
  macro method_missing(call)
    {{raise "Unknown method: '#{call.name}' at #{call.filename}:#{call.line_number}:#{call.column_number}"}}
  end
end

Foo.new.some_method # => Error: Unknown method: 'some_method' at nil:nil:nil

Is it expected that the call doesn’t have any location information?

I would say it’s a bug and a nice finding.

2 Likes

:+1: I’ll create an issue then.

1 Like