diff options
author | John Hodge <tpg@mutabah.net> | 2016-07-07 05:04:36 +1000 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-07-07 05:04:36 +1000 |
commit | dc7371626369717e3347887a21b69ccb2c338af5 (patch) | |
tree | a9cf8abbefba55f895bf532b081c1354a6de5530 | |
parent | ae5df84479553a3bb0dff7c0ebc85eb4305bd298 (diff) | |
download | mrust-dc7371626369717e3347887a21b69ccb2c338af5.tar.gz |
HIR Typecheck CS - Closures don't coerce yet
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index 79a4e8e6..47b2a214 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -2327,7 +2327,11 @@ namespace { TODO(sp, "check_coerce - Coercion from " << ty_r); ), (Closure, - TODO(sp, "check_coerce - Coercion from " << ty_r); + // TODO: Can closures coerce to anything? + // - (eventually maybe fn() if they don't capture, but that's not rustc yet) + context.equate_types(sp, ty, node_ptr->m_res_type); + return true; + //TODO(sp, "check_coerce - Coercion from " << ty_r << " to " << ty); ) ) |