Skip to content

Commit 2989d07

Browse files
committed
Adds missing return, updates test case
1 parent aeade42 commit 2989d07

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Sema/LowerZon.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn lowerExprAnonResTy(self: *LowerZon, node: Zoir.Node.Index) CompileError!Inter
104104
const result = try self.sema.addStrLit(ip_str, val.len);
105105
return result.toInterned().?;
106106
},
107-
.empty_literal => .empty_tuple,
107+
.empty_literal => return .empty_tuple,
108108
.array_literal => |nodes| {
109109
const types = try self.sema.arena.alloc(InternPool.Index, nodes.len);
110110
const values = try self.sema.arena.alloc(InternPool.Index, nodes.len);

test/cases/compile_errors/@import_zon_anon_nan.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ export fn entry() void {
55
// error
66
// imports=zon/nan.zon
77
//
8-
// nan.zon:1:1: error: nan requires a known result type
8+
// nan.zon:1:1: error: NaN requires a known result type
99
// tmp.zig:2:17: note: imported here

0 commit comments

Comments
 (0)