Hello,
This looks like a simple type error =) It seems like the code is trying to assign a supertype value to a subtype variable.
For example, let's say you have a type Dog which is a subtype of Animal. You can't assign an Animal value to a Dog variable because Animal is missing some properties of Dog. For example, Animal can't necessarily bark or lick or wag a tail. So if you tried to call .bark() on that Animal value, it would throw an error. Therefor, the compiler doesn't allow you to do this (that's the joy of static typing!)
Now let's say you have a CustomLng which is a subtype of Generator. You can't assign a Generator value to a CustomLng value because Generator is missing some properties of CustomLng. For example, it seems like Generator is missing a NAME_TYPE property. So if you tried to call .NAME_TYPE on that Generator value, it would throw an error. Therefor the compiler doesn't allow you to do this.
I hope that helps! If you have any further questions please reply :D
--Beka