boo-lang / boo

The Boo Programming Language.
BSD 3-Clause "New" or "Revised" License
874 stars 148 forks source link

Problem resolving mixed generic/non-generic overload taking a closure as an argument #160

Closed masonwheeler closed 7 years ago

masonwheeler commented 7 years ago
x as int
System.Threading.Tasks.Task.Factory.StartNew({ x = 42 })

Expected: This should compile.

Observed: Overload resolution fails for argument of type error.

This appears to be happening because ProcessMethodBodies.OnBlockExpression defers processing of closures being passed to an overloaded method in which any of the overloads are generic methods, so that generic type references can be inferred properly later on. But in this case, there are no generic type references; we're trying to reach the non-generic overload that takes a single argument of type Action, and there is no code in the compiler that handles deferred processing in that case.

masonwheeler commented 7 years ago

Fixed this as part of the async/await merge.