Skip to content

Add scalar and vector constructors from abstract numeric types #2719

@dneto0

Description

@dneto0

Raised by @jrprice

Consider:

  var a: array<i32, u32(4000000000)>;

The programmer is trying to make a u32 without using a suffix. But under current rules the 4000000000 default-converts to i32 which errors out because it's out of bounds.

So the proposal is to add scalar and vector constructors from abstract numeric argument types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wgslWebGPU Shading Language Issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions