Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
a9831379
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 搜索 >>
提交
a9831379
编写于
6月 28, 2017
作者:
Y
Yan Zhulanow
提交者:
Yan Zhulanow
7月 12, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Kapt: Handle parameter with Java names clashing with Java keywords properly (KT-18377)
上级
e56e3d78
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
2 deletion
+23
-2
plugins/kapt3/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt
...ains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt
+1
-1
plugins/kapt3/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java
...pt3/test/ClassFileToSourceStubConverterTestGenerated.java
+6
-0
plugins/kapt3/testData/converter/kt18377.kt
plugins/kapt3/testData/converter/kt18377.kt
+3
-0
plugins/kapt3/testData/converter/kt18377.txt
plugins/kapt3/testData/converter/kt18377.txt
+12
-0
plugins/kapt3/testData/converter/strangeIdentifiers.txt
plugins/kapt3/testData/converter/strangeIdentifiers.txt
+1
-1
未找到文件。
plugins/kapt3/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt
浏览文件 @
a9831379
...
...
@@ -437,7 +437,7 @@ class ClassFileToSourceStubConverter(
info
.
visibleAnnotations
,
info
.
invisibleAnnotations
)
val
name
=
treeMaker
.
name
(
getValidIdentifierName
(
info
.
name
)
?:
"p${index}_"
+
info
.
name
.
hashCode
())
val
name
=
treeMaker
.
name
(
getValidIdentifierName
(
info
.
name
)
?:
"p${index}_"
+
info
.
name
.
hashCode
()
.
ushr
(
1
)
)
val
type
=
treeMaker
.
Type
(
info
.
type
)
treeMaker
.
VarDef
(
modifiers
,
name
,
type
,
null
)
}
...
...
plugins/kapt3/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java
浏览文件 @
a9831379
...
...
@@ -180,6 +180,12 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi
doTest
(
fileName
);
}
@TestMetadata
(
"kt18377.kt"
)
public
void
testKt18377
()
throws
Exception
{
String
fileName
=
KotlinTestUtils
.
navigationMetadata
(
"plugins/kapt3/testData/converter/kt18377.kt"
);
doTest
(
fileName
);
}
@TestMetadata
(
"mapEntry.kt"
)
public
void
testMapEntry
()
throws
Exception
{
String
fileName
=
KotlinTestUtils
.
navigationMetadata
(
"plugins/kapt3/testData/converter/mapEntry.kt"
);
...
...
plugins/kapt3/testData/converter/kt18377.kt
0 → 100644
浏览文件 @
a9831379
import
java.util.Date
fun
Date
(
double
:
Double
):
Date
=
Date
(
double
.
times
(
1000
).
toLong
())
\ No newline at end of file
plugins/kapt3/testData/converter/kt18377.txt
0 → 100644
浏览文件 @
a9831379
@kotlin.Metadata()
public final class Kt18377Kt {
public Kt18377Kt() {
super();
}
@org.jetbrains.annotations.NotNull()
public static final java.util.Date Date(double p0_1484504552) {
return null;
}
}
plugins/kapt3/testData/converter/strangeIdentifiers.txt
浏览文件 @
a9831379
...
...
@@ -50,7 +50,7 @@ public final class Test {
public final void strangeFun4(@org.jetbrains.annotations.NotNull()
java.lang.String a, @org.jetbrains.annotations.NotNull()
java.lang.String p1_
1899121793
) {
java.lang.String p1_
949560896
) {
}
public Test() {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录