Skip to content

v2026.4 regression: using of sizeof() operator in static const definition leads to compiler crash #10445

@kachkov98

Description

@kachkov98

Issue Description

After updating slangc from 2026.3.1 to 2026.4 the code with sizeof() in static const defintion doesn't compile anymore.

Reproducer Code

test.slang:

typedef uint MsgTy;
static const uint msgLen = sizeof(MsgTy);

old behavior:

> slangc.exe -v
2026.3.1
> slangc.exe test.slang -o test.slang-module -lang slang -std 2026
# builds successfully

new behavior:

> slangc.exe -v
2026.4
> slangc.exe test.slang -o test.slang-module -lang slang -std 2026
# test.slang-module is not produced, returned exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions