-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
I'm working on a macro, here, which seems to cause problems for the compiler.
This expands and evaluates just fine:
julia> @objc [[[NSString alloc] initWithUTF8String:"foo"] UTF8String] |> bytestring
"foo"
But this hangs at the REPL:
julia> :(@objc begin
s = [NSString alloc]
[s initWithUTF8String:"foo"]
end) |> macroexpand
fatal: error thrown and no exception handler available.
Base.MethodError(f=getindex, args=(<?::quote Expr(:macrocall, :@objc, Expr(:block, Expr(:line, 2, :/Users/mike/Library/Application Support/LightTable/plugins/Julia-LT/jl/init.jl)::Any, :s = Expr(:hcat, :NSString, :alloc)::Any, # line 3, Expr(:hcat, :s, Expr(::, :initWithUTF8String, "foo")::Any)::Any)::Any)::Any end>, 1))
Julia seems to produce this error + occasional type errors and segfaults.
The weirdest part is that all is fine if you get rid of the call to esc here.
Metadata
Metadata
Assignees
Labels
No labels