Fix method parameter attribute name
This commit is contained in:
parent
a47405e903
commit
76c436714f
1 changed files with 7 additions and 5 deletions
|
|
@ -2289,13 +2289,15 @@ pub const MethodParameters = struct {
|
|||
try w.print("flags: {f}\n", .{ self.access_flags });
|
||||
|
||||
const name_ = self.name(constant_pool) catch return error.WriteFailed;
|
||||
try w.splatByteAll(' ', depth * indent);
|
||||
_ = try w.write("name:\n");
|
||||
try name_.indentedFormat(w, depth, indent + 1, constant_pool);
|
||||
if (name_) |n| {
|
||||
try w.splatByteAll(' ', depth * indent);
|
||||
_ = try w.write("name:\n");
|
||||
try n.indentedFormat(w, depth, indent + 1, constant_pool);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn name(self: *const Parameter, constant_pool: ConstantPool) ResolveError!ConstantPool.Info {
|
||||
return constant_pool.getTag(self.name_index, .utf8);
|
||||
pub fn name(self: *const Parameter, constant_pool: ConstantPool) ResolveError!?ConstantPool.Info {
|
||||
return constant_pool.getTagOptional(self.name_index, .utf8);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue