Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
e0a8e9a6
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,体验更适合开发者的 AI 搜索 >>
提交
e0a8e9a6
编写于
3月 19, 2021
作者:
V
Victor Petukhov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Do updating calls for all nested builder inference sessions including at the same level
上级
999d1f98
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
97 addition
and
3 deletion
+97
-3
compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
...test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
+6
-0
compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/BuilderInferenceSession.kt
...kotlin/resolve/calls/inference/BuilderInferenceSession.kt
+5
-3
compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt
...pDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt
+49
-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
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
...js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
+5
-0
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java
...lin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java
+5
-0
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java
...s/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java
+5
-0
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
...js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
+5
-0
未找到文件。
compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
浏览文件 @
e0a8e9a6
...
...
@@ -17065,6 +17065,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt");
}
@Test
@TestMetadata("topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt")
public void testTopDownCompletionWithThreeBuilderInferenceCallsSameLevel() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt");
}
@Test
@TestMetadata("topDownCompletionWithTwoBuilderInferenceCalls.kt")
public void testTopDownCompletionWithTwoBuilderInferenceCalls() throws Exception {
compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/BuilderInferenceSession.kt
浏览文件 @
e0a8e9a6
...
...
@@ -53,11 +53,11 @@ class BuilderInferenceSession(
)
:
ManyCandidatesResolver
<
CallableDescriptor
>(
psiCallResolver
,
postponedArgumentsAnalyzer
,
kotlinConstraintSystemCompleter
,
callComponents
,
builtIns
)
{
var
nestedBuilderInferenceSession
:
BuilderInferenceSession
?
=
null
private
var
nestedBuilderInferenceSessions
:
MutableSet
<
BuilderInferenceSession
>
=
mutableSetOf
()
init
{
if
(
topLevelCallContext
.
inferenceSession
is
BuilderInferenceSession
)
{
topLevelCallContext
.
inferenceSession
.
nestedBuilderInferenceSession
=
this
topLevelCallContext
.
inferenceSession
.
nestedBuilderInferenceSession
s
.
add
(
this
)
}
}
...
...
@@ -232,7 +232,9 @@ class BuilderInferenceSession(
updateCalls
(
lambda
,
resultingSubstitutor
,
commonSystem
.
errors
)
nestedBuilderInferenceSession
?.
updateAllCalls
(
substitutor
,
commonSystem
,
lambda
)
for
(
nestedSession
in
nestedBuilderInferenceSessions
)
{
nestedSession
.
updateAllCalls
(
substitutor
,
commonSystem
,
lambda
)
}
}
override
fun
shouldCompleteResolvedSubAtomsOf
(
resolvedCallAtom
:
ResolvedCallAtom
)
=
true
...
...
compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt
0 → 100644
浏览文件 @
e0a8e9a6
// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED
// WITH_RUNTIME
import
kotlin.experimental.ExperimentalTypeInference
@OptIn
(
ExperimentalTypeInference
::
class
)
class
A1
<
T
>
{
fun
<
BT1
>
builder1
(
@BuilderInference
configure
:
A2
<
BT1
>.()
->
Unit
)
{}
}
@OptIn
(
ExperimentalTypeInference
::
class
)
class
A2
<
A2_BT1
>
{
fun
<
BT2
>
builder2
(
@BuilderInference
configure
:
A3
<
A2_BT1
,
BT2
>.()
->
Unit
)
{}
}
@OptIn
(
ExperimentalTypeInference
::
class
)
class
A3
<
A3_BT1
,
A3_BT2
>
{
fun
<
BT3
>
builder3
(
@BuilderInference
configure
:
A4
<
A3_BT1
,
A3_BT2
,
BT3
>.()
->
Unit
)
{}
}
class
A4
<
A3_BT1
,
A3_BT2
,
A3_BT3
>
{
fun
resolver
(
x
:
A3_BT3
)
{}
}
fun
foo
(
x
:
A1
<
String
>)
{
x
.
builder1
<
String
>
{
builder2
<
String
>
{
builder3
{
resolver
(
""
)
}
builder3
{
resolver
(
""
)
}
}
builder2
<
String
>
{
builder3
{
resolver
(
""
)
}
builder3
{
resolver
(
""
)
}
}
}
}
fun
box
():
String
{
foo
(
A1
())
return
"OK"
}
\ No newline at end of file
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java
浏览文件 @
e0a8e9a6
...
...
@@ -17065,6 +17065,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt");
}
@Test
@TestMetadata("topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt")
public void testTopDownCompletionWithThreeBuilderInferenceCallsSameLevel() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt");
}
@Test
@TestMetadata("topDownCompletionWithTwoBuilderInferenceCalls.kt")
public void testTopDownCompletionWithTwoBuilderInferenceCalls() throws Exception {
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
浏览文件 @
e0a8e9a6
...
...
@@ -17065,6 +17065,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt");
}
@Test
@TestMetadata("topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt")
public void testTopDownCompletionWithThreeBuilderInferenceCallsSameLevel() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt");
}
@Test
@TestMetadata("topDownCompletionWithTwoBuilderInferenceCalls.kt")
public void testTopDownCompletionWithTwoBuilderInferenceCalls() throws Exception {
compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java
浏览文件 @
e0a8e9a6
...
...
@@ -14132,6 +14132,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt");
}
@TestMetadata("topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt")
public void testTopDownCompletionWithThreeBuilderInferenceCallsSameLevel() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt");
}
@TestMetadata("topDownCompletionWithTwoBuilderInferenceCalls.kt")
public void testTopDownCompletionWithTwoBuilderInferenceCalls() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithTwoBuilderInferenceCalls.kt");
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
浏览文件 @
e0a8e9a6
...
...
@@ -12416,6 +12416,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt");
}
@TestMetadata("topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt")
public void testTopDownCompletionWithThreeBuilderInferenceCallsSameLevel() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt");
}
@TestMetadata("topDownCompletionWithTwoBuilderInferenceCalls.kt")
public void testTopDownCompletionWithTwoBuilderInferenceCalls() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithTwoBuilderInferenceCalls.kt");
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java
浏览文件 @
e0a8e9a6
...
...
@@ -11837,6 +11837,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt");
}
@TestMetadata("topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt")
public void testTopDownCompletionWithThreeBuilderInferenceCallsSameLevel() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt");
}
@TestMetadata("topDownCompletionWithTwoBuilderInferenceCalls.kt")
public void testTopDownCompletionWithTwoBuilderInferenceCalls() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithTwoBuilderInferenceCalls.kt");
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java
浏览文件 @
e0a8e9a6
...
...
@@ -11902,6 +11902,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt");
}
@TestMetadata("topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt")
public void testTopDownCompletionWithThreeBuilderInferenceCallsSameLevel() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt");
}
@TestMetadata("topDownCompletionWithTwoBuilderInferenceCalls.kt")
public void testTopDownCompletionWithTwoBuilderInferenceCalls() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithTwoBuilderInferenceCalls.kt");
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
浏览文件 @
e0a8e9a6
...
...
@@ -6308,6 +6308,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt");
}
@TestMetadata("topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt")
public void testTopDownCompletionWithThreeBuilderInferenceCallsSameLevel() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt");
}
@TestMetadata("topDownCompletionWithTwoBuilderInferenceCalls.kt")
public void testTopDownCompletionWithTwoBuilderInferenceCalls() throws Exception {
runTest("compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithTwoBuilderInferenceCalls.kt");
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录