diff options
| author | Graydon Hoare <[email protected]> | 2011-02-14 14:14:28 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-02-14 14:14:28 -0800 |
| commit | 6393a34e6e4cfc7638d698353659643e63549532 (patch) | |
| tree | 5ccc4f3932a54b4517b6a7ccc11721035a76caa2 /src | |
| parent | Teach resolve about ty params on tags. (diff) | |
| download | rust-6393a34e6e4cfc7638d698353659643e63549532.tar.xz rust-6393a34e6e4cfc7638d698353659643e63549532.zip | |
Teach typeck about generic tags.
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp/middle/typeck.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 97453436..748dd879 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -1253,7 +1253,8 @@ fn check_expr(&@fn_ctxt fcx, @ast.expr expr) -> @ast.expr { } case (ast.def_variant(_, ?variant_id)) { check (fcx.ccx.item_types.contains_key(variant_id)); - t = fcx.ccx.item_types.get(variant_id); + t = generalize_ty(fcx.ccx, + fcx.ccx.item_types.get(variant_id)); } case (ast.def_binding(?id)) { check (fcx.locals.contains_key(id)); |