ceylon/ceylon-spec — Issue #68: Take parameterized upper bounds into account when infering type args
Author: gavinking
Created: 2011-11-25 05:06:08+00:00
State: open
Labels: improvement

I just committed @29abac5 which is a partial solution to the problem of taking upper bound constraints into account in the type inference algorithm. But it has a huge hole in it: it ignores any upper bound which is a parametrized type, since such an upper bound might refer to the type parameters we're trying to infer.

Nevertheless, this change was necessary to get the type arg inference to do the right thing for `coalesce()`, where you have a parameter of type `Element? given Element satisfies Object`. Without taking the constraint into account, it infers `String?` instead of `String`.