Open dpaoliello opened 6 months ago
Given a constant that is calculated with a shift:
#define MY_CONST (1<<4)
Then trying to use --with-type with this constant (e.g., --with-type=MY_CONST=ushort), constants scraper will produce the following code:
--with-type
--with-type=MY_CONST=ushort
public const ushort MY_CONST = 1u<<4;
Which is invalid:
error CS0266: Cannot implicitly convert type 'uint' to 'ushort'. An explicit conversion exists (are you missing a cast?)
Given a constant that is calculated with a shift:
Then trying to use
--with-type
with this constant (e.g.,--with-type=MY_CONST=ushort
), constants scraper will produce the following code:Which is invalid: