Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
dadffebe
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,发现更多精彩内容 >>
提交
dadffebe
编写于
11月 25, 2016
作者:
A
Alexey Andreev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support `external` modifier in descriptor renderer. Update test data.
上级
7e37d5d6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
17 deletion
+20
-17
compiler/testData/diagnostics/testsWithJsStdLib/native/nested.txt
.../testData/diagnostics/testsWithJsStdLib/native/nested.txt
+4
-4
compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.txt
...agnostics/testsWithJsStdLib/native/optionlBody/native.txt
+3
-3
compiler/testData/diagnostics/testsWithStdLib/native/nonFunction.txt
...stData/diagnostics/testsWithStdLib/native/nonFunction.txt
+4
-4
core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt
...c/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt
+9
-6
未找到文件。
compiler/testData/diagnostics/testsWithJsStdLib/native/nested.txt
浏览文件 @
dadffebe
...
...
@@ -12,9 +12,9 @@ public object O {
public final class TopLevel {
public constructor TopLevel()
public final val x: kotlin.String = "a"
public final val y: kotlin.String
public
external
final val y: kotlin.String
public final val O.u: kotlin.String
public final val O.v: kotlin.String
public
external
final val O.v: kotlin.String
public final external fun bar(): kotlin.Int
@kotlin.js.native public final fun baz(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
...
...
@@ -40,9 +40,9 @@ public final class TopLevel {
public final class TopLevelNative {
public constructor TopLevelNative()
public final val x: kotlin.String = "a"
public final val y: kotlin.String
public
external
final val y: kotlin.String
public final val O.u: kotlin.String
public final val O.v: kotlin.String
public
external
final val O.v: kotlin.String
public final external fun bar(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public final fun foo(): kotlin.Int
...
...
compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.txt
浏览文件 @
dadffebe
package
public val baz: kotlin.Int
public val boo: kotlin.Int
public val kotlin.Int.baz: kotlin.Int
public
external
val baz: kotlin.Int
public
external
val boo: kotlin.Int
public
external
val kotlin.Int.baz: kotlin.Int
public external fun bar(): kotlin.Unit
public external fun foo(): kotlin.Unit
public external fun kotlin.String.bar(): kotlin.Int
...
...
compiler/testData/diagnostics/testsWithStdLib/native/nonFunction.txt
浏览文件 @
dadffebe
package
public val foo: kotlin.Int = 23
public
external
val foo: kotlin.Int = 23
public final class A {
public
external
final class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
...
...
@@ -11,12 +11,12 @@ public final class A {
public final class B {
public constructor B()
public final val foo: kotlin.Int = 23
public
external
final val foo: kotlin.Int = 23
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public final class A {
public
external
final class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
...
...
core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt
浏览文件 @
dadffebe
...
...
@@ -515,6 +515,12 @@ internal class DescriptorRendererImpl(
}
}
private
fun
renderExternal
(
memberDescriptor
:
MemberDescriptor
,
builder
:
StringBuilder
)
{
if
(
memberDescriptor
.
isExternal
)
{
builder
.
append
(
"external "
)
}
}
private
fun
renderLateInit
(
propertyDescriptor
:
PropertyDescriptor
,
builder
:
StringBuilder
)
{
if
(
propertyDescriptor
.
isLateInit
)
{
builder
.
append
(
"lateinit "
)
...
...
@@ -528,9 +534,7 @@ internal class DescriptorRendererImpl(
if
(
functionDescriptor
.
isInfix
&&
(
functionDescriptor
.
overriddenDescriptors
.
none
{
it
.
isInfix
}
||
alwaysRenderModifiers
))
{
builder
.
append
(
"infix "
)
}
if
(
functionDescriptor
.
isExternal
)
{
builder
.
append
(
"external "
)
}
renderExternal
(
functionDescriptor
,
builder
)
if
(
functionDescriptor
.
isInline
)
{
builder
.
append
(
"inline "
)
}
...
...
@@ -839,6 +843,7 @@ internal class DescriptorRendererImpl(
builder
.
append
(
"const "
)
}
renderExternal
(
property
,
builder
)
renderModalityForCallable
(
property
,
builder
)
renderOverride
(
property
,
builder
)
renderLateInit
(
property
,
builder
)
...
...
@@ -984,9 +989,7 @@ internal class DescriptorRendererImpl(
}
private
fun
renderAccessorModifiers
(
descriptor
:
PropertyAccessorDescriptor
,
builder
:
StringBuilder
)
{
if
(
descriptor
.
isExternal
)
{
builder
.
append
(
"external "
)
}
renderExternal
(
descriptor
,
builder
)
}
/* STUPID DISPATCH-ONLY VISITOR */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录