Support type aliases

This commit is contained in:
Thomas Pelletier
2021-03-08 20:27:04 -05:00
parent c35bcc5519
commit 90f3b658c6
+4
View File
@@ -467,6 +467,10 @@ func convert(t reflect.Type, value reflect.Value) (reflect.Value, error) {
returnPtr = true
}
if t.Kind() == value.Kind() {
return value.Convert(t), nil
}
var err error
switch t.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: