I'm currently working on a Macro to generate DTO type.
While doing so and to provide a good user experience I try to use Swift-diagnostic to provide error messages and fixit actions.
One of the fixit I'm trying to provide is to ensure that 2 types are identical and if not replace one by the other.
more specifically I use an attached macro of this form :
@ConvertDTOType(from: Int, to: Amount, convert: {Amount(withCents: $0)})
var amount: Amount
Where "to: TYPE" must be identical to 'amount: TYPE'.
where destTypeNode is the node of the 'to: TYPE' type in the @attribute and propertyType is the type of the property (amount in the previous example).
My problème is that this fixit is greyed out and therefore doesn't work.
However if I switch the 2 values of oldNode and newNode
Then the fixit works be replacing the property type with the attribute type (the opposite of what I want)
Am I missing something here, note that I'm very new with swiftSyntax framework and even newer with swift diagnostic so any help will be appreciated.