Closed elliotchance closed 6 years ago
Can you please say what do you mean, and maybe i can help with this one.
Add := tf.Function(t, func (a, b int64) int64 {
return a + b
})
Add(3, 4).Returns(7) // fails because int(3) isn't compatible with int64(3), etc
If the compiler knew the destination type it would handle most of these castings automation.
@elliotchance i will jump on this.
For example trying to pass in an
int
to anint64
results in a panic. It should handle any casting that the compiler would normally handle.