summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-10-30 10:18:07 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-10-30 10:21:48 +0100
commit0db2bd0c53c096f47569f07146e4890baa94d35a (patch)
tree031f4be01c733f447b8758fc02fbf066f84dd066 /src
parent8d045d2f20f004bcc813bcf6aa68b170b6aa9c77 (diff)
ir: Don't eagerly-resolve template alias declarations.
Fixes #1118
Diffstat (limited to 'src')
-rw-r--r--src/ir/ty.rs17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/ir/ty.rs b/src/ir/ty.rs
index bfb4c48e..9a51c2b3 100644
--- a/src/ir/ty.rs
+++ b/src/ir/ty.rs
@@ -925,18 +925,21 @@ impl Type {
CXCursor_TypeAliasDecl => {
let current = cur.cur_type();
- debug_assert!(current.kind() ==
- CXType_Typedef);
+ debug_assert_eq!(
+ current.kind(),
+ CXType_Typedef
+ );
name = current.spelling();
let inner_ty = cur.typedef_type()
.expect("Not valid Type?");
- inner =
- Item::from_ty(&inner_ty,
- cur,
- Some(potential_id),
- ctx);
+ inner = Ok(Item::from_ty_or_ref(
+ inner_ty,
+ cur,
+ Some(potential_id),
+ ctx,
+ ));
}
CXCursor_TemplateTypeParameter => {
let param =