Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkl/decode_struct.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
// Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -339,6 +339,8 @@ func getStructFields(typ reflect.Type) map[string]structField {
for k, v := range getStructFields(field.Type) {
ret[k] = v
}
default:
panic("pkl: getStructFields: unhandled field kind")
}
} else {
opts := parseStructOpts(&field)
Expand Down Expand Up @@ -374,6 +376,8 @@ func (d *decoder) getOutputValue(typ reflect.Type) (*reflect.Value, error) {
{
fieldValue = reflect.New(field.Type).Elem()
}
default:
panic("pkl: getOutputValue: unhandled field kind")
}
ret.FieldByName(field.Name).Set(fieldValue)
}
Expand Down
Loading