Source file test/fixedbugs/issue18393.go

     1  // errorcheck
     2  
     3  // Copyright 2017 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  // Test that compiler directives are ignored if they
     8  // don't start at the beginning of the line.
     9  
    10  package p
    11  
    12  //line issue18393.go:20
    13  import 42 // error on line 20
    14  
    15  
    16  /* //line not at start of line: ignored */ //line issue18393.go:30
    17  var x     // error on line 24, not 30
    18  
    19  
    20  // ERROR "import path must be a string"
    21  
    22  
    23  
    24  // ERROR "syntax error: unexpected newline, expecting type|expected type"
    25  

View as plain text