initial docs for `@as`

master
Andrew Kelley 2019-11-07 19:05:52 -05:00
parent aa0daea541
commit aef04aff0c
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 8 additions and 0 deletions

View File

@ -6445,6 +6445,14 @@ comptime {
</p>
{#header_close#}
{#header_open|@as#}
<pre>{#syntax#}@as(comptime T: type, expression) T{#endsyntax#}</pre>
<p>
Performs {#link|Type Coercion#}. This cast is allowed when the conversion is unambiguous and safe,
and is the preferred way to convert between types, whenever possible.
</p>
{#header_close#}
{#header_open|@asyncCall#}
<pre>{#syntax#}@asyncCall(frame_buffer: []align(@alignOf(@Frame(anyAsyncFunction))) u8, result_ptr, function_ptr, args: ...) anyframe->T{#endsyntax#}</pre>
<p>