blob: 909436072a141138ba711b6f8edf7cc8a673d9ad [file] [log] [blame]
Mads Ager418d1ca2017-05-22 09:35:49 +02001// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4package memberrebinding2;
5
6import java.util.ArrayList;
7import java.util.Arrays;
8
9public class ClassExtendsLibraryClass extends ArrayList<String> {
10
11 private static <T> void addOnArrayList(ArrayList<T> list, T item) {
12 list.add(item);
13 }
14
15 public void methodThatAddsHelloWorldUsingAddAll() {
16 // call this only on this type, so that it cannot be rebound to the interface.
17 String[] words = new String[]{"hello", "world"};
18 addAll(Arrays.asList(words));
19 }
20
21}