Skip to content

cmd/vet: warn of cyclic closures that cause Finalizers not to run #7546

Description

@emidoots
What does 'go version' print?
go version devel +08dcdcdb757b Thu Mar 13 14:04:29 2014 -0700 linux/amd64

What steps reproduce the problem?
1. http://play.golang.org/p/QWn904819Y

What happened?
A tricky case with Finalizers and closures can be created where the Finalizer will not
run due to the cyclic structure created (not a bug). Go vet does not complain about suck
tricky cases which could be useful.

What should have happened instead?
Go vet should warn of such tricky cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AnalysisIssues related to static analysis (vet, x/tools/go/analysis)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions