Syntax error when using anonymous struct in if-statement #2746

fraenky8 opened this Issue Aug 18, 2016 · 0 comments


None yet

2 participants

fraenky8 commented Aug 18, 2016 edited

Plugin Version: 0.12.1795
IDE name and version:
WebStorm 2016.2.2
Build #WS-162.1628.41, built on August 16, 2016
Java version:
JRE: 1.8.0_102-b14 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
OS name and version:
Windows 7 x64

What are you trying to do?
Using a anonymous struct in if-statement

What would you expect to happen?
no syntax error

What happens?
Syntax error, see attached screenshots

go build, go vet and go fmt running without errros, so it seems valid go-syntax.

you can test it here:

package main

import (

func main() {
    s := struct{ Username, Password string }{

    if s != struct{ Username, Password string }{} {
    } else {

Attachements / Screenshots




@ignatov ignatov self-assigned this Aug 18, 2016
@ignatov ignatov added a commit that closed this issue Aug 18, 2016
@ignatov ignatov syntax error when using anonymous struct in if-statement, fix #2746
(cherry picked from commit cf6153525597b6bdf1daabfbace230d7581069f4)
@ignatov ignatov closed this in 7799ff0 Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment