diff options
author | John Hodge <tpg@mutabah.net> | 2016-06-04 11:45:48 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-06-04 11:45:48 +0800 |
commit | ef9d2edb3752a19b827240e91ef3fea7bc354586 (patch) | |
tree | e3f7a0f2a67a31d58d00c54c5c0bf71ec88d5bc9 /src | |
parent | f9e94f5e907af0ce205a6b04deb5b0d35a4e1bc4 (diff) | |
download | mrust-ef9d2edb3752a19b827240e91ef3fea7bc354586.tar.gz |
HIR Typeck - Notes on coercions
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/expr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hir_typeck/expr.cpp b/src/hir_typeck/expr.cpp index cd1ceccb..b043aaa2 100644 --- a/src/hir_typeck/expr.cpp +++ b/src/hir_typeck/expr.cpp @@ -736,6 +736,8 @@ namespace { ) } // Adds a rule that two types must be equal + // - NOTE: The ordering does matter, as the righthand side will get unsizing/deref coercions applied if possible + // TODO: Support coercions void apply_equality(const Span& sp, const ::HIR::TypeRef& left, const ::HIR::TypeRef& right) { TRACE_FUNCTION_F(left << ", " << right); @@ -848,6 +850,7 @@ namespace { // TODO: This could be allowed (using coercions) ERROR(sp, E0000, "Type mismatch between " << l_t << " and " << r_t << " - Borrow classes differ"); } + // TODO: Support coercions (have to be done here)? this->apply_equality(sp, *l_e.inner, *r_e.inner); ), (Pointer, |