Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Fix #3934
  • Loading branch information
jopemachine committed Oct 16, 2022
commit 67c4bd04677413316e2b277228234daa4ce32e5c
7 changes: 4 additions & 3 deletions compiler/codegen/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2118,15 +2118,16 @@ impl Compiler {
Name { id, .. } => self.load_name(id)?,
Lambda { args, body } => {
let prev_ctx = self.ctx;

let name = "<lambda>".to_owned();
let mut funcflags = self.enter_function(&name, args)?;

self.ctx = CompileContext {
loop_data: Option::None,
in_class: prev_ctx.in_class,
func: FunctionContext::Function,
};

let name = "<lambda>".to_owned();
let mut funcflags = self.enter_function(&name, args)?;

self.current_codeinfo()
.constants
.insert_full(ConstantData::None);
Expand Down