summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-10-31 17:41:00 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-10-31 18:56:16 +0100
commit9c7f101774fb27e5c13607646c622ff2946f22e1 (patch)
treeadb63265822afa6e01fe356a7b79a18ab8164d1f
parent3d623d3403f421f477182209a43aa39a54aebb20 (diff)
ir: We can't guarantee the type to be in the item map while propagating AlreadyResolved.
The item may come from a recursive check down the stack, and as we say there: > Unchecked because we haven't finished this type yet. Fixes #1127
-rw-r--r--src/ir/item.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir/item.rs b/src/ir/item.rs
index d863d907..a9203639 100644
--- a/src/ir/item.rs
+++ b/src/ir/item.rs
@@ -1512,7 +1512,7 @@ impl ClangItemParser for Item {
let result = Type::from_clang_ty(id, ty, location, parent_id, ctx);
let relevant_parent_id = parent_id.unwrap_or(current_module);
let ret = match result {
- Ok(ParseResult::AlreadyResolved(ty)) => Ok(ty.expect_type_id(ctx)),
+ Ok(ParseResult::AlreadyResolved(ty)) => Ok(ty.as_type_id_unchecked()),
Ok(ParseResult::New(item, declaration)) => {
ctx.add_item(
Item::new(