autogold icon indicating copy to clipboard operation
autogold copied to clipboard

valast: remove redundant type

Open rizalgowandy opened this issue 5 years ago • 1 comments

Description

One of the built-in Goland linter gives warning about the redundant type. It would be nice if the generated result doesn't contain redundant fields. Help the code become cleaner.

Problem

Redundant type 
 Inspection info: Reports redundant types in composite literals.
For example:
    [][]int{[]int{1}, []int{2}}
can be simplified to:
    [][]int {{1}, {2}}
.

Example in Goland

The grey-out fields are redundant types. Screenshot_2021-01-31_17-57-23

rizalgowandy avatar Jan 31 '21 11:01 rizalgowandy

Totally agree, and plan to look into fixing this soon. Thanks for reporting!

emidoots avatar Feb 18 '21 08:02 emidoots