Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
2636ace5
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2636ace5
编写于
6月 29, 2017
作者:
V
vromero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8182649: Unable to integrate due to compilation error
Reviewed-by: mcimadamore
上级
8bf6b5ab
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
58 addition
and
10 deletion
+58
-10
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
...ompiler/share/classes/com/sun/tools/javac/code/Types.java
+10
-1
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java
...ompiler/share/classes/com/sun/tools/javac/comp/Infer.java
+0
-2
langtools/test/tools/javac/T8182649/AddCheckForPartiallyInferredTypesTest.java
...javac/T8182649/AddCheckForPartiallyInferredTypesTest.java
+41
-0
langtools/test/tools/javac/generics/inference/EagerReturnTypeResolution/EagerReturnTypeResolutionTestb.out
...erReturnTypeResolution/EagerReturnTypeResolutionTestb.out
+6
-6
langtools/test/tools/javac/lambda/8016177/T8016177g.out
langtools/test/tools/javac/lambda/8016177/T8016177g.out
+1
-1
未找到文件。
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
浏览文件 @
2636ace5
/*
* Copyright (c) 2003, 201
6
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
7
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -311,6 +311,15 @@ public class Types {
if
(
tPrimitive
==
sPrimitive
)
{
return
isSubtypeUnchecked
(
t
,
s
,
warn
);
}
boolean
tUndet
=
t
.
hasTag
(
UNDETVAR
);
boolean
sUndet
=
s
.
hasTag
(
UNDETVAR
);
if
(
tUndet
||
sUndet
)
{
return
tUndet
?
isSubtype
(
t
,
boxedTypeOrType
(
s
))
:
isSubtype
(
boxedTypeOrType
(
t
),
s
);
}
return
tPrimitive
?
isSubtype
(
boxedClass
(
t
).
type
,
s
)
:
isSubtype
(
unboxedType
(
t
),
s
);
...
...
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java
浏览文件 @
2636ace5
...
...
@@ -416,8 +416,6 @@ public class Infer {
if
(
needsEagerInstantiation
((
UndetVar
)
qtype
,
to
,
inferenceContext
)
&&
(
allowGraphInference
||
!
to
.
isPrimitive
()))
{
to
=
generateReferenceToTargetConstraint
(
tree
,
(
UndetVar
)
qtype
,
to
,
resultInfo
,
inferenceContext
);
}
else
if
(
to
.
isPrimitive
())
{
to
=
types
.
boxedClass
(
to
).
type
;
}
}
else
if
(
rsInfoInfContext
.
free
(
resultInfo
.
pt
))
{
//propagation - cache captured vars
...
...
langtools/test/tools/javac/T8182649/AddCheckForPartiallyInferredTypesTest.java
0 → 100644
浏览文件 @
2636ace5
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8182649
* @summary Unable to integrate due to compilation error
* @compile AddCheckForPartiallyInferredTypesTest.java
*/
class
AddCheckForPartiallyInferredTypesTest
{
interface
Signed
{}
interface
WordBase
{}
<
S
extends
Signed
>
S
signed
(
int
offset
)
{
return
null
;
}
<
W1
extends
WordBase
>
W1
readWord
(
WordBase
w
,
String
s
)
{
return
null
;
}
<
W2
extends
WordBase
>
W2
readWord
(
int
i
,
String
s
)
{
return
null
;
}
<
W3
extends
WordBase
>
W3
test
()
{
return
readWord
(
signed
(
10
),
""
);
}
}
langtools/test/tools/javac/generics/inference/EagerReturnTypeResolution/EagerReturnTypeResolutionTestb.out
浏览文件 @
2636ace5
...
...
@@ -34,12 +34,12 @@ EagerReturnTypeResolutionTestb.java:110:21: compiler.err.cant.apply.symbol: kind
EagerReturnTypeResolutionTestb.java:112:30: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object)
EagerReturnTypeResolutionTestb.java:113:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>)
EagerReturnTypeResolutionTestb.java:114:24: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List<? super T>,java.util.List<? super T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>,java.lang.Object)
EagerReturnTypeResolutionTestb.java:174:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer
.no.conforming.instance.exists: , T, long
))
EagerReturnTypeResolutionTestb.java:175:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer
.no.conforming.instance.exists: , T, long
))
EagerReturnTypeResolutionTestb.java:176:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer
.no.conforming.instance.exists: , T, long
))
EagerReturnTypeResolutionTestb.java:178:26: compiler.err.prob.found.req: (compiler.misc.infer
.no.conforming.instance.exists: , T, long
)
EagerReturnTypeResolutionTestb.java:179:23: compiler.err.prob.found.req: (compiler.misc.infer
.no.conforming.instance.exists: , T, long
)
EagerReturnTypeResolutionTestb.java:180:26: compiler.err.prob.found.req: (compiler.misc.infer
.no.conforming.instance.exists: , T, long
)
EagerReturnTypeResolutionTestb.java:174:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer
red.do.not.conform.to.upper.bounds: java.lang.Double, java.lang.Long,java.lang.Object
))
EagerReturnTypeResolutionTestb.java:175:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer
red.do.not.conform.to.upper.bounds: java.lang.Double, java.lang.Long,java.lang.Object
))
EagerReturnTypeResolutionTestb.java:176:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer
red.do.not.conform.to.upper.bounds: java.lang.Double, java.lang.Long,java.lang.Double,java.lang.Object
))
EagerReturnTypeResolutionTestb.java:178:26: compiler.err.prob.found.req: (compiler.misc.infer
red.do.not.conform.to.upper.bounds: java.lang.Double, java.lang.Long,java.lang.Object
)
EagerReturnTypeResolutionTestb.java:179:23: compiler.err.prob.found.req: (compiler.misc.infer
red.do.not.conform.to.upper.bounds: java.lang.Double, java.lang.Long,java.lang.Object
)
EagerReturnTypeResolutionTestb.java:180:26: compiler.err.prob.found.req: (compiler.misc.infer
red.do.not.conform.to.upper.bounds: java.lang.Double, java.lang.Long,java.lang.Double,java.lang.Object
)
- compiler.note.unchecked.filename: EagerReturnTypeResolutionTestb.java
- compiler.note.unchecked.recompile
42 errors
langtools/test/tools/javac/lambda/8016177/T8016177g.out
浏览文件 @
2636ace5
T8016177g.java:34:14: compiler.err.cant.apply.symbol: kindname.method, print, java.lang.String, Test.Person, kindname.class, Test, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.upper.lower.bounds: R, java.lang.String,java.lang.Object, Test.Person))
T8016177g.java:35:20: compiler.err.cant.apply.symbol: kindname.method, abs, int, java.lang.Double, kindname.class, Test, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer
.no.conforming.instance.exists: , R, in
t))
T8016177g.java:35:20: compiler.err.cant.apply.symbol: kindname.method, abs, int, java.lang.Double, kindname.class, Test, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer
red.do.not.conform.to.upper.bounds: java.lang.Double, java.lang.Integer,java.lang.Objec
t))
2 errors
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录