diff options
author | Seo Sanghyeon <sanxiyn@gmail.com> | 2018-11-07 23:20:42 +0900 |
---|---|---|
committer | Seo Sanghyeon <sanxiyn@gmail.com> | 2018-11-07 23:20:42 +0900 |
commit | 1088671defd177ce0659ef96f1cf9dcd352d0c69 (patch) | |
tree | 9cdcce979a6709d3874a4a266c834f065bcd3f5f /src/codegen/mod.rs | |
parent | 1a2e2b365f1a5cb4982cbcde6b92742f6bccaa3b (diff) |
Use canonical path for type alias loop detection
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 983ee4dd..34b5b4d9 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -666,6 +666,7 @@ impl CodeGenerator for Type { .through_type_refs() .resolve(ctx); let name = item.canonical_name(ctx); + let path = item.canonical_path(ctx); { let through_type_aliases = inner.into_resolver() @@ -678,7 +679,7 @@ impl CodeGenerator for Type { // typedef struct foo { ... } foo; // // here, and also other more complex cases like #946. - if through_type_aliases.canonical_name(ctx) == name { + if through_type_aliases.canonical_path(ctx) == path { return; } } |