compiler: implement @FieldType

Resolves: #21702
This commit is contained in:
mlugg
2024-10-17 10:19:14 +01:00
committed by Matthew Lugg
parent fffbb511db
commit 097766bba3
7 changed files with 103 additions and 1 deletions

View File

@@ -4879,6 +4879,13 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
</p>
{#header_close#}
{#header_open|@FieldType#}
<pre>{#syntax#}@FieldType(comptime Type: type, comptime field_name: []const u8) type{#endsyntax#}</pre>
<p>
Given a type and the name of one of its fields, returns the type of that field.
</p>
{#header_close#}
{#header_open|@floatCast#}
<pre>{#syntax#}@floatCast(value: anytype) anytype{#endsyntax#}</pre>
<p>