Fix type inference in TestValue

This commit is contained in:
Michael Miller 2019-08-08 17:05:44 -06:00
parent 1222e24836
commit 2eb51b9c41

View file

@ -7,13 +7,13 @@ module Spectator
getter value : T getter value : T
# Creates the expression value with a custom label. # Creates the expression value with a custom label.
def initialize(@value, label : String) def initialize(@value : T, label : String)
super(label) super(label)
end end
# Creates the expression with a stringified value. # Creates the expression with a stringified value.
# This is used for the "should" syntax and when the label doesn't matter. # This is used for the "should" syntax and when the label doesn't matter.
def initialize(@value) def initialize(@value : T)
super(@value.to_s) super(@value.to_s)
end end