When trying to assign a variable of the wrong type to a C.ushort. The compiler will emit the error cannot use <var> (type <var type>) as type C.unsignedshort in assignment. However C.unsignedshort isn't even a real type. It should say C.ushort
short test program:
package main
import "C"
func main() {
var x C.ushort
y := 5
x = y // ./bug.go:8: cannot use y (type int) as type C.unsignedshort in assignment
//var z C.unsignedshort // could not determine kind of name for C.unsignedshor
}
When trying to assign a variable of the wrong type to a C.ushort. The compiler will emit the error
cannot use <var> (type <var type>) as type C.unsignedshort in assignment. HoweverC.unsignedshortisn't even a real type. It should sayC.ushortshort test program:
package main