Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
cd483ad2
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,发现更多精彩内容 >>
提交
cd483ad2
编写于
2月 11, 2021
作者:
M
Mikhail Glukhikh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FIR2IR: fix raw SAM conversion (avoid * in type arguments)
上级
5f3102bf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
88 addition
and
1 deletion
+88
-1
compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt
...otlin/fir/backend/generators/CallAndReferenceGenerator.kt
+4
-1
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/KotlinDocumentationProvider.kt
...r/testData/codegen/box/fir/KotlinDocumentationProvider.kt
+61
-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/generators/CallAndReferenceGenerator.kt
浏览文件 @
cd483ad2
...
@@ -626,7 +626,10 @@ class CallAndReferenceGenerator(
...
@@ -626,7 +626,10 @@ class CallAndReferenceGenerator(
if
(!
needSamConversion
(
argument
,
parameter
))
{
if
(!
needSamConversion
(
argument
,
parameter
))
{
return
this
return
this
}
}
val
samFirType
=
parameter
.
returnTypeRef
.
coneTypeSafe
<
ConeKotlinType
>()
?.
let
{
substitutor
.
substituteOrSelf
(
it
)
}
val
samFirType
=
parameter
.
returnTypeRef
.
coneTypeSafe
<
ConeKotlinType
>()
?.
let
{
val
substituted
=
substitutor
.
substituteOrSelf
(
it
)
if
(
substituted
is
ConeRawType
)
substituted
.
lowerBound
else
substituted
}
var
samType
=
samFirType
?.
toIrType
(
ConversionTypeContext
.
WITH_INVARIANT
)
?:
createErrorType
()
var
samType
=
samFirType
?.
toIrType
(
ConversionTypeContext
.
WITH_INVARIANT
)
?:
createErrorType
()
if
(
shouldUnwrapVarargType
)
{
if
(
shouldUnwrapVarargType
)
{
samType
=
samType
.
getArrayElementType
(
irBuiltIns
)
samType
=
samType
.
getArrayElementType
(
irBuiltIns
)
...
...
compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
浏览文件 @
cd483ad2
...
@@ -14882,6 +14882,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
...
@@ -14882,6 +14882,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
}
}
@Test
@TestMetadata("KotlinDocumentationProvider.kt")
public void testKotlinDocumentationProvider() throws Exception {
runTest("compiler/testData/codegen/box/fir/KotlinDocumentationProvider.kt");
}
@Test
@Test
@TestMetadata("LookupTags.kt")
@TestMetadata("LookupTags.kt")
public void testLookupTags() throws Exception {
public void testLookupTags() throws Exception {
compiler/testData/codegen/box/fir/KotlinDocumentationProvider.kt
0 → 100644
浏览文件 @
cd483ad2
// TARGET_BACKEND: JVM
// FULL_JDK
// MODULE: lib
// FILE: PsiElement.java
public
interface
PsiElement
{
}
// FILE: PsiElementProcessor.java
import
org.jetbrains.annotations.NotNull;
public
interface
PsiElementProcessor
<
T
extends
PsiElement
>
{
boolean
execute
(
@NotNull
T
element
);
}
// FILE: PsiTreeUtil.java
import
org.jetbrains.annotations.NotNull;
import
org.jetbrains.annotations.Nullable;
public
class
PsiTreeUtil
{
public
static
boolean
processElements
(
@Nullable
PsiElement
element
,
@NotNull
PsiElementProcessor
processor
)
{
return
element
!=
null
;
}
}
// MODULE: main(lib)
// FILE: KotlinDocumentationProvider.kt
import
java.util.function.Consumer
interface
PsiFile
:
PsiElement
{
val
name
:
String
}
class
KtFile
(
override
val
name
:
String
)
:
PsiFile
{
val
docComment
:
PsiDocCommentBase
get
()
=
PsiDocCommentBase
()
}
class
PsiDocCommentBase
:
PsiElement
fun
collectDocComments
(
file
:
PsiFile
,
sink
:
Consumer
<
PsiDocCommentBase
>):
String
{
if
(
file
!
is
KtFile
)
return
"FAIL"
PsiTreeUtil
.
processElements
(
file
)
{
val
comment
=
(
it
as
?
KtFile
)
?.
docComment
if
(
comment
!=
null
)
sink
.
accept
(
comment
)
true
}
return
file
.
name
}
fun
box
():
String
{
return
collectDocComments
(
KtFile
(
"OK"
))
{
}
}
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java
浏览文件 @
cd483ad2
...
@@ -14882,6 +14882,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
...
@@ -14882,6 +14882,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
}
}
@Test
@TestMetadata("KotlinDocumentationProvider.kt")
public void testKotlinDocumentationProvider() throws Exception {
runTest("compiler/testData/codegen/box/fir/KotlinDocumentationProvider.kt");
}
@Test
@Test
@TestMetadata("LookupTags.kt")
@TestMetadata("LookupTags.kt")
public void testLookupTags() throws Exception {
public void testLookupTags() throws Exception {
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
浏览文件 @
cd483ad2
...
@@ -14882,6 +14882,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
...
@@ -14882,6 +14882,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
}
}
@Test
@TestMetadata("KotlinDocumentationProvider.kt")
public void testKotlinDocumentationProvider() throws Exception {
runTest("compiler/testData/codegen/box/fir/KotlinDocumentationProvider.kt");
}
@Test
@Test
@TestMetadata("LookupTags.kt")
@TestMetadata("LookupTags.kt")
public void testLookupTags() throws Exception {
public void testLookupTags() throws Exception {
compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java
浏览文件 @
cd483ad2
...
@@ -12308,6 +12308,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
...
@@ -12308,6 +12308,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
}
}
@TestMetadata("KotlinDocumentationProvider.kt")
public void testKotlinDocumentationProvider() throws Exception {
runTest("compiler/testData/codegen/box/fir/KotlinDocumentationProvider.kt");
}
@TestMetadata("LookupTags.kt")
@TestMetadata("LookupTags.kt")
public void testLookupTags() throws Exception {
public void testLookupTags() throws Exception {
runTest("compiler/testData/codegen/box/fir/LookupTags.kt");
runTest("compiler/testData/codegen/box/fir/LookupTags.kt");
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录