Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0111-rdar33067102.swift
Mark Lacey 8d9f97cdc5 Fix another subtle SE-0110-related break.
The change to roll back a part of SE-0110 to allow multi-argument
functions to be passed in places where functions taking a tuple are
expected resulted in a regression in some cases where the fix would
strip off the last ParenType from single-argument functions.

Instead of stripping off parens from both function types we're trying to
match when they both have them, strip off none. This ensures that we
don't get summarily rejected in the nested matchTypes call by other
SE-0110-related code that bails if the two types do not have the same
"parenness".

Fixes rdar://problem/33043106 / SR-5387.
2017-07-10 17:36:53 -07:00

6 lines
170 B
Swift

// RUN: %target-swift-frontend -swift-version 4 %s -typecheck
func flatterMap(_ records: [(Int)]) -> [Int] {
records.flatMap { _ in return 1 } // expected-note {{}}
}