Fix configuration.getConfigurationType returning non null values (#1220)

The function would change the `Config` struct fields' type to optional but keep a non null value which led to `Server.didChangeConfigurationHandler` assigning wrong values to `server.config`.
This commit is contained in:
nullptrdevs 2023-06-02 13:46:29 -07:00 committed by GitHub
parent f96b226b4d
commit 0afc1c3b21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,6 +226,7 @@ fn getConfigurationType() type {
.Optional = .{ .child = field.type },
});
}
new_field.default_value = &@as(new_field.type, null);
}
config_info.Struct.fields = fields[0..];
config_info.Struct.decls = &.{};