mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
13 lines
286 B
Swift
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
|
|
}
|