Skip to content

Commit

Permalink
Remove unreachable code
Browse files Browse the repository at this point in the history
This makes gocode pass go vet ./...
  • Loading branch information
ryboe committed Dec 17, 2017
1 parent 0444ce1 commit e4cc1d2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion autocompletecontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ func check_type_expr(e ast.Expr) bool {
default:
return true
}
return true
}

//-------------------------------------------------------------------------
Expand Down
4 changes: 1 addition & 3 deletions cursorcontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ type token_item struct {
func (i token_item) literal() string {
if i.tok.IsLiteral() {
return i.lit
} else {
return i.tok.String()
}
return ""
return i.tok.String()
}

func new_token_iterator(src []byte, cursor int) token_iterator {
Expand Down
1 change: 0 additions & 1 deletion decl.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ func ast_decl_type(d ast.Decl) ast.Expr {
return t.Type
}
panic("unreachable")
return nil
}

func ast_decl_flags(d ast.Decl) decl_flags {
Expand Down

0 comments on commit e4cc1d2

Please sign in to comment.