When defining a so called polymorphic SOQL query in a usual Apex class, Illuminated Cloud shows a syntax error with
',' expected, got 'WHEN'
SELECT Id, TYPEOF Owner WHEN User THEN UserType END, CreatedBy.UserType FROM Lead
The error only shows up in the IDE, the Apex class can be saved to the target org successfully anyway.
See https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_typeof.htm for a description of the TYPEOF syntax.