WIP: comptime experiments
This commit is contained in:
parent
7417f01d5d
commit
b68855fc2d
10 changed files with 57 additions and 15 deletions
|
|
@ -35,7 +35,7 @@ pub fn main() void {
|
|||
// In this contrived example, we've decided to allocate some
|
||||
// arrays using a variable count! But something's missing...
|
||||
//
|
||||
var count = 0;
|
||||
comptime var count = 0;
|
||||
|
||||
count += 1;
|
||||
var a1: [count]u8 = .{'A'} ** count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue