Skip to content
This repository was archived by the owner on Mar 3, 2022. It is now read-only.

Commit eb8912b

Browse files
author
Zack Field
committed
Recursively call store if src type is dbus.Variant
1 parent dc1f8d8 commit eb8912b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dbus.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,15 @@ func setDest(dest, src reflect.Value) error {
8787
}
8888
if isVariant(src.Type()) && !isVariant(dest.Type()) {
8989
src = getVariantValue(src)
90+
// not quite ready to directly convert,
91+
// since we're dealing with a variant value
92+
// which may have a complex type
93+
return store(dest, src)
9094
}
95+
9196
if !src.Type().ConvertibleTo(dest.Type()) {
9297
return fmt.Errorf(
93-
"dbus.Store: type mismatch: cannot convert %s to %s",
98+
"dbus.Store: base type mismatch: cannot convert %s to %s",
9499
src.Type(), dest.Type())
95100
}
96101
dest.Set(src.Convert(dest.Type()))

0 commit comments

Comments
 (0)