langtools/src/share/classes/com/sun/tools/javac/code/Types.java
changeset 10634 7f15f5a11ae9
parent 10453 41fe3e16698a
child 10810 9444a714fdaf
equal deleted inserted replaced
10633:5dd595ab058e 10634:7f15f5a11ae9
   506             }
   506             }
   507 
   507 
   508             @Override
   508             @Override
   509             public Boolean visitUndetVar(UndetVar t, Type s) {
   509             public Boolean visitUndetVar(UndetVar t, Type s) {
   510                 //todo: test against origin needed? or replace with substitution?
   510                 //todo: test against origin needed? or replace with substitution?
   511                 if (t == s || t.qtype == s || s.tag == ERROR || s.tag == UNKNOWN)
   511                 if (t == s || t.qtype == s || s.tag == ERROR || s.tag == UNKNOWN) {
   512                     return true;
   512                     return true;
       
   513                 } else if (s.tag == BOT) {
       
   514                     //if 's' is 'null' there's no instantiated type U for which
       
   515                     //U <: s (but 'null' itself, which is not a valid type)
       
   516                     return false;
       
   517                 }
   513 
   518 
   514                 if (t.inst != null)
   519                 if (t.inst != null)
   515                     return isSubtypeNoCapture(t.inst, s); // TODO: ", warn"?
   520                     return isSubtypeNoCapture(t.inst, s); // TODO: ", warn"?
   516 
   521 
   517                 t.hibounds = t.hibounds.prepend(s);
   522                 t.hibounds = t.hibounds.prepend(s);