Skip to content

gccgo: does not error on unused var #12317

Closed
@dvyukov

Description

@dvyukov

gccgo successfully compiles the following incorrect program:

package a
func g() {
    var f = func() {}
}

Both gc and gotype say:

test.go:3:6: f declared but not used

gofrontend is on commit 81810917af7ba19e1f9f8efc8b1989f7d6419d30

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions