blob: edf5ac557c2ef0d7b39c6115925afbae2e1a7165 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<html>
<body>
<p>Reports expressions that will be of type <code>Int</code>, thus causing compilation errors in Kotlin 1.9 and later.</p>
<p>Example:</p>
<pre><code>
fun takeByte(x: Byte) {}
fun foo() {
takeByte(1 + 1) // will be resolved to Int in 1.9
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
fun takeByte(x: Byte) {}
fun foo() {
takeByte((1 + 1).toByte()) // will be resolved to Int in 1.9
}
</code></pre>
<p>Inspection is available for Kotlin language level starting from 1.7.</p>
</body>
</html>
|