Skip to content

Commit ddbc884

Browse files
committed
---
yaml --- r: 5046 b: refs/heads/master c: d37e8cf h: refs/heads/master v: v3
1 parent 95af617 commit ddbc884

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 2e53da5126b970b394205256446c36a585e0f35e
2+
refs/heads/master: d37e8cfc6723f0f2dbefdb686a7e220062c1374c
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Tests that the typechecker checks constraints
2+
// error-pattern:mismatched types: expected uint but found u8
3+
use std;
4+
import std::uint;
5+
6+
fn enum_chars(start:u8, end:u8) : uint::le(start, end) -> [char] {
7+
let i = start;
8+
let r = [];
9+
while (i <= end) {
10+
r += [i as char];
11+
i += (1u as u8);
12+
}
13+
ret r;
14+
}
15+
16+
fn main() {
17+
log (enum_chars('a' as u8, 'z' as u8));
18+
}

0 commit comments

Comments
 (0)