Skip to content

Commit

Permalink
Rewrite it in a different way
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Aug 1, 2024
1 parent ae5e7da commit 6f44f4d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test_programs/compile_success_empty/comptime_type/src/main.nr
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use std::meta::type_of;

fn main() {
// Check type_of works correctly (relies on Eq for Type)
let _ = comptime {
comptime
{
// Check type_of works correctly (relies on Eq for Type)
let a_field = 0;
let another_field = 1;
let an_i32: i32 = 0;
Expand All @@ -11,5 +12,5 @@ fn main() {
let i32_type = type_of(an_i32);
assert(field_type_1 == field_type_2);
assert(field_type_1 != i32_type);
};
}
}

0 comments on commit 6f44f4d

Please sign in to comment.