github.com/yukk001/go1.10.8@v0.0.0-20190813125351-6df2d3982e20/misc/cgo/test/issue26517.go (about) 1 // Copyright 2018 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 cgotest 6 7 // Introduce two pointer types which are distinct, but have the same 8 // base type. Make sure that both of those pointer types get resolved 9 // correctly. Before the fix for 26517 if one of these pointer types 10 // was resolved before the other one was processed, the second one 11 // would never be resolved. 12 // Before this issue was fixed this test failed on Windows, 13 // where va_list expands to a named char* type. 14 15 /* 16 #include <stdarg.h> 17 typedef va_list TypeOne; 18 typedef char *TypeTwo; 19 */ 20 import "C" 21 22 var a C.TypeOne 23 var b C.TypeTwo