2012-06-22 15:11:29 -05:00
|
|
|
class no0 {
|
2012-06-24 17:09:57 -05:00
|
|
|
let x: &uint; //! ERROR to use region types here, the containing type must be declared with a region bound
|
2012-06-22 15:11:29 -05:00
|
|
|
new(x: &uint) { self.x = x; } //! ERROR to use region types here, the containing type must be declared with a region bound
|
|
|
|
drop {}
|
2012-04-18 23:26:25 -05:00
|
|
|
}
|
|
|
|
|
2012-06-22 15:11:29 -05:00
|
|
|
class no1 {
|
2012-06-24 17:09:57 -05:00
|
|
|
let x: &self.uint; //! ERROR to use region types here, the containing type must be declared with a region bound
|
2012-06-22 15:11:29 -05:00
|
|
|
new(x: &self.uint) { self.x = x; } //! ERROR to use region types here, the containing type must be declared with a region bound
|
|
|
|
drop {}
|
2012-04-18 23:26:25 -05:00
|
|
|
}
|
|
|
|
|
2012-06-22 15:11:29 -05:00
|
|
|
class no2 {
|
2012-06-24 17:09:57 -05:00
|
|
|
let x: &foo.uint; //! ERROR named regions other than `self` are not allowed as part of a type declaration
|
2012-06-22 15:11:29 -05:00
|
|
|
new(x: &foo.uint) { self.x = x; } //! ERROR named regions other than `self` are not allowed as part of a type declaration
|
|
|
|
drop {}
|
2012-04-18 23:26:25 -05:00
|
|
|
}
|
|
|
|
|
2012-06-22 15:11:29 -05:00
|
|
|
class yes0/& {
|
|
|
|
let x: &uint;
|
|
|
|
new(x: &uint) { self.x = x; }
|
|
|
|
drop {}
|
2012-04-18 23:26:25 -05:00
|
|
|
}
|
|
|
|
|
2012-06-22 15:11:29 -05:00
|
|
|
class yes1/& {
|
|
|
|
let x: &self.uint;
|
|
|
|
new(x: &self.uint) { self.x = x; }
|
|
|
|
drop {}
|
2012-04-18 23:26:25 -05:00
|
|
|
}
|
|
|
|
|
2012-06-22 15:11:29 -05:00
|
|
|
class yes2/& {
|
2012-06-24 17:09:57 -05:00
|
|
|
let x: &foo.uint; //! ERROR named regions other than `self` are not allowed as part of a type declaration
|
2012-06-22 15:11:29 -05:00
|
|
|
new(x: &foo.uint) { self.x = x; } //! ERROR named regions other than `self` are not allowed as part of a type declaration
|
|
|
|
drop {}
|
2012-04-18 23:26:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|