changeset 3221:008f76d3209a

8034048: javac crash with method references plus lambda plus var args Reviewed-by: jjg, vromero Contributed-by: paul.govereau@oracle.com
author jjg
date Wed, 26 Feb 2014 15:38:55 -0800
parents dba1aba053aa
children e656b4d10580
files src/share/classes/com/sun/tools/javac/comp/TransTypes.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Tue Feb 25 14:06:48 2014 -0500
+++ b/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Wed Feb 26 15:38:55 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -834,6 +834,8 @@
     public void visitReference(JCMemberReference tree) {
         tree.expr = translate(tree.expr, erasure(tree.expr.type));
         tree.type = erasure(tree.type);
+        if (tree.varargsElement != null)
+            tree.varargsElement = erasure(tree.varargsElement);
         result = tree;
     }