whenValue on switch statements once again not working for all edge cases. When trying to match enum values this time. It also falls through the literal or id check and fails to parse the full value correctly if the enum type is not a single word. For example:
This does not fit into whenLiteral correctly, and doesn't fit the syntax used for SObjects which is typeRef id so it picks "Class" as a name.
After fixing this, you can have an enum value detected as either a literal id or type so handling will get more complicated downstream.
ref switch docs
whenValueon switch statements once again not working for all edge cases. When trying to match enum values this time. It also falls through theliteraloridcheck and fails to parse the full value correctly if the enum type is not a single word. For example:This does not fit into
whenLiteralcorrectly, and doesn't fit the syntax used for SObjects which istypeRef idso it picks "Class" as a name.After fixing this, you can have an enum value detected as either a literal id or type so handling will get more complicated downstream.
ref switch docs