Files
swift-mirror/validation-test/Sema/rdar85277993.swift
Pavel Yaskevich 14939cf467 [CSGen] Rework nil-coalescing operator handling in LinkedExprAnalyzer
Allow `LinkedExprAnalyzer` to capture `??` operator and walk into
its arguments because they could have valuable type information,
but don't attempt to favor or link operators if `??` is present in a chain.

Resolves: rdar://85277993
2021-11-16 18:00:11 -08:00

13 lines
286 B
Swift

// RUN: %target-typecheck-verify-swift
// REQUIRES: objc_interop
// REQUIRES: OS=macosx
import simd
import CoreGraphics
let m = simd_float3x3(1)
func foo(point: SIMD2<Float>, depth: Float, a: simd_float3x3? = nil) -> SIMD3<Float> {
(a ?? m) * float3(point.x, point.y, 1) * depth
}