swift 中 switch case 后默认语句后面都会break, 所以当满足某个case之后仍旧想使它匹配下一个case,使用 fallthrough,则不会被截断;
代码语言:javascript
复制case "b","B"
print("this is b/B")
case "a":
print("this is a")
fallthrough
case let x where x.hasSuffix("peper"):
print("has suffix " x)
default:
print("default")
}