Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
8ace0d9a
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,发现更多精彩内容 >>
提交
8ace0d9a
编写于
11月 11, 2020
作者:
M
Mikhail Glukhikh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FIR] Replace local types with Any in deserializer
上级
744918fb
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
48 addition
and
2 deletion
+48
-2
compiler/fir/fir-deserialization/src/org/jetbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt
...tbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt
+5
-2
compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java
...n/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java
+5
-0
compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt
...mpileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt
+18
-0
compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java
...tlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java
+5
-0
compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java
...codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java
+5
-0
compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java
...ns/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java
+5
-0
compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java
...ns/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java
+5
-0
未找到文件。
compiler/fir/fir-deserialization/src/org/jetbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt
浏览文件 @
8ace0d9a
...
...
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.firUnsafe
import
org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
import
org.jetbrains.kotlin.fir.symbols.ConeClassifierLookupTag
import
org.jetbrains.kotlin.fir.symbols.ConeTypeParameterLookupTag
import
org.jetbrains.kotlin.fir.symbols.StandardClassIds
import
org.jetbrains.kotlin.fir.symbols.impl.ConeClassLikeLookupTagImpl
import
org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol
import
org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
...
...
@@ -89,9 +90,11 @@ class FirTypeDeserializer(
}
}
private
fun
computeClassifier
(
fqNameIndex
:
Int
):
ConeClassLikeLookupTag
?
{
private
fun
computeClassifier
(
fqNameIndex
:
Int
):
ConeClassLikeLookupTag
{
try
{
val
id
=
nameResolver
.
getClassId
(
fqNameIndex
)
// We can't just load local types as is, because later we will get an exception
// while trying to get corresponding FIR class
val
id
=
nameResolver
.
getClassId
(
fqNameIndex
).
takeIf
{
!
it
.
isLocal
}
?:
StandardClassIds
.
Any
return
ConeClassLikeLookupTagImpl
(
id
)
}
catch
(
e
:
Throwable
)
{
throw
RuntimeException
(
"Looking up for ${nameResolver.getClassId(fqNameIndex)}"
,
e
)
...
...
compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java
浏览文件 @
8ace0d9a
...
...
@@ -405,6 +405,11 @@ public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompi
KotlinTestUtils
.
assertAllTestsPresentByMetadataWithExcluded
(
this
.
getClass
(),
new
File
(
"compiler/testData/compileKotlinAgainstKotlin/fir"
),
Pattern
.
compile
(
"^(.+)\\.kt$"
),
null
,
TargetBackend
.
JVM_IR
,
true
);
}
@TestMetadata
(
"AnonymousObjectInProperty.kt"
)
public
void
testAnonymousObjectInProperty
()
throws
Exception
{
runTest
(
"compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"
);
}
@TestMetadata
(
"LibraryProperty.kt"
)
public
void
testLibraryProperty
()
throws
Exception
{
runTest
(
"compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"
);
...
...
compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt
0 → 100644
浏览文件 @
8ace0d9a
// TARGET_BACKEND: JVM
// FILE: A.kt
abstract
class
A
{
private
val
x
=
object
{
fun foo() = "
OK
"
}
protected
val
y
=
x
.
foo
()
}
// FILE: B.kt
class
B
:
A
()
{
val
z
=
y
}
fun
box
()
=
B
().
z
\ No newline at end of file
compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java
浏览文件 @
8ace0d9a
...
...
@@ -410,6 +410,11 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
KotlinTestUtils
.
assertAllTestsPresentByMetadataWithExcluded
(
this
.
getClass
(),
new
File
(
"compiler/testData/compileKotlinAgainstKotlin/fir"
),
Pattern
.
compile
(
"^(.+)\\.kt$"
),
null
,
true
);
}
@TestMetadata
(
"AnonymousObjectInProperty.kt"
)
public
void
testAnonymousObjectInProperty
()
throws
Exception
{
runTest
(
"compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"
);
}
@TestMetadata
(
"LibraryProperty.kt"
)
public
void
testLibraryProperty
()
throws
Exception
{
runTest
(
"compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"
);
...
...
compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java
浏览文件 @
8ace0d9a
...
...
@@ -405,6 +405,11 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile
KotlinTestUtils
.
assertAllTestsPresentByMetadataWithExcluded
(
this
.
getClass
(),
new
File
(
"compiler/testData/compileKotlinAgainstKotlin/fir"
),
Pattern
.
compile
(
"^(.+)\\.kt$"
),
null
,
TargetBackend
.
JVM_IR
,
true
);
}
@TestMetadata
(
"AnonymousObjectInProperty.kt"
)
public
void
testAnonymousObjectInProperty
()
throws
Exception
{
runTest
(
"compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"
);
}
@TestMetadata
(
"LibraryProperty.kt"
)
public
void
testLibraryProperty
()
throws
Exception
{
runTest
(
"compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"
);
...
...
compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java
浏览文件 @
8ace0d9a
...
...
@@ -405,6 +405,11 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT
KotlinTestUtils
.
assertAllTestsPresentByMetadataWithExcluded
(
this
.
getClass
(),
new
File
(
"compiler/testData/compileKotlinAgainstKotlin/fir"
),
Pattern
.
compile
(
"^(.+)\\.kt$"
),
null
,
TargetBackend
.
JVM_MULTI_MODULE_IR_AGAINST_OLD
,
true
);
}
@TestMetadata
(
"AnonymousObjectInProperty.kt"
)
public
void
testAnonymousObjectInProperty
()
throws
Exception
{
runTest
(
"compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"
);
}
@TestMetadata
(
"LibraryProperty.kt"
)
public
void
testLibraryProperty
()
throws
Exception
{
runTest
(
"compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"
);
...
...
compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java
浏览文件 @
8ace0d9a
...
...
@@ -405,6 +405,11 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT
KotlinTestUtils
.
assertAllTestsPresentByMetadataWithExcluded
(
this
.
getClass
(),
new
File
(
"compiler/testData/compileKotlinAgainstKotlin/fir"
),
Pattern
.
compile
(
"^(.+)\\.kt$"
),
null
,
TargetBackend
.
JVM_MULTI_MODULE_OLD_AGAINST_IR
,
true
);
}
@TestMetadata
(
"AnonymousObjectInProperty.kt"
)
public
void
testAnonymousObjectInProperty
()
throws
Exception
{
runTest
(
"compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"
);
}
@TestMetadata
(
"LibraryProperty.kt"
)
public
void
testLibraryProperty
()
throws
Exception
{
runTest
(
"compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录