equal
deleted
inserted
replaced
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); |