-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Closed
Labels
A-type-systemArea: Type systemArea: Type system
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.
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type system