aboutsummaryrefslogtreecommitdiff
path: root/lib/std/elf.zig
diff options
context:
space:
mode:
authorantlilja <liljaanton2001@gmail.com>2022-08-06 22:32:00 +0200
committerVeikka Tuominen <git@vexu.eu>2022-08-27 11:17:48 +0300
commitae8d26a6a00a528bdf555689c2a93cb35a3287f2 (patch)
treed72b651523e62b81d0b1733cf2f1a4eced7265db /lib/std/elf.zig
parentda95da438ed5c934a9f42811651f5ffa524e48a8 (diff)
downloadzig-ae8d26a6a00a528bdf555689c2a93cb35a3287f2.tar.gz
zig-ae8d26a6a00a528bdf555689c2a93cb35a3287f2.zip
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>
Diffstat (limited to 'lib/std/elf.zig')
-rw-r--r--lib/std/elf.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/elf.zig b/lib/std/elf.zig
index cc43e11a7d..4a9b7a498f 100644
--- a/lib/std/elf.zig
+++ b/lib/std/elf.zig
@@ -406,7 +406,7 @@ pub const Header = struct {
}
};
-pub fn ProgramHeaderIterator(ParseSource: anytype) type {
+pub fn ProgramHeaderIterator(comptime ParseSource: anytype) type {
return struct {
elf_header: Header,
parse_source: ParseSource,
@@ -456,7 +456,7 @@ pub fn ProgramHeaderIterator(ParseSource: anytype) type {
};
}
-pub fn SectionHeaderIterator(ParseSource: anytype) type {
+pub fn SectionHeaderIterator(comptime ParseSource: anytype) type {
return struct {
elf_header: Header,
parse_source: ParseSource,