Merge pull request #226 from S0urc3C0de/master

Update to latest zig.
This commit is contained in:
Alexandros Naskos 2021-01-28 11:11:42 +02:00 committed by GitHub
commit 004c935c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,7 +199,7 @@ pub fn getDeclNameToken(tree: *ast.Tree, node: *ast.Node) ?ast.TokenIndex {
},
.TestDecl => {
const decl = node.castTag(.TestDecl).?;
return (decl.name.castTag(.StringLiteral) orelse return null).token;
return ((decl.name orelse return null).castTag(.StringLiteral) orelse return null).token;
},
else => {},
}