...

Source file src/internal/types/testdata/fixedbugs/issue58742.go

Documentation: internal/types/testdata/fixedbugs

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package p
     6  
     7  func _() (int, UndefinedType /* ERROR "undefined: UndefinedType" */ , string)  {
     8  	return 0 // ERROR "not enough return values\n\thave (number)\n\twant (int, unknown type, string)"
     9  }
    10  
    11  func _() (int, UndefinedType /* ERROR "undefined: UndefinedType" */ ) {
    12  	return 0, 1, 2 // ERROR "too many return values\n\thave (number, number, number)\n\twant (int, unknown type)"
    13  }
    14  
    15  // test case from issue
    16  func _() UndefinedType /* ERROR "undefined: UndefinedType" */ {
    17  	return // ERROR "not enough return values\n\thave ()\n\twant (unknown type)"
    18  }
    19  

View as plain text