mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL files still require this behavior; if we cleaned that up we could simplify a fair bit of code here. Fixes <https://bugs.swift.org/browse/SR-284>, <https://bugs.swift.org/browse/SR-4426>.
19 lines
397 B
Swift
19 lines
397 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
// rdar://problem/32726044 - shrink reduced domains too far
|
|
public protocol P_32726044 {}
|
|
|
|
extension Int: P_32726044 {}
|
|
extension Float: P_32726044 {}
|
|
|
|
public func *(lhs: P_32726044, rhs: P_32726044) -> Double {
|
|
fatalError()
|
|
}
|
|
|
|
func rdar32726044() -> Float {
|
|
var f: Float = 0
|
|
f = Float(1) * 100 // Ok
|
|
let _: Float = Float(42) + 0 // Ok
|
|
return f
|
|
}
|