rust/src/test/run-pass/issue-2502.rs
Tim Chevalier f4fb0f9eea Handle regions correctly in class ctors and dtors
Class ctors and dtors were always getting assigned the empty region
before, which meant a reference to the "self" region in a ctor argument
got resolved to a named region called "self" rather than the class's
self region, which led to a rather confusing error message as documented
in #2502.

Closes #2502
2012-06-06 19:23:26 -07:00

14 lines
188 B
Rust

class font/& {
let fontbuf: &self.[u8];
new(fontbuf: &self.[u8]) {
self.fontbuf = fontbuf;
}
fn buf() -> &self.[u8] {
self.fontbuf
}
}
fn main() { }