< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java

Print this page

        

*** 659,670 **** --- 659,674 ---- tree.args.length(), argtypes.length())); } tree.args = translateArgs(tree.args, argtypes, tree.varargsElement); tree.type = types.erasure(tree.type); + Object constant = tree.type.constValue(); // Insert casts of method invocation results as needed. result = retype(tree, mt.getReturnType(), pt); + if (constant != null) { + tree.type = tree.type.constType(constant); + } } public void visitNewClass(JCNewClass tree) { if (tree.encl != null) { if (tree.def == null) {
< prev index next >