Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0132-rdar35699666.swift
Pavel Yaskevich f5d9c2eb79 [Diagnostics] Fix crash related to diagnostics of trailing closures
While trying to diagnose a problem related to contextual result type
of the trailing closure, don't assume that declaration context is properly
set, instead directly set it to correct one before running type-check.

Resolves: rdar://problem/35699666
2017-11-28 13:12:25 -08:00

10 lines
158 B
Swift

// RUN: not %target-swift-frontend %s -typecheck
struct A<T> {
private var b: [T]
}
func foo(v: [Int]) {
let _ = A(b: v.sorted { $0 < $1 }.map{ $0 })
}