Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Compiler/src/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,14 @@ function collectinvokes!(workqueue::CompilationQueue, ci::CodeInfo, sptypes::Vec
push!(argtypes, sp_type_rewrap(at[i], linfo, #= isreturn =# false))
end
atype = argtypes_to_type(argtypes)
elseif isexpr(stmt, :new)
# When creating a struct of Function type, check to see if we should
# proactively compile the lambda
t = argextype(stmt.args[1], ci, sptypes)
t isa Const || continue
t.val::DataType
t.val <: Function || continue
atype = Tuple{t.val, Vararg}
else
# TODO: handle other StmtInfo like OpaqueClosure?
continue
Expand Down