added test against const lookup

This commit is contained in:
llogiq 2015-09-05 16:24:41 +02:00
parent b66bccc45a
commit 79bf820170

View file

@ -5,6 +5,8 @@
use std::cmp::{min, max};
const LARGE : usize = 3;
fn main() {
let x;
x = 2usize;
@ -15,6 +17,8 @@ fn main() {
min(3, max(1, x)); // ok, could be 1, 2 or 3 depending on x
min(1, max(LARGE, x)); // no error, we don't lookup consts here
let s;
s = "Hello";