internal override MSA.Expression /*!*/ TransformDefinedCondition(AstGenerator /*!*/ gen) { // MRI doesn't evaluate the arguments return(AstUtils.LightDynamic( SuperCallAction.Make(gen.Context, RubyCallSignature.IsDefined(true), gen.CurrentFrame.UniqueId), typeof(bool), gen.CurrentScopeVariable, gen.CurrentSelfVariable )); }
internal override MSA.Expression TransformDefinedCondition(AstGenerator /*!*/ gen) { // MRI doesn't evaluate the arguments MSA.Expression result = AstUtils.LightDynamic( RubyCallAction.Make(gen.Context, _methodName, RubyCallSignature.IsDefined(_target == null)), typeof(bool), gen.CurrentScopeVariable, (_target != null) ? AstUtils.Box(_target.TransformRead(gen)) : gen.CurrentSelfVariable ); return((_target != null) ? gen.TryCatchAny(result, AstFactory.False) : result); }