Fix parse error in constrained-type-missing-check.rs
This commit is contained in:
parent
f70a894855
commit
15d33f7957
|
@ -4,7 +4,7 @@
|
|||
|
||||
pure fn less_than(x: int, y: int) -> bool { ret x < y; }
|
||||
|
||||
type ordered_range = {low: int, high: int} : less_than(low, high);
|
||||
type ordered_range = {low: int, high: int} : less_than(*.low, *.high);
|
||||
|
||||
fn main() {
|
||||
// Should fail to compile, b/c we're not doing the check
|
||||
|
@ -13,4 +13,4 @@ fn main() {
|
|||
let b: int = 2;
|
||||
let c: ordered_range = {low: a, high: b};
|
||||
log c.low;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue