-
An incremental generator can use May be similar / related to #61094 Workarounds
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There isn't a way to do this natively, and your workarounds are probably your best bets. I think we've had this request before, right @chsienki? |
Beta Was this translation helpful? Give feedback.
I'm not sure if we've had this specific request, but definitely seen things similar to it, mainly about allowing generated code to target the highest langver by default. That works when the compiler is up to date but people are using an explicit lower language version, but doesn't work if people are targeting different compiler versions.
In general though, I suppose we (compiler team) might want to consider making the lang version available as a constant for this purpose as it seems useful.
I see two options depending on the scenario: