8034048: javac crash with method references plus lambda plus var args
Reviewed-by: jjg, vromero
Contributed-by: paul.govereau@oracle.com
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java Tue Feb 25 14:06:48 2014 -0500
+++ b/langtools/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;
}