Skip to content

Instantly share code, notes, and snippets.

@jld
Created February 24, 2013 06:49
Show Gist options
  • Select an option

  • Save jld/5022917 to your computer and use it in GitHub Desktop.

Select an option

Save jld/5022917 to your computer and use it in GitHub Desktop.
Test case for a compiler bug I introduced locally. Order of evaluation is important in affine-land.
struct S { f0: ~str, f1: int }
pub fn main() {
let s = ~"Hello, world!";
let _s = S { f0: str::from_slice(s), ..S { f0: s, f1: 23 } };
io::println(_s.f0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment