Fix issue requiring prefix on a generic interface declaration.

This commit is contained in:
Christoffer Lerno
2025-01-16 22:09:53 +01:00
parent 721aaa28aa
commit 3e4d1de70e
3 changed files with 16 additions and 2 deletions

View File

@@ -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.

View File

@@ -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)

View File

@@ -0,0 +1,12 @@
module foo(<Type>);
interface Baz
{}
module test;
import foo;
fn void main()
{
Baz(<int>) x;
}