| ... | ... | @@ -7137,7 +7137,7 @@ fn func() void { |
| 7137 | 7137 | {#header_close#} |
| 7138 | 7138 | |
| 7139 | 7139 | {#header_open|@hasDecl#} |
| 7140 | | <pre>{#syntax#}@hasDecl(comptime container: type, comptime name: []const u8) bool{#endsyntax#}</pre> |
| 7140 | <pre>{#syntax#}@hasDecl(comptime Container: type, comptime name: []const u8) bool{#endsyntax#}</pre> |
| 7141 | 7141 | <p> |
| 7142 | 7142 | Returns whether or not a {#link|struct#}, {#link|enum#}, or {#link|union#} has a declaration |
| 7143 | 7143 | matching {#syntax#}name{#endsyntax#}. |
| ... | ... | @@ -7170,7 +7170,7 @@ test "@hasDecl" { |
| 7170 | 7170 | {#header_close#} |
| 7171 | 7171 | |
| 7172 | 7172 | {#header_open|@hasField#} |
| 7173 | | <pre>{#syntax#}@hasField(comptime T: type, comptime name: []const u8) bool{#endsyntax#}</pre> |
| 7173 | <pre>{#syntax#}@hasField(comptime Container: type, comptime name: []const u8) bool{#endsyntax#}</pre> |
| 7174 | 7174 | <p>Returns whether the field name of a struct, union, or enum exists.</p> |
| 7175 | 7175 | <p> |
| 7176 | 7176 | The result is a compile time constant. |