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
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user