Add types::is_indexable.

This commit is contained in:
Christoffer Lerno
2022-09-20 18:45:43 +02:00
parent 321c713687
commit 48ee567f81

View File

@@ -97,6 +97,11 @@ fn bool TypeKind.is_int(TypeKind kind) @inline
return kind == TypeKind.SIGNED_INT || kind == TypeKind.UNSIGNED_INT;
}
macro bool is_indexable($Type)
{
return $checks($Type t, int i, t[i]);
}
macro bool is_comparable($Type)
{
var $kind = $Type.kind;