From 9c7f101774fb27e5c13607646c622ff2946f22e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 31 Oct 2017 17:41:00 +0100 Subject: [PATCH] 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 --- src/ir/item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ir/item.rs b/src/ir/item.rs index d863d9077b..a92036398b 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(