• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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// cgo should reject the use of mangled C names.
6
7package main
8
9/*
10typedef struct a {
11	int i;
12} a;
13void fn(void) {}
14*/
15import "C"
16
17type B _Ctype_struct_a // ERROR HERE
18
19var a _Ctype_struct_a // ERROR HERE
20
21type A struct {
22	a *_Ctype_struct_a // ERROR HERE
23}
24
25var notExist _Ctype_NotExist // ERROR HERE
26
27func main() {
28	_Cfunc_fn() // ERROR HERE
29}
30