diff --git a/releasenotes.md b/releasenotes.md index 9be7e2de8..2752ac3d9 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -6,7 +6,7 @@ - None yet. ### Fixes -- None yet. +- Fix issue requiring prefix on a generic interface declaration. ### Stdlib changes - Added '%h' and '%H' for printing out binary data in hexadecimal using the formatter. diff --git a/src/compiler/compiler_internal.h b/src/compiler/compiler_internal.h index 598f7865a..258bf95f9 100644 --- a/src/compiler/compiler_internal.h +++ b/src/compiler/compiler_internal.h @@ -3214,7 +3214,9 @@ INLINE bool decl_is_user_defined_type(Decl *decl) { DeclKind kind = decl->decl_kind; return (kind == DECL_UNION) | (kind == DECL_STRUCT) | (kind == DECL_BITSTRUCT) - | (kind == DECL_ENUM) | (kind == DECL_TYPEDEF) || (kind == DECL_DISTINCT); + | (kind == DECL_ENUM) | (kind == DECL_TYPEDEF) | (kind == DECL_DISTINCT) + | (kind == DECL_INTERFACE) + ; } INLINE Decl *decl_flatten(Decl *decl) diff --git a/test/test_suite/any/generic_interface.c3 b/test/test_suite/any/generic_interface.c3 new file mode 100644 index 000000000..6bd257af5 --- /dev/null +++ b/test/test_suite/any/generic_interface.c3 @@ -0,0 +1,12 @@ +module foo(); + +interface Baz +{} + +module test; +import foo; + +fn void main() +{ + Baz() x; +}