()
| 408 | |
| 409 | #[test] |
| 410 | fn allows_mixed_boolean_precedence() { |
| 411 | let source = r#" |
| 412 | main: () -> i32 { |
| 413 | x: bool = true or false and not true |
| 414 | if x { |
| 415 | return 1 |
| 416 | } |
| 417 | return 0 |
| 418 | } |
| 419 | "#; |
| 420 | |
| 421 | let mut pipeline = CompilationPipeline::new(); |
| 422 | pipeline.set_write_artifacts(false); |
| 423 | let result = pipeline.compile(source); |
| 424 | assert!( |
| 425 | result.is_ok(), |
| 426 | "expected mixed boolean precedence to compile successfully: {:?}", |
| 427 | result.err() |
| 428 | ); |
| 429 | } |
| 430 | |
| 431 | #[test] |
| 432 | fn rejects_returning_address_of_local_variable() { |
nothing calls this directly
no test coverage detected