Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
5f3102bf
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,发现更多精彩内容 >>
提交
5f3102bf
编写于
2月 11, 2021
作者:
M
Mikhail Glukhikh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FIR2IR: expand type before getting nullability #KT-44803 Fixed
上级
791f5891
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
52 addition
and
2 deletion
+52
-2
compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt
...c/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt
+3
-2
compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
...test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
+6
-0
compiler/testData/codegen/box/fir/ClassBuilder.kt
compiler/testData/codegen/box/fir/ClassBuilder.kt
+26
-0
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java
...in/test/runners/codegen/BlackBoxCodegenTestGenerated.java
+6
-0
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
.../test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
+6
-0
compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java
...brains/kotlin/codegen/LightAnalysisModeTestGenerated.java
+5
-0
未找到文件。
compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt
浏览文件 @
5f3102bf
...
...
@@ -105,9 +105,10 @@ class Fir2IrTypeConverter(
if
(
annotations
.
any
{
it
.
classId
==
attributeAnnotation
.
classId
})
continue
typeAnnotations
+=
callGenerator
.
convertToIrConstructorCall
(
attributeAnnotation
)
as
?
IrConstructorCall
?:
continue
}
val
expandedType
=
fullyExpandedType
(
session
)
IrSimpleTypeImpl
(
irSymbol
,
!
typeContext
.
definitelyNotNull
&&
this
.
isMarkedNullable
,
fullyExpandedType
(
session
)
.
typeArguments
.
map
{
it
.
toIrTypeArgument
(
typeContext
)
},
irSymbol
,
!
typeContext
.
definitelyNotNull
&&
expandedType
.
isMarkedNullable
,
expandedType
.
typeArguments
.
map
{
it
.
toIrTypeArgument
(
typeContext
)
},
typeAnnotations
)
}
...
...
compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
浏览文件 @
5f3102bf
...
...
@@ -14846,6 +14846,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("ClassBuilder.kt")
public void testClassBuilder() throws Exception {
runTest("compiler/testData/codegen/box/fir/ClassBuilder.kt");
}
@Test
@TestMetadata("ConstValAccess.kt")
public void testConstValAccess() throws Exception {
compiler/testData/codegen/box/fir/ClassBuilder.kt
0 → 100644
浏览文件 @
5f3102bf
// TARGET_BACKEND: JVM
// FILE: ClassBuilder.java
import
org.jetbrains.annotations.Nullable;
public
interface
ClassBuilder
{
void
newMethod
(
@Nullable
String
[]
exceptions
);
}
// FILE: test.kt
typealias
JvmMethodExceptionTypes
=
Array
<
out
String
?
>?
class
TestClassBuilder
:
ClassBuilder
{
override
fun
newMethod
(
exceptions
:
JvmMethodExceptionTypes
)
{
}
}
fun
box
():
String
{
val
arr
=
arrayOf
(
"OK"
)
TestClassBuilder
().
newMethod
(
null
)
TestClassBuilder
().
newMethod
(
arr
)
return
arr
[
0
]
}
\ No newline at end of file
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java
浏览文件 @
5f3102bf
...
...
@@ -14846,6 +14846,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Test
@TestMetadata("ClassBuilder.kt")
public void testClassBuilder() throws Exception {
runTest("compiler/testData/codegen/box/fir/ClassBuilder.kt");
}
@Test
@TestMetadata("ConstValAccess.kt")
public void testConstValAccess() throws Exception {
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
浏览文件 @
5f3102bf
...
...
@@ -14846,6 +14846,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("ClassBuilder.kt")
public void testClassBuilder() throws Exception {
runTest("compiler/testData/codegen/box/fir/ClassBuilder.kt");
}
@Test
@TestMetadata("ConstValAccess.kt")
public void testConstValAccess() throws Exception {
compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java
浏览文件 @
5f3102bf
...
...
@@ -12278,6 +12278,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("ClassBuilder.kt")
public void testClassBuilder() throws Exception {
runTest("compiler/testData/codegen/box/fir/ClassBuilder.kt");
}
@TestMetadata("ConstValAccess.kt")
public void testConstValAccess() throws Exception {
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录