langtools/test/tools/javac/diags/examples/WhereFreshTvar.java
changeset 15717 ab55670d2e62
parent 13438 83729994273a
child 39812 6272642715a1
equal deleted inserted replaced
15716:d1f59adb0d83 15717:ab55670d2e62
     1 /*
     1 /*
     2  * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    22  */
    22  */
    23 
    23 
    24 // key: compiler.misc.where.fresh.typevar
    24 // key: compiler.misc.where.fresh.typevar
    25 // key: compiler.misc.where.description.typevar
    25 // key: compiler.misc.where.description.typevar
    26 // key: compiler.err.prob.found.req
    26 // key: compiler.err.prob.found.req
    27 // key: compiler.misc.inferred.do.not.conform.to.upper.bounds
    27 // key: compiler.misc.inconvertible.types
    28 // options: -XDdiags=where,simpleNames
    28 // options: -XDdiags=where,simpleNames
    29 // run: simple
    29 // run: simple
    30 
    30 
    31 import java.util.*;
    31 import java.util.*;
    32 
    32 
    33 class WhereFreshTvar {
    33 class WhereFreshTvar {
    34     <T extends List<T>> T m() {}
    34     <T extends List<T>> T m() {}
    35 
    35 
    36     { List<String> ls = m(); }
    36     { Object o = (List<String>)m(); }
    37 }
    37 }