Add Type.Equal(Type) bool
function to compare Cadence types efficiently
#2199
Labels
Type.Equal(Type) bool
function to compare Cadence types efficiently
#2199
Issue To Be Solved
Checking if
cadence.Type
are equal is currently done by comparingType.ID()
. It should be possible to provide a more efficient way to do this comparison in Go.Suggested Solution
One solution is to add
Type.Equal(Type) bool
function tocadence.Type
interface.During brief chat about this on Slack, @turbolent confirmed we don't currently have a utility function to do this comparison and also mentioned it should be possible to do recursive comparison without allocating.
The text was updated successfully, but these errors were encountered: