Sema: add error for non-comptime param in comptime func
Adds error for taking a non comptime parameter in a function returning a comptime-only type but not when that type is dependent on a parameter. Co-authored-by: Veikka Tuominen <git@vexu.eu>
This commit is contained in:
committed by
Veikka Tuominen
parent
da95da438e
commit
ae8d26a6a0
@@ -7,7 +7,7 @@ const meta = std.meta;
|
||||
const math = std.math;
|
||||
|
||||
/// Creates a stream which allows for reading bit fields from another stream
|
||||
pub fn BitReader(endian: std.builtin.Endian, comptime ReaderType: type) type {
|
||||
pub fn BitReader(comptime endian: std.builtin.Endian, comptime ReaderType: type) type {
|
||||
return struct {
|
||||
forward_reader: ReaderType,
|
||||
bit_buffer: u7,
|
||||
|
||||
Reference in New Issue
Block a user