Skip to content

self-recursive empty interface is permitted by spec #1815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
griesemer opened this issue May 12, 2011 · 1 comment
Closed

self-recursive empty interface is permitted by spec #1815

griesemer opened this issue May 12, 2011 · 1 comment
Labels
FrozenDueToAge LanguageChange Suggested changes to the Go language

Comments

@griesemer
Copy link
Contributor

The following declaration

type E interface {
    E
}

is accepted by neither the gc collection of compilers nor gccgo (interface type loop
involving E).

Arguably it is a legal declaration; at least there is no wording in the spec against it.

This is either a) a compiler bug, or b) the spec needs to be clearer. Also, this is a
completely academic issue with no practical implications...
@griesemer
Copy link
Contributor Author

Comment 1:

Status changed to Duplicate.

Merged into issue #1814.

@griesemer griesemer added duplicate LanguageChange Suggested changes to the Go language labels May 12, 2011
@griesemer griesemer self-assigned this May 12, 2011
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge LanguageChange Suggested changes to the Go language
Projects
None yet
Development

No branches or pull requests

2 participants