mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: do not allow aliases of chan
types (#6294)
This commit is contained in:
parent
cc714ca5cc
commit
b8617ace53
@ -269,6 +269,8 @@ pub fn (mut c Checker) type_decl(node ast.TypeDecl) {
|
||||
orig_sym := c.table.get_type_symbol((typ_sym.info as table.Alias).parent_type)
|
||||
c.error('type `$typ_sym.str()` is an alias, use the original alias type `$orig_sym.source_name` instead',
|
||||
node.pos)
|
||||
} else if typ_sym.kind == .chan {
|
||||
c.error('aliases of `chan` types are not allowed.', node.pos)
|
||||
}
|
||||
}
|
||||
ast.FnTypeDecl {
|
||||
|
Loading…
Reference in New Issue
Block a user