-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inlinable function call in a function with debug info must have a !dbg location #4166
Comments
I'm having a hard time figuring out, which code triggers this message. It does not happen in an empty project ( Does the message above already give enough hints about the source of the issue? If not I'm going to do more research... |
@cschlack without a bit more of source code is hard to diagnose. Try to reduce as much as possible before sharing please. If this is blocking you building with |
Okay, here we go: file: test.cr require "spec"
require "http"
test = ""
it "breaks the compiler" do
test.empty?
end
(running on MacOS 10.11.6) |
I reach this: file: test.cr def call(&block)
block.call
end
test = ""
call do
test.empty?
end The following passes
But given a test_main.cr file with
|
file: test.cr require "lib_c"
require "c/stdlib"
fun __crystal_malloc(size : UInt32) : Void*
LibC.malloc(size)
end
class Foo
@p : (Void* -> Void*)?
end
def call(&block)
block.call
end
test = 0
call do
test
end file: main_test.cr require "./test"
In the first command there are 42 debug locations and in the second command 41 debug locations. One missing :-) |
$ crystal --version
$ crystal spec
The text was updated successfully, but these errors were encountered: