Skip to content

Commit

Permalink
Allow nullable trampolines with scope="call"
Browse files Browse the repository at this point in the history
  • Loading branch information
EPashkin committed Apr 14, 2019
1 parent 16d8c2d commit 9b6f48f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegen/function_body_chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ impl Builder {
format!("::<{}>", bounds_names)
};
if !is_destroy {
if !trampoline.scope.is_call() && *trampoline.nullable {
if *trampoline.nullable {
chunks.push(Chunk::Custom(format!("let {0} = if {0}_data.is_some() {{ Some({0}_func{1} as _) }} else {{ None }};",
trampoline.name,
bounds_str)));
Expand Down

0 comments on commit 9b6f48f

Please sign in to comment.