Skip to content

Instantly share code, notes, and snippets.

@m0sth8
Created January 9, 2014 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m0sth8/8336723 to your computer and use it in GitHub Desktop.
Save m0sth8/8336723 to your computer and use it in GitHub Desktop.
...
type MyArray [3]string
type MyArray2 MyArray
func HandleMyArray(a MyArray) {
}
...
HandleMyArray(MyArray{})
HandleMyArray([3]string{})
HandleMyArray(/*begin*/[4]string{}/*end.Expression type mismatch, the expected type is MyArray|CastTypeFix*/)
HandleMyArray(/*begin*/[3]int{}/*end.Expression type mismatch, the expected type is MyArray|CastTypeFix*/)
HandleMyArray(/*begin*/MyArray2{}/*end.Expression type mismatch, the expected type is MyArray|CastTypeFix*/)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment