Merge 77666f63094070aadb419440b7121155a879cf50 into 5663048f137b961f9b1bac6a10227096aa36b0bf

This commit is contained in:
İlker Göktuğ 2015-07-17 12:58:24 +00:00
commit 0b010c1f8a

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(reflect.Indirect(reflect.New(reflect.SliceOf(destType))).Type(), 0, 0))
}
if destType.Kind() == reflect.Ptr { if destType.Kind() == reflect.Ptr {
isPtr = true isPtr = true