Fix type inference

This commit is contained in:
Michael Miller 2019-08-06 23:20:23 -06:00
parent 436c10cad6
commit 98b2cbc9cb
2 changed files with 4 additions and 4 deletions

View file

@ -7,9 +7,9 @@ module Spectator::Matchers
# Matcher for checking that the contents of one array (or similar type) # Matcher for checking that the contents of one array (or similar type)
# has the exact same contents as another and in the same order. # has the exact same contents as another and in the same order.
struct ArrayMatcher(ExpectedType) < Matcher struct ArrayMatcher(ExpectedType) < Matcher
private getter expected : TestValue(ExpectedType) private getter expected
def initialize(@expected) def initialize(@expected : TestValue(Enumerable(ExpectedType)))
end end
def description def description

View file

@ -6,11 +6,11 @@ module Spectator::Matchers
abstract struct ValueMatcher(ExpectedType) < StandardMatcher abstract struct ValueMatcher(ExpectedType) < StandardMatcher
# Expected value. # Expected value.
# Sub-types may use this value to test the expectation and generate message strings. # Sub-types may use this value to test the expectation and generate message strings.
private getter expected : TestValue(ExpectedType) private getter expected
# Creates the value matcher. # Creates the value matcher.
# The expected value is stored for later use. # The expected value is stored for later use.
def initialize(@expected) def initialize(@expected : TestValue(ExpectedType))
end end
private def values(actual) private def values(actual)