-
-
Notifications
You must be signed in to change notification settings - Fork 410
Open
Labels
bugSomething isn't workingSomething isn't working
Description
For example, the following code:
const std = @import("std");
pub fn foo() void {
std.debug.print("Hello World!", .{});
}
pub fn main() !void {
const p = &foo;
const T = @Type(.{ .@"struct" = .{
.fields = &.{
std.builtin.Type.StructField{
.name = "foo",
.is_comptime = false,
.type = *const @TypeOf(foo),
.alignment = 4,
.default_value_ptr = @ptrCast(&p),
},
},
.decls = &.{},
.is_tuple = false,
.layout = .auto,
} });
const a = T{};
a.foo();
}The effect in VSCode is as follows:
The instances of type T and T generated during compilation in the code have no type hints and code completion.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working