GROOVY-6189: SAM conversion for casts plus tests to ensure it works for attribues and properties
GROOVy-6189: Implementation of the current SAM conversion state for type checking and static compilation