Inspection Issue: SObject internal field named same as SObject.

Issue #867 resolved
Justin Julicher created an issue

Working with some legacy stuff here, we have an Custom Setting called Valskip__c and it has an boolean field called Valskip__c (boolean). In the code we are creating a Valskip__c object with:

vs = new Valskip__c(setupownerid = UserInfo.getUserId(), **Valskip__c = validationSkip**);
        }

On the last part where it's assigning Valskip__c = validationSkip (a boolean value) , Illuminated cloud is giving an inspection error:

'Illegal assignment from Boolean to Valskip__c'

Comments (4)

  1. Scott Wells repo owner

    Thanks for filing and for the example. Should hopefully be easy to reproduce and (even more hopefully!) fix.

  2. Scott Wells repo owner

    Yup, easily reproduced. That field reference is resolving to the default constructor for the custom setting instead of the field declaration. I'll try to fix it for tomorrow's build.

  3. Log in to comment