mirror of
https://github.com/apple/swift.git
synced 2026-06-27 12:25:55 +02:00
6ea3644568
<rdar://problem/27855641>
8 lines
314 B
Swift
8 lines
314 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
func unavailableModulo(description: String = "<rdar://problem/27855641>") {
|
|
_ = 42.0 % 2 // expected-error {{For floating point numbers use truncatingRemainder}}
|
|
var f: Float = 42.0
|
|
f %= 2 // expected-error {{For floating point numbers use formTruncatingRemainder}}
|
|
}
|