You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2022/07/29 20:19:17 UTC
[beam] branch master updated: Improve concrete error message (#22536)
This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new e5e3cb25ca4 Improve concrete error message (#22536)
e5e3cb25ca4 is described below
commit e5e3cb25ca4fc2e31c10eb3dbda8289c6bfc7140
Author: Danny McCormick <da...@google.com>
AuthorDate: Fri Jul 29 16:19:10 2022 -0400
Improve concrete error message (#22536)
---
sdks/go/pkg/beam/validate.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sdks/go/pkg/beam/validate.go b/sdks/go/pkg/beam/validate.go
index 9987bfe5705..2bc00fd547d 100644
--- a/sdks/go/pkg/beam/validate.go
+++ b/sdks/go/pkg/beam/validate.go
@@ -71,8 +71,8 @@ func makeTypedefs(list []TypeDefinition) (map[string]reflect.Type, error) {
if !typex.IsUniversal(v.Var) {
return nil, errors.Errorf("type var %s must be a universal type", v.Var)
}
- if !typex.IsConcrete(v.T) {
- return nil, errors.Errorf("type value %s must be a concrete type", v.T)
+ if ok, err := typex.CheckConcrete(v.T); !ok {
+ return nil, errors.Wrapf(err, "type value %s must be a concrete type", v.T)
}
typedefs[v.Var.Name()] = v.T
}