Down-cast to preven type issues when inferring arrays

This commit is contained in:
Michael Miller 2018-11-16 11:38:50 -07:00
parent c045305bd2
commit ee2491fef8

View file

@ -20,7 +20,7 @@ def new_expectation(expected : ExpectedType = 123, actual : ActualType = 123) fo
partial = new_partial("foo", actual)
matcher = new_matcher("bar", expected)
matched = matcher.match?(partial)
Spectator::Expectations::ValueExpectation.new(matched, false, partial, matcher)
Spectator::Expectations::ValueExpectation.new(matched, false, partial, matcher).as(Spectator::Expectations::Expectation)
end
def new_satisfied_expectation(value : T = 123) forall T