-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorstage1The process of building from source via WebAssembly and the C backend.The process of building from source via WebAssembly and the C backend.
Milestone
Description
const Struct = struct {field: u32};
fn func() !Struct {
return .{.field = 4};
}
pub fn main() !void {
const value = try func();
@import("std").debug.warn("{}\n", value.field);
}Semantic Analysis [670/690] /home/dbandstra/host/asdf.zig:3:14: error: type '@typeOf(func).ReturnType.ErrorSet!Struct' does not support struct initialization syntax
return .{.field = 4};
^
/home/dbandstra/host/asdf.zig:6:19: note: referenced here
const value = try func();
^
/home/dbandstra/zig/build/lib/zig/std/special/start.zig:242:40: note: referenced here
const result = root.main() catch |err| {
^
nektro, user673679, KenjiTakahashi and sigod
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorstage1The process of building from source via WebAssembly and the C backend.The process of building from source via WebAssembly and the C backend.