aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/obj-with-vec.rs
blob: 85143c7924dd60077e123dc9c72f3a29361f6f2f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
fn main() {

  obj buf(vec[u8] data) {
    fn get(int i) -> u8 {
      ret data.(i);
    }
  }
  auto b = buf(vec(1 as u8, 2 as u8, 3 as u8));
  log b.get(1);
  check (b.get(1) == (2 as u8));
}