Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
53357436
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,发现更多精彩内容 >>
提交
53357436
编写于
9月 06, 2011
作者:
A
Andrey Breslav
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Weird Javac compilation problem fixed
上级
3242c70c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
17 deletion
+19
-17
idea/src/org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java
...org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java
+19
-17
未找到文件。
idea/src/org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java
浏览文件 @
53357436
...
...
@@ -16,7 +16,7 @@ import java.util.List;
/**
* @author abreslav
*/
/*package*/
abstract
class
TaskPrioritizer
<
D
escriptor
extends
CallableDescriptor
>
{
/*package*/
abstract
class
TaskPrioritizer
<
D
extends
CallableDescriptor
>
{
public
static
<
T
extends
DeclarationDescriptor
>
void
splitLexicallyLocalDescriptors
(
Collection
<?
extends
T
>
allDescriptors
,
DeclarationDescriptor
containerOfTheCurrentLocality
,
List
<?
super
T
>
local
,
List
<?
super
T
>
nonlocal
)
{
...
...
@@ -59,27 +59,29 @@ import java.util.List;
return
false
;
}
public
List
<
ResolutionTask
<
D
escriptor
>>
computePrioritizedTasks
(
JetScope
scope
,
JetType
receiverType
,
Call
call
,
String
name
)
{
List
<
ResolutionTask
<
D
escriptor
>>
result
=
Lists
.
newArrayList
();
public
List
<
ResolutionTask
<
D
>>
computePrioritizedTasks
(
JetScope
scope
,
JetType
receiverType
,
Call
call
,
String
name
)
{
List
<
ResolutionTask
<
D
>>
result
=
Lists
.
newArrayList
();
if
(
receiverType
!=
null
)
{
Collection
<
D
escriptor
>
extensionFunctions
=
getExtensionsByName
(
scope
,
name
);
Collection
<
D
>
extensionFunctions
=
getExtensionsByName
(
scope
,
name
);
List
<
Descriptor
>
nonlocals
=
Lists
.
newArrayList
();
List
<
Descriptor
>
locals
=
Lists
.
newArrayList
();
splitLexicallyLocalDescriptors
(
extensionFunctions
,
scope
.
getContainingDeclaration
(),
locals
,
nonlocals
);
List
<
D
>
nonlocals
=
Lists
.
newArrayList
();
List
<
D
>
locals
=
Lists
.
newArrayList
();
//noinspection unchecked,RedundantTypeArguments
TaskPrioritizer
.<
D
>
splitLexicallyLocalDescriptors
(
extensionFunctions
,
scope
.
getContainingDeclaration
(),
locals
,
nonlocals
);
Collection
<
D
escriptor
>
members
=
getMembersByName
(
receiverType
,
name
);
Collection
<
D
>
members
=
getMembersByName
(
receiverType
,
name
);
addTask
(
result
,
receiverType
,
call
,
locals
);
addTask
(
result
,
null
,
call
,
members
);
addTask
(
result
,
receiverType
,
call
,
nonlocals
);
}
else
{
Collection
<
D
escriptor
>
functions
=
getNonExtensionsByName
(
scope
,
name
);
Collection
<
D
>
functions
=
getNonExtensionsByName
(
scope
,
name
);
List
<
Descriptor
>
nonlocals
=
Lists
.
newArrayList
();
List
<
Descriptor
>
locals
=
Lists
.
newArrayList
();
splitLexicallyLocalDescriptors
(
functions
,
scope
.
getContainingDeclaration
(),
locals
,
nonlocals
);
List
<
D
>
nonlocals
=
Lists
.
newArrayList
();
List
<
D
>
locals
=
Lists
.
newArrayList
();
//noinspection unchecked,RedundantTypeArguments
TaskPrioritizer
.<
D
>
splitLexicallyLocalDescriptors
(
functions
,
scope
.
getContainingDeclaration
(),
locals
,
nonlocals
);
addTask
(
result
,
receiverType
,
call
,
locals
);
...
...
@@ -89,20 +91,20 @@ import java.util.List;
}
@NotNull
protected
abstract
Collection
<
D
escriptor
>
getNonExtensionsByName
(
JetScope
scope
,
String
name
);
protected
abstract
Collection
<
D
>
getNonExtensionsByName
(
JetScope
scope
,
String
name
);
@NotNull
protected
abstract
Collection
<
D
escriptor
>
getMembersByName
(
@NotNull
JetType
receiverType
,
String
name
);
protected
abstract
Collection
<
D
>
getMembersByName
(
@NotNull
JetType
receiverType
,
String
name
);
@NotNull
protected
abstract
Collection
<
D
escriptor
>
getExtensionsByName
(
JetScope
scope
,
String
name
);
protected
abstract
Collection
<
D
>
getExtensionsByName
(
JetScope
scope
,
String
name
);
private
void
addTask
(
@NotNull
List
<
ResolutionTask
<
D
escriptor
>>
result
,
@Nullable
JetType
receiverType
,
@NotNull
Call
call
,
@NotNull
Collection
<
Descriptor
>
candidates
)
{
private
void
addTask
(
@NotNull
List
<
ResolutionTask
<
D
>>
result
,
@Nullable
JetType
receiverType
,
@NotNull
Call
call
,
@NotNull
Collection
<
D
>
candidates
)
{
if
(
candidates
.
isEmpty
())
return
;
result
.
add
(
createTask
(
receiverType
,
call
,
candidates
));
}
@NotNull
protected
abstract
ResolutionTask
<
D
escriptor
>
createTask
(
JetType
receiverType
,
Call
call
,
Collection
<
Descriptor
>
candidates
);
protected
abstract
ResolutionTask
<
D
>
createTask
(
JetType
receiverType
,
Call
call
,
Collection
<
D
>
candidates
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录