()
| 153 | } |
| 154 | |
| 155 | func (api *API) checkTypeStmt() error { |
| 156 | f := newFilter() |
| 157 | b := f.addCheckItem(api.Filename, "type expression") |
| 158 | for _, v := range api.TypeStmt { |
| 159 | switch val := v.(type) { |
| 160 | case *ast.TypeLiteralStmt: |
| 161 | b.check(val.Expr.Name) |
| 162 | case *ast.TypeGroupStmt: |
| 163 | for _, expr := range val.ExprList { |
| 164 | b.check(expr.Name) |
| 165 | } |
| 166 | } |
| 167 | } |
| 168 | return f.error() |
| 169 | } |
| 170 | |
| 171 | func (api *API) checkTypeDeclareContext() error { |
| 172 | var typeMap = map[string]placeholder.Type{} |
no test coverage detected