Skip to content
Merged
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
6 changes: 6 additions & 0 deletions Compiler/src/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,12 @@ 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, _, _, _ = instanceof_tfunc(argextype(stmt.args[1], ci, sptypes))
t <: Function || continue
atype = Tuple{t, Vararg}
else
# TODO: handle other StmtInfo like OpaqueClosure?
continue
Expand Down