title: DuplicateDefault layout: article

DuplicateDefault occurs when a type or expression switch has multiple
default clauses.

Example:
 func printInt(i int) {
 	switch i {
 	case 1:
 		println("one")
 	default:
 		println("One")
 	default:
 		println("1")
 	}
 }