checker: bring back pascal case check for aliases

This commit is contained in:
Alexander Medvednikov 2023-10-14 22:55:19 +03:00
parent 82a3e67d3f
commit 6f79eecce0
2 changed files with 4 additions and 5 deletions

View File

@ -227,7 +227,7 @@ fn C.sysctl(name &int, namelen u32, oldp voidptr, oldlenp voidptr, newp voidptr,
[trusted] [trusted]
fn C._fileno(int) int fn C._fileno(int) int
struct C.intptr_t {} type C.intptr_t = voidptr
fn C._get_osfhandle(fd int) C.intptr_t fn C._get_osfhandle(fd int) C.intptr_t

View File

@ -499,10 +499,9 @@ fn (mut c Checker) type_decl(node ast.TypeDecl) {
} }
fn (mut c Checker) alias_type_decl(node ast.AliasTypeDecl) { fn (mut c Checker) alias_type_decl(node ast.AliasTypeDecl) {
// TODO Remove when `u8` isn't an alias in builtin anymore if c.file.mod.name != 'builtin' && c.file.mod.name != 'time' {
// if c.file.mod.name != 'builtin' { c.check_valid_pascal_case(node.name, 'type alias', node.pos)
// c.check_valid_pascal_case(node.name, 'type alias', node.pos) }
//}
if !c.ensure_type_exists(node.parent_type, node.type_pos) { if !c.ensure_type_exists(node.parent_type, node.type_pos) {
return return
} }