equal
deleted
inserted
replaced
46 //anon class |
46 //anon class |
47 Block<Object> ba1 = t -> { |
47 Block<Object> ba1 = t -> { |
48 new Object() { |
48 new Object() { |
49 String get() { return ""; } |
49 String get() { return ""; } |
50 }; |
50 }; |
51 assertTrue(t == 1); |
51 assertTrue((Integer)t == 1); |
52 }; |
52 }; |
53 ba1.apply(1); |
53 ba1.apply(1); |
54 |
54 |
55 //local class |
55 //local class |
56 Block<Object> ba2 = t -> { |
56 Block<Object> ba2 = t -> { |
57 class A { |
57 class A { |
58 String get() { return ""; } |
58 String get() { return ""; } |
59 }; |
59 }; |
60 new A(); |
60 new A(); |
61 assertTrue(t == 2); |
61 assertTrue((Integer)t == 2); |
62 }; |
62 }; |
63 ba2.apply(2); |
63 ba2.apply(2); |
64 assertTrue(assertionCount == 2); |
64 assertTrue(assertionCount == 2); |
65 } |
65 } |
66 } |
66 } |