Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
3d635b6a
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3d635b6a
编写于
2月 11, 2021
作者:
J
Jinseong Jeon
提交者:
TeamCityServer
2月 11, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FIR: unwrap smartcast expression when extracting effects of contract
上级
70f46278
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
89 addition
and
76 deletion
+89
-76
compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/returnsImplies/conditionLogic.fir.txt
...cts/fromSource/good/returnsImplies/conditionLogic.fir.txt
+6
-0
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/contracts/ConeEffectExtractor.kt
...fir/resolve/transformers/contracts/ConeEffectExtractor.kt
+7
-0
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/12.fir.kt
...ics/notLinked/contracts/analysis/smartcasts/neg/12.fir.kt
+1
-1
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/11.fir.kt
...ics/notLinked/contracts/analysis/smartcasts/pos/11.fir.kt
+4
-4
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/13.fir.kt
...ics/notLinked/contracts/analysis/smartcasts/pos/13.fir.kt
+1
-1
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/3.fir.kt
...tics/notLinked/contracts/analysis/smartcasts/pos/3.fir.kt
+10
-10
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/5.fir.kt
...tics/notLinked/contracts/analysis/smartcasts/pos/5.fir.kt
+15
-15
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/6.fir.kt
...tics/notLinked/contracts/analysis/smartcasts/pos/6.fir.kt
+45
-45
未找到文件。
compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/returnsImplies/conditionLogic.fir.txt
浏览文件 @
3d635b6a
...
...
@@ -11,6 +11,7 @@ FILE: conditionLogic.kt
@R|kotlin/OptIn|(vararg(<getClass>(Q|kotlin/contracts/ExperimentalContracts|))) public final fun test2(x: R|kotlin/String?|): R|kotlin/Any?|
[R|Contract description]
<
Returns(NOT_NULL) -> x is kotlin/String && x != null
>
{
[StubStatement]
...
...
@@ -46,6 +47,7 @@ FILE: conditionLogic.kt
@R|kotlin/OptIn|(vararg(<getClass>(Q|kotlin/contracts/ExperimentalContracts|))) public final fun test6(x: R|kotlin/Any?|): R|kotlin/Any?|
[R|Contract description]
<
Returns(TRUE) -> x is kotlin/String? && x != null
>
{
[StubStatement]
...
...
@@ -54,6 +56,7 @@ FILE: conditionLogic.kt
@R|kotlin/OptIn|(vararg(<getClass>(Q|kotlin/contracts/ExperimentalContracts|))) public final fun test7(x: R|kotlin/Any?|): R|kotlin/Any?|
[R|Contract description]
<
Returns(TRUE) -> x is kotlin/String? && x != null || x is kotlin/Int
>
{
[StubStatement]
...
...
@@ -95,6 +98,7 @@ FILE: conditionLogic.kt
@R|kotlin/OptIn|(vararg(<getClass>(Q|kotlin/contracts/ExperimentalContracts|))) public final fun test11(x: R|kotlin/Any?|): R|kotlin/Any?|
[R|Contract description]
<
Returns(TRUE) -> x is kotlin/Comparable<*> && x is kotlin/CharSequence
>
{
[StubStatement]
...
...
@@ -103,6 +107,7 @@ FILE: conditionLogic.kt
@R|kotlin/OptIn|(vararg(<getClass>(Q|kotlin/contracts/ExperimentalContracts|))) public final fun test12(x: R|kotlin/Any?|): R|kotlin/Any?|
[R|Contract description]
<
Returns(TRUE) -> x is kotlin/Comparable<*> && x is kotlin/CharSequence || x is kotlin/Number
>
{
[StubStatement]
...
...
@@ -111,6 +116,7 @@ FILE: conditionLogic.kt
@R|kotlin/OptIn|(vararg(<getClass>(Q|kotlin/contracts/ExperimentalContracts|))) public final fun test13(x: R|kotlin/Any?|): R|kotlin/Any?|
[R|Contract description]
<
Returns(TRUE) -> (!)x !is kotlin/Comparable<*> || x !is kotlin/CharSequence && (!x is kotlin/Number)
>
{
[StubStatement]
...
...
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/contracts/ConeEffectExtractor.kt
浏览文件 @
3d635b6a
...
...
@@ -109,6 +109,13 @@ class ConeEffectExtractor(
return
ConeIsNullPredicate
(
arg
,
isNegated
)
}
override
fun
visitExpressionWithSmartcast
(
expressionWithSmartcast
:
FirExpressionWithSmartcast
,
data
:
Nothing
?
):
ConeContractDescriptionElement
?
{
return
expressionWithSmartcast
.
originalExpression
.
accept
(
this
,
data
)
}
override
fun
visitQualifiedAccessExpression
(
qualifiedAccessExpression
:
FirQualifiedAccessExpression
,
data
:
Nothing
?
...
...
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/12.fir.kt
浏览文件 @
3d635b6a
...
...
@@ -31,5 +31,5 @@ fun case_1(value_1: Any?) {
// TESTCASE NUMBER: 2
fun
case_2
(
value_1
:
Any
?,
value_2
:
Number
,
value_3
:
Any
?,
value_4
:
String
?)
{
value_1
.
case_2
(
value_2
,
value_3
,
value_4
)
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
println
(
value_1
.
toByte
())
}
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/11.fir.kt
浏览文件 @
3d635b6a
...
...
@@ -51,8 +51,8 @@ class case_3 {
fun
case_3
(
value_1
:
Any
?,
value_2
:
Number
?)
{
val
o
=
case_3
()
contracts
.
case_3
(
value_1
,
value_2
,
o
.
prop_1
,
this
.
prop_1
)
<!
AMBIGUITY
!>
println
<!>(
o
.
prop_1
.<!
NONE_APPLICABLE
!>
plus
<!>
(
3
))
<!
AMBIGUITY
!>
println
<!>(
this
.
prop_1
.<!
NONE_APPLICABLE
!>
plus
<!>
(
3
))
println
(
o
.
prop_1
.
plus
(
3
))
println
(
this
.
prop_1
.
plus
(
3
))
}
}
...
...
@@ -62,8 +62,8 @@ class case_4 {
fun
case_4
(
value_1
:
Any
?,
value_2
:
Number
?)
{
val
o
=
case_4
()
if
(
contracts
.
case_4
(
value_1
,
value_2
,
o
.
prop_1
,
this
.
prop_1
))
{
<!
AMBIGUITY
!>
println
<!>(
o
.
prop_1
.<!
NONE_APPLICABLE
!>
plus
<!>
(
3
))
<!
AMBIGUITY
!>
println
<!>(
this
.
prop_1
.<!
NONE_APPLICABLE
!>
plus
<!>
(
3
))
println
(
o
.
prop_1
.
plus
(
3
))
println
(
this
.
prop_1
.
plus
(
3
))
}
}
}
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/13.fir.kt
浏览文件 @
3d635b6a
...
...
@@ -31,5 +31,5 @@ fun case_1(value_1: Any?) {
// TESTCASE NUMBER: 2
fun
case_2
(
value_1
:
Any
?,
value_2
:
Number
,
value_3
:
Any
?,
value_4
:
String
?)
{
value_1
.
case_2
(
value_2
,
value_3
,
value_4
)
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
println
(
value_1
.
toByte
())
}
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/3.fir.kt
浏览文件 @
3d635b6a
...
...
@@ -102,9 +102,9 @@ class case_3_class {
fun
case_3
(
value_1
:
Any
?,
value_2
:
Number
?)
{
val
o
=
case_3_class
()
contracts
.
case_3
(
value_1
,
value_2
,
o
.
prop_1
,
this
.
prop_1
)
println
(
value_1
.
<!
INAPPLICABLE_CANDIDATE
!>
dec
<!>
())
println
(
value_1
.
dec
())
println
(
value_2
?.
toByte
())
<!
AMBIGUITY
!>
println
<!>(
o
.
prop_1
.<!
NONE_APPLICABLE
!>
plus
<!>
(
3
))
println
(
o
.
prop_1
.
plus
(
3
))
}
}
...
...
@@ -154,24 +154,24 @@ class case_6_class {
fun
case_6
(
value_1
:
Any
?,
value_2
:
Number
?)
{
val
o
=
case_6_class
()
if
(
contracts
.
case_6_1
(
value_1
,
value_2
,
o
.
prop_1
,
this
.
prop_1
))
{
println
(
value_1
.
<!
INAPPLICABLE_CANDIDATE
!>
dec
<!>
())
println
(
value_1
.
dec
())
println
(
value_2
?.
toByte
())
<!
AMBIGUITY
!>
println
<!>(
o
.
prop_1
.<!
NONE_APPLICABLE
!>
plus
<!>
(
3
))
println
(
o
.
prop_1
.
plus
(
3
))
}
if
(!
contracts
.
case_6_2
(
value_1
,
value_2
,
o
.
prop_1
,
this
.
prop_1
))
{
println
(
value_1
.
<!
INAPPLICABLE_CANDIDATE
!>
dec
<!>
())
println
(
value_1
.
dec
())
println
(
value_2
?.
toByte
())
<!
AMBIGUITY
!>
println
<!>(
o
.
prop_1
.<!
NONE_APPLICABLE
!>
plus
<!>
(
3
))
println
(
o
.
prop_1
.
plus
(
3
))
}
if
(
contracts
.
case_6_3
(
value_1
,
value_2
,
o
.
prop_1
,
this
.
prop_1
)
!=
null
)
{
println
(
value_1
.
<!
INAPPLICABLE_CANDIDATE
!>
dec
<!>
())
println
(
value_1
.
dec
())
println
(
value_2
?.
toByte
())
<!
AMBIGUITY
!>
println
<!>(
o
.
prop_1
.<!
NONE_APPLICABLE
!>
plus
<!>
(
3
))
println
(
o
.
prop_1
.
plus
(
3
))
}
if
(
contracts
.
case_6_4
(
value_1
,
value_2
,
o
.
prop_1
,
this
.
prop_1
)
==
null
)
{
println
(
value_1
.
<!
INAPPLICABLE_CANDIDATE
!>
dec
<!>
())
println
(
value_1
.
dec
())
println
(
value_2
?.
toByte
())
<!
AMBIGUITY
!>
println
<!>(
o
.
prop_1
.<!
NONE_APPLICABLE
!>
plus
<!>
(
3
))
println
(
o
.
prop_1
.
plus
(
3
))
}
}
}
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/5.fir.kt
浏览文件 @
3d635b6a
...
...
@@ -85,41 +85,41 @@ import contracts.*
// TESTCASE NUMBER: 1
fun
case_1
(
value_1
:
Any
?)
{
value_1
.
case_1
()
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
length
<!>
)
println
(
value_1
.
length
)
}
// TESTCASE NUMBER: 2
fun
case_2
(
value_1
:
Number
?)
{
value_1
.
case_2
()
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
println
(
value_1
.
inv
())
}
// TESTCASE NUMBER: 3
fun
case_3
(
value_1
:
Any
?)
{
value_1
.
case_3
()
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
println
(
value_1
.
inv
())
}
// TESTCASE NUMBER: 4
fun
case_4
(
value_1
:
Any
?,
value_2
:
Any
?,
value_3
:
Any
?)
{
when
{
value_1
.
case_4_1
()
->
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
length
<!>
)
}
when
{
!
value_2
.
case_4_2
()
->
<!
AMBIGUITY
!>
println
<!>(
value_2
.<!
UNRESOLVED_REFERENCE
!>
length
<!>
)
}
when
{
value_3
.
case_4_3
()
!=
null
->
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
length
<!>
)
}
when
{
value_3
.
case_4_4
()
==
null
->
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
length
<!>
)
}
when
{
value_1
.
case_4_1
()
->
println
(
value_1
.
length
)
}
when
{
!
value_2
.
case_4_2
()
->
println
(
value_2
.
length
)
}
when
{
value_3
.
case_4_3
()
!=
null
->
println
(
value_3
.
length
)
}
when
{
value_3
.
case_4_4
()
==
null
->
println
(
value_3
.
length
)
}
}
// TESTCASE NUMBER: 5
fun
case_5
(
value_1
:
Number
?,
value_2
:
Number
?,
value_3
:
Number
?)
{
if
(
value_1
.
case_5_1
())
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
if
(!
value_2
.
case_5_2
())
<!
AMBIGUITY
!>
println
<!>(
value_2
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
if
(
value_3
.
case_5_3
()
!=
null
)
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
if
(
value_3
.
case_5_4
()
==
null
)
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
if
(
value_1
.
case_5_1
())
println
(
value_1
.
inv
())
if
(!
value_2
.
case_5_2
())
println
(
value_2
.
inv
())
if
(
value_3
.
case_5_3
()
!=
null
)
println
(
value_3
.
inv
())
if
(
value_3
.
case_5_4
()
==
null
)
println
(
value_3
.
inv
())
}
// TESTCASE NUMBER: 6
fun
case_6
(
value_1
:
Any
?,
value_2
:
Any
?,
value_3
:
Any
?)
{
if
(
value_1
.
case_6_1
())
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
if
(!
value_2
.
case_6_2
())
<!
AMBIGUITY
!>
println
<!>(
value_2
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
if
(
value_3
.
case_6_3
()
!=
null
)
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
if
(
value_3
.
case_6_4
()
==
null
)
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
if
(
value_1
.
case_6_1
())
println
(
value_1
.
inv
())
if
(!
value_2
.
case_6_2
())
println
(
value_2
.
inv
())
if
(
value_3
.
case_6_3
()
!=
null
)
println
(
value_3
.
inv
())
if
(
value_3
.
case_6_4
()
==
null
)
println
(
value_3
.
inv
())
}
compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/6.fir.kt
浏览文件 @
3d635b6a
...
...
@@ -109,56 +109,56 @@ import contracts.*
// TESTCASE NUMBER: 1
fun
case_1
(
value_1
:
Any
?,
value_2
:
Int
?)
{
value_1
.
case_1
(
value_2
)
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
length
<!>
)
println
(
value_2
<!
UNSAFE_CALL
!>.<!>
inv
())
println
(
value_1
.
length
)
println
(
value_2
.
inv
())
}
// TESTCASE NUMBER: 2
fun
case_2
(
value_1
:
Number
?,
value_2
:
Any
?)
{
value_1
.
case_2
(
value_2
)
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
<!
AMBIGUITY
!>
println
<!>(
value_2
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
println
(
value_1
.
inv
())
println
(
value_2
.
toByte
())
}
// TESTCASE NUMBER: 3
fun
case_3
(
value_1
:
Any
?,
value_2
:
String
?)
{
value_1
.
case_3
(
value_2
)
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
println
(
value_2
<!
UNSAFE_CALL
!>.<!>
length
)
println
(
value_1
.
inv
())
println
(
value_2
.
length
)
}
// TESTCASE NUMBER: 4
fun
case_4
(
value_1
:
Any
?,
value_2
:
Number
,
value_3
:
Any
?,
value_4
:
String
?)
{
value_1
.
case_4
(
value_2
,
value_3
,
value_4
)
<!
AMBIGUITY
!>
println
<!>(
value_2
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
println
(
value_4
<!
UNSAFE_CALL
!>.<!>
length
)
println
(
value_2
.
inv
())
println
(
value_3
.
toByte
())
println
(
value_4
.
length
)
}
// TESTCASE NUMBER: 5
fun
case_5
(
value_1
:
Any
?,
value_2
:
Int
?,
value_3
:
Any
?,
value_4
:
Int
?,
value_5
:
Any
?,
value_6
:
Int
?)
{
when
{
value_1
.
case_5_1
(
value_2
)
->
{
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
length
<!>
)
println
(
value_2
<!
UNSAFE_CALL
!>.<!>
inv
())
println
(
value_1
.
length
)
println
(
value_2
.
inv
())
}
}
when
{
!
value_3
.
case_5_2
(
value_4
)
->
{
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
length
<!>
)
println
(
value_4
<!
UNSAFE_CALL
!>.<!>
inv
())
println
(
value_3
.
length
)
println
(
value_4
.
inv
())
}
}
when
{
value_5
.
case_5_3
(
value_6
)
!=
null
->
{
<!
AMBIGUITY
!>
println
<!>(
value_5
.<!
UNRESOLVED_REFERENCE
!>
length
<!>
)
println
(
value_6
<!
UNSAFE_CALL
!>.<!>
inv
())
println
(
value_5
.
length
)
println
(
value_6
.
inv
())
}
}
when
{
value_5
.
case_5_4
(
value_6
)
==
null
->
{
<!
AMBIGUITY
!>
println
<!>(
value_5
.<!
UNRESOLVED_REFERENCE
!>
length
<!>
)
println
(
value_6
<!
UNSAFE_CALL
!>.<!>
inv
())
println
(
value_5
.
length
)
println
(
value_6
.
inv
())
}
}
}
...
...
@@ -166,55 +166,55 @@ fun case_5(value_1: Any?, value_2: Int?, value_3: Any?, value_4: Int?, value_5:
// TESTCASE NUMBER: 6
fun
case_6
(
value_1
:
Number
?,
value_2
:
Any
?,
value_3
:
Number
?,
value_4
:
Any
?,
value_5
:
Number
?,
value_6
:
Any
?)
{
if
(
value_1
.
case_6_1
(
value_2
))
{
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
<!
AMBIGUITY
!>
println
<!>(
value_2
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
println
(
value_1
.
inv
())
println
(
value_2
.
toByte
())
}
if
(!
value_3
.
case_6_2
(
value_4
))
{
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
<!
AMBIGUITY
!>
println
<!>(
value_4
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
println
(
value_3
.
inv
())
println
(
value_4
.
toByte
())
}
if
(
value_5
.
case_6_3
(
value_6
)
!=
null
)
{
<!
AMBIGUITY
!>
println
<!>(
value_5
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
<!
AMBIGUITY
!>
println
<!>(
value_6
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
println
(
value_5
.
inv
())
println
(
value_6
.
toByte
())
}
if
(
value_5
.
case_6_4
(
value_6
)
==
null
)
{
<!
AMBIGUITY
!>
println
<!>(
value_5
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
<!
AMBIGUITY
!>
println
<!>(
value_6
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
println
(
value_5
.
inv
())
println
(
value_6
.
toByte
())
}
}
// TESTCASE NUMBER: 7
fun
case_7
(
value_1
:
Any
?,
value_2
:
String
?,
value_3
:
Any
?,
value_4
:
String
?,
value_5
:
Any
?,
value_6
:
String
?)
{
if
(
value_1
.
case_7_1
(
value_2
))
{
<!
AMBIGUITY
!>
println
<!>(
value_1
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
println
(
value_2
<!
UNSAFE_CALL
!>.<!>
length
)
println
(
value_1
.
inv
())
println
(
value_2
.
length
)
}
if
(
value_3
.
case_7_2
(
value_4
))
{
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
println
(
value_4
<!
UNSAFE_CALL
!>.<!>
length
)
println
(
value_3
.
inv
())
println
(
value_4
.
length
)
}
if
(
value_5
.
case_7_3
(
value_6
)
!=
null
)
{
<!
AMBIGUITY
!>
println
<!>(
value_5
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
println
(
value_6
<!
UNSAFE_CALL
!>.<!>
length
)
println
(
value_5
.
inv
())
println
(
value_6
.
length
)
}
if
(
value_5
.
case_7_4
(
value_6
)
==
null
)
{
<!
AMBIGUITY
!>
println
<!>(
value_5
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
println
(
value_6
<!
UNSAFE_CALL
!>.<!>
length
)
println
(
value_5
.
inv
())
println
(
value_6
.
length
)
}
}
// TESTCASE NUMBER: 8
fun
case_8
(
value_1
:
Any
?,
value_2
:
Number
,
value_3
:
Any
?,
value_4
:
String
?,
value_5
:
Any
?,
value_6
:
Number
,
value_7
:
Any
?,
value_8
:
String
?)
{
when
{
value_1
.
case_8_1
(
value_2
,
value_3
,
value_4
)
->
<!
AMBIGUITY
!>
println
<!>(
value_2
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
}
when
{
value_1
.
case_8_1
(
value_2
,
value_3
,
value_4
)
->
<!
AMBIGUITY
!>
println
<!>(
value_3
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
}
when
{
value_1
.
case_8_1
(
value_2
,
value_3
,
value_4
)
->
println
(
value_4
<!
UNSAFE_CALL
!>.<!>
length
)
}
when
{
!
value_5
.
case_8_2
(
value_6
,
value_7
,
value_8
)
->
<!
AMBIGUITY
!>
println
<!>(
value_6
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
}
when
{
!
value_5
.
case_8_2
(
value_6
,
value_7
,
value_8
)
->
<!
AMBIGUITY
!>
println
<!>(
value_7
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
}
when
{
!
value_5
.
case_8_2
(
value_6
,
value_7
,
value_8
)
->
println
(
value_8
<!
UNSAFE_CALL
!>.<!>
length
)
}
when
{
value_5
.
case_8_3
(
value_6
,
value_7
,
value_8
)
!=
null
->
<!
AMBIGUITY
!>
println
<!>(
value_6
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
}
when
{
value_5
.
case_8_3
(
value_6
,
value_7
,
value_8
)
!=
null
->
<!
AMBIGUITY
!>
println
<!>(
value_7
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
}
when
{
value_5
.
case_8_3
(
value_6
,
value_7
,
value_8
)
!=
null
->
println
(
value_8
<!
UNSAFE_CALL
!>.<!>
length
)
}
when
{
value_5
.
case_8_4
(
value_6
,
value_7
,
value_8
)
==
null
->
<!
AMBIGUITY
!>
println
<!>(
value_6
.<!
UNRESOLVED_REFERENCE
!>
inv
<!>
())
}
when
{
value_5
.
case_8_4
(
value_6
,
value_7
,
value_8
)
==
null
->
<!
AMBIGUITY
!>
println
<!>(
value_7
.<!
UNRESOLVED_REFERENCE
!>
toByte
<!>
())
}
when
{
value_5
.
case_8_4
(
value_6
,
value_7
,
value_8
)
==
null
->
println
(
value_8
<!
UNSAFE_CALL
!>.<!>
length
)
}
when
{
value_1
.
case_8_1
(
value_2
,
value_3
,
value_4
)
->
println
(
value_2
.
inv
())
}
when
{
value_1
.
case_8_1
(
value_2
,
value_3
,
value_4
)
->
println
(
value_3
.
toByte
())
}
when
{
value_1
.
case_8_1
(
value_2
,
value_3
,
value_4
)
->
println
(
value_4
.
length
)
}
when
{
!
value_5
.
case_8_2
(
value_6
,
value_7
,
value_8
)
->
println
(
value_6
.
inv
())
}
when
{
!
value_5
.
case_8_2
(
value_6
,
value_7
,
value_8
)
->
println
(
value_7
.
toByte
())
}
when
{
!
value_5
.
case_8_2
(
value_6
,
value_7
,
value_8
)
->
println
(
value_8
.
length
)
}
when
{
value_5
.
case_8_3
(
value_6
,
value_7
,
value_8
)
!=
null
->
println
(
value_6
.
inv
())
}
when
{
value_5
.
case_8_3
(
value_6
,
value_7
,
value_8
)
!=
null
->
println
(
value_7
.
toByte
())
}
when
{
value_5
.
case_8_3
(
value_6
,
value_7
,
value_8
)
!=
null
->
println
(
value_8
.
length
)
}
when
{
value_5
.
case_8_4
(
value_6
,
value_7
,
value_8
)
==
null
->
println
(
value_6
.
inv
())
}
when
{
value_5
.
case_8_4
(
value_6
,
value_7
,
value_8
)
==
null
->
println
(
value_7
.
toByte
())
}
when
{
value_5
.
case_8_4
(
value_6
,
value_7
,
value_8
)
==
null
->
println
(
value_8
.
length
)
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录