Skip to content

implicit block values as function bodies don't actually get returned #372

Closed
@paulstansifer

Description

@paulstansifer
fn f() -> int { auto x = { 3 }; x }

fn main() -> int { 

  log_err f();
  ret 1; 
}

This prints 0, instead of 3 (though it's probably a garbage value).

(the wacky definition of f is because of a parser problem)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions