Skip to content
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

Duplicate field name in struct literal is not reported #2763

Open
horkhe opened this issue Sep 2, 2016 · 0 comments
Open

Duplicate field name in struct literal is not reported #2763

horkhe opened this issue Sep 2, 2016 · 0 comments

Comments

@horkhe
Copy link
Contributor

horkhe commented Sep 2, 2016

  • Plugin version (or commit hash): 0.12.1811
  • IntelliJ IDEA 2016.2.3
  • Build #IU-162.1812.17, built on August 30, 2016
  • JRE: 1.8.0_112-release-b287 x86_64
  • JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • OS: Max OS X 10.11.6

The following code contains a syntax error, but it is not highlighted in the editor:

type Foo struct {
    Bar int
}

var foo = Foo{
    Bar: 0,
    Bar: 1, // Should be error: duplicate field name in struct literal: Bar
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants