Closed
Description
This code compiled on Windows with Go 1.17, but not with Go 1.18:
package p
/*
#include <windows.h>
*/
import "C"
func Error() {
var x *C.char
_ = C.HLOCAL(x)
}
The error message is:
p.go:10:15: cannot convert x (variable of type *_Ctype_char) to type _Ctype_HANDLE
Reverting 635e493 allows the code to compile again.