Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
f8d6f79c
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,发现更多精彩内容 >>
提交
f8d6f79c
编写于
11月 24, 2020
作者:
D
Dmitriy Novozhilov
提交者:
TeamCityServer
12月 09, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FE] Temporary disable exhaustiveness checker for java sealed classes
KT-43551 KT-41215
上级
1c9f9130
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
12 addition
and
11 deletion
+12
-11
compiler/testData/diagnostics/testsWithJava15/sealedClasses/javaSealedClassExhaustiveness.kt
...WithJava15/sealedClasses/javaSealedClassExhaustiveness.kt
+2
-2
compiler/testData/diagnostics/testsWithJava15/sealedClasses/javaSealedClassExhaustiveness.txt
...ithJava15/sealedClasses/javaSealedClassExhaustiveness.txt
+2
-2
compiler/testData/diagnostics/testsWithJava15/sealedClasses/javaSealedInterfaceExhaustiveness.kt
...Java15/sealedClasses/javaSealedInterfaceExhaustiveness.kt
+2
-2
compiler/testData/diagnostics/testsWithJava15/sealedClasses/javaSealedInterfaceExhaustiveness.txt
...ava15/sealedClasses/javaSealedInterfaceExhaustiveness.txt
+2
-2
compiler/testData/diagnostics/testsWithJava15/sealedClasses/kotlinInheritsJavaClass.txt
...testsWithJava15/sealedClasses/kotlinInheritsJavaClass.txt
+1
-1
compiler/testData/diagnostics/testsWithJava15/sealedClasses/kotlinInheritsJavaInterface.txt
...sWithJava15/sealedClasses/kotlinInheritsJavaInterface.txt
+1
-1
core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassDescriptor.kt
...lin/load/java/lazy/descriptors/LazyJavaClassDescriptor.kt
+2
-1
未找到文件。
compiler/testData/diagnostics/testsWithJava15/sealedClasses/javaSealedClassExhaustiveness.kt
浏览文件 @
f8d6f79c
...
...
@@ -16,14 +16,14 @@ public sealed class B extends Base permits B.C, B.D {
// FILE: main.kt
fun
test_ok_1
(
base
:
Base
)
{
val
x
=
when
(
base
)
{
val
x
=
<!
NO_ELSE_IN_WHEN
!>
when
<!>
(
base
)
{
is
A
->
1
is
B
->
2
}
}
fun
test_ok_2
(
base
:
Base
)
{
val
x
=
when
(
base
)
{
val
x
=
<!
NO_ELSE_IN_WHEN
!>
when
<!>
(
base
)
{
is
A
->
1
is
B
.
C
->
2
is
B
.
D
->
3
...
...
compiler/testData/diagnostics/testsWithJava15/sealedClasses/javaSealedClassExhaustiveness.txt
浏览文件 @
f8d6f79c
...
...
@@ -12,7 +12,7 @@ public final class A : Base {
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public
sealed
class B : Base {
public
abstract
class B : Base {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
...
...
@@ -33,7 +33,7 @@ public sealed class B : Base {
}
}
public
sealed
class Base {
public
abstract
class Base {
public constructor Base()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
...
...
compiler/testData/diagnostics/testsWithJava15/sealedClasses/javaSealedInterfaceExhaustiveness.kt
浏览文件 @
f8d6f79c
...
...
@@ -21,7 +21,7 @@ public enum E implements Base {
// FILE: main.kt
fun
test_ok_1
(
base
:
Base
)
{
val
x
=
when
(
base
)
{
val
x
=
<!
NO_ELSE_IN_WHEN
!>
when
<!>
(
base
)
{
is
A
->
1
is
B
->
2
is
E
->
3
...
...
@@ -29,7 +29,7 @@ fun test_ok_1(base: Base) {
}
fun
test_ok_2
(
base
:
Base
)
{
val
x
=
when
(
base
)
{
val
x
=
<!
NO_ELSE_IN_WHEN
!>
when
<!>
(
base
)
{
is
A
->
1
is
B
.
C
->
2
is
B
.
D
->
3
...
...
compiler/testData/diagnostics/testsWithJava15/sealedClasses/javaSealedInterfaceExhaustiveness.txt
浏览文件 @
f8d6f79c
...
...
@@ -12,7 +12,7 @@ public interface A : Base {
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public
sealed
interface B : Base {
public interface B : Base {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
...
...
@@ -31,7 +31,7 @@ public sealed interface B : Base {
}
}
public
sealed
interface Base {
public interface Base {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
...
...
compiler/testData/diagnostics/testsWithJava15/sealedClasses/kotlinInheritsJavaClass.txt
浏览文件 @
f8d6f79c
...
...
@@ -14,7 +14,7 @@ public final class B : Base {
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public
sealed
class Base {
public
abstract
class Base {
public constructor Base()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
...
...
compiler/testData/diagnostics/testsWithJava15/sealedClasses/kotlinInheritsJavaInterface.txt
浏览文件 @
f8d6f79c
...
...
@@ -14,7 +14,7 @@ public final class B : Base {
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public
sealed
interface Base {
public interface Base {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
...
...
core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassDescriptor.kt
浏览文件 @
f8d6f79c
...
...
@@ -76,7 +76,8 @@ class LazyJavaClassDescriptor(
private
val
modality
=
if
(
jClass
.
isAnnotationType
||
jClass
.
isEnum
)
Modality
.
FINAL
else
Modality
.
convertFromFlags
(
jClass
.
isSealed
,
jClass
.
isAbstract
||
jClass
.
isInterface
,
!
jClass
.
isFinal
)
// TODO: replace false with jClass.isSealed when it will be properly supported in platform
else
Modality
.
convertFromFlags
(
sealed
=
false
,
jClass
.
isSealed
||
jClass
.
isAbstract
||
jClass
.
isInterface
,
!
jClass
.
isFinal
)
private
val
visibility
=
jClass
.
visibility
private
val
isInner
=
jClass
.
outerClass
!=
null
&&
!
jClass
.
isStatic
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录