| 1 | fn foo() [:0]u8 { |
| 2 | const x: []u8 = undefined; |
| 3 | return x; |
| 4 | } |
| 5 | comptime { |
| 6 | _ = &foo; |
| 7 | } |
| 8 | |
| 9 | // error |
| 10 | // |
| 11 | // :3:12: error: expected type '[:0]u8', found '[]u8' |
| 12 | // :3:12: note: destination pointer requires '0' sentinel |
| 13 | // :1:10: note: function return type declared here |