()
| 390 | |
| 391 | #[test] |
| 392 | fn test_compile_lambda3() { |
| 393 | let code = r#" |
| 394 | def g(): |
| 395 | pass |
| 396 | def f(): |
| 397 | if False: |
| 398 | return lambda x: g(x) |
| 399 | elif False: |
| 400 | return g |
| 401 | else: |
| 402 | return g |
| 403 | "#; |
| 404 | let compiled = compile(code, Mode::Exec, "<>", CompileOpts::default()); |
| 405 | dbg!(compiled.expect("compile error")); |
| 406 | } |
| 407 | |
| 408 | #[test] |
| 409 | fn test_compile_int() { |