Skip to content

Instantly share code, notes, and snippets.

@longlongjump
Last active March 14, 2016 17:13
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 longlongjump/528fa5ae28dfbb45886a to your computer and use it in GitHub Desktop.
Save longlongjump/528fa5ae28dfbb45886a to your computer and use it in GitHub Desktop.
// test.swift
func foo<T>(val: T) {
debugPrint("func foo<T>(val: T)")
}
func foo(val: Int) {
debugPrint("func foo(val: Int)")
}
func test<T>(val: T) {
foo(val)
}
test(42) // prints "func foo<T>(val: T)"
test("42") // prints "func foo<T>(val: T)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment