// Type alias resolution through `size_of` / `align_of` — a const-decl
// alias (`MyInt :: s32;`, `MyChain :: MyInt;`, `WideAlias :: Wide;`)
// resolves through `type_alias_map` when used as a `$T: Type` argument.
// Covers chains and struct-name aliases, not just structural-type
// aliases (those land in `examples/182-compound-type-in-expression.sx`).
#import "modules/std.sx";

MyInt   :: s32;
MyChain :: MyInt;
Wide    :: struct { a: s64; b: s64; }
WideAlias :: Wide;

main :: () -> s32 {
    print("direct s32:        {}\n", size_of(s32));
    print("alias s32:         {}\n", size_of(MyInt));
    print("chain s32:         {}\n", size_of(MyChain));
    print("align alias:       {}\n", align_of(MyInt));
    print("align chain:       {}\n", align_of(MyChain));
    print("size struct-alias: {}\n", size_of(WideAlias));
    print("align struct-alias:{}\n", align_of(WideAlias));
    0;
}
