Closed
Description
This code:
use std;
import std::option;
fn bad() {
let @option::t[int] rz = foo[uint]();
}
fn foo[ZZZ]() -> @option::t[ZZZ] {
fail;
}
fails with a type error:
error: mismatched types: expected @option::t[int] but found @option::t[ZZZ] (types differ)
This is a bad error message because it refers to a line inside bad() -- in this scope, ZZZ is meaningless. The error should say uint instead of ZZZ.