Skip to content

Comptime is not required for arguments of comptime only types after first generic argument #5709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexnask opened this issue Jun 25, 2020 · 3 comments
Labels
bug Observed behavior contradicts documented or intended behavior stage1 The process of building from source via WebAssembly and the C backend.
Milestone

Comments

@alexnask
Copy link
Contributor

Example

fn Matrix(
    comptime T: type,
    width: comptime_int,
    height: comptime_int,
) type {
    return [height][width]T;
}

width and heigth should be checked and require comptime even if they are actually type erased.

@Vexu Vexu added bug Observed behavior contradicts documented or intended behavior stage1 The process of building from source via WebAssembly and the C backend. labels Jun 25, 2020
@Vexu Vexu added this to the 0.7.0 milestone Jun 25, 2020
@cristobal-montecino
Copy link

See also #5672

@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Aug 13, 2020
@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 Nov 6, 2020
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
@Vexu
Copy link
Member

Vexu commented Jan 19, 2023

Fixed in self-hosted, tested in test/cases/compile_errors/comptime_parameter_not_declared_as_such.zig.

@Vexu Vexu closed this as completed Jan 19, 2023
@Vexu
Copy link
Member

Vexu commented Jan 19, 2023

Fixed in self-hosted, tested in test/cases/compile_errors/comptime_parameter_not_declared_as_such.zig.

@Vexu Vexu closed this as completed Jan 19, 2023
@andrewrk andrewrk modified the milestones: 0.13.0, 0.11.0 Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior stage1 The process of building from source via WebAssembly and the C backend.
Projects
None yet
Development

No branches or pull requests

4 participants