Skip to content

Instantly share code, notes, and snippets.

@erickskrauch
Created August 17, 2021 17:14
Show Gist options
  • Save erickskrauch/67991b74c274f9c690d6d6150ae7aa4d to your computer and use it in GitHub Desktop.
Save erickskrauch/67991b74c274f9c690d6d6150ae7aa4d to your computer and use it in GitHub Desktop.
An example of parser error when using a type alias
package main
import "C"
type CInt = C.int
func (i *CInt) DoSomething() {
println("We can do something")
}
func NewCInt(i int) CInt {
return C.int(i)
}
func main() {
i := NewCInt(1)
i.DoSomething()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment