test/tools/javac/lambda/methodReference/SamConversion.java

changeset 1435
9b26c96f5138
parent 1415
01c9d4161882
child 1510
7873d37f5b37
equal deleted inserted replaced
1434:34d1ebaf4645 1435:9b26c96f5138
131 try { 131 try {
132 assertTrue(bar.m(1) == 6); 132 assertTrue(bar.m(1) == 6);
133 } catch (Exception e) { 133 } catch (Exception e) {
134 assertTrue(false); 134 assertTrue(false);
135 } 135 }
136
137 bar = new A()::method6;
138 try {
139 bar.m(1);
140 assertTrue(false);
141 } catch (MyException e) {
142 } catch (Exception e) {
143 assertTrue(false);
144 }
145 } 136 }
146 137
147 /** 138 /**
148 * Test SAM conversion of method reference in method/constructor argument context 139 * Test SAM conversion of method reference in method/constructor argument context
149 */ 140 */

mercurial