diff --git a/src/AST/TypeExtensions.cs b/src/AST/TypeExtensions.cs index 1b4d7bc6..7570dc45 100644 --- a/src/AST/TypeExtensions.cs +++ b/src/AST/TypeExtensions.cs @@ -114,7 +114,7 @@ public static bool IsTagDecl(this Type t, out T decl) where T : Declaration { - var tag = t as TagType; + var tag = t.Desugar() as TagType; if (tag == null) { diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h index 490d7072..01860bf0 100644 --- a/tests/Basic/Basic.h +++ b/tests/Basic/Basic.h @@ -302,3 +302,13 @@ struct EmptyNamedNestedEnum { enum { Value = 10 }; }; + + +typedef struct SomeStruct +{ +} +SomeStruct; + +class SomeClassExtendingTheStruct : public SomeStruct +{ +}; \ No newline at end of file