Merge bcd5600f397ddeafe6b23252cab6f8e463268fda into 3f18890ca41321fe5a7ffc87337ff67ffbf21574

This commit is contained in:
İlker Göktuğ 2015-08-01 00:55:37 +00:00
commit 8bf7bb9857

View File

@ -30,7 +30,9 @@ func Query(scope *Scope) {
if kind := dest.Kind(); kind == reflect.Slice { if kind := dest.Kind(); kind == reflect.Slice {
isSlice = true isSlice = true
destType = dest.Type().Elem() destType = dest.Type().Elem()
dest.Set(reflect.Indirect(reflect.New(reflect.SliceOf(destType)))) if !dest.IsNil() {
dest.Set(reflect.MakeSlice(dest.Type(), 0, 0))
}
if destType.Kind() == reflect.Ptr { if destType.Kind() == reflect.Ptr {
isPtr = true isPtr = true