Source file test/fixedbugs/issue28055.go

     1  // compile
     2  
     3  // Copyright 2018 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  // Make sure VARDEF can be a top-level statement.
     8  
     9  package p
    10  
    11  func f() {
    12  	var s string
    13  	var as []string
    14  	switch false && (s+"a"+as[0]+s+as[0]+s == "") {
    15  	}
    16  }
    17  

View as plain text