public override void SecondSemanticCheck(List <SemanticError> errors, Scope scope)
        {
            if (Id.Text == "method7")
            {
                Console.WriteLine();
            }

            var scopeMethod = scope.CreateChild();

            foreach (var arg in Arguments)
            {
                if (!scope.IsDefinedType(arg.Type.Text, out SemanticCheck.Type typeArg))
                {
                    errors.Add(new SemanticError(arg.Line, arg.Column, TypeError.ClassNotDefine));
                }
                scopeMethod.Define(arg.Id.Text, typeArg);
            }

            if (!scope.IsDefinedType(TypeReturn.Text, out SemanticCheck.Type typeReturn))
            {
                errors.Add(new SemanticError(Line, Column, TypeError.ClassNotDefine));
            }

            scope.Define(Id.Text, Arguments.Select(x => scope.GetType(x.Type.Text)).ToArray(), typeReturn);

            Body.SecondSemanticCheck(errors, scopeMethod);

            if (!(Body.StaticType <= typeReturn))
            {
                errors.Add(new SemanticError(Body.Line, Body.Column, TypeError.InconsistentType));
            }

            TypeReturn = new Type.TypeNode(Body.Line, Body.Column, typeReturn.Text);
        }
        public override void FirstSemanticCheck(List <SemanticError> errors, Scope scope)
        {
            if (!scope.IsDefinedType(TypeReturn.Text, out SemanticCheck.Type typeReturn))
            {
                errors.Add(new SemanticError(Line, Column, TypeError.ClassNotDefine));
            }

            TypeReturn = new Type.TypeNode(TypeReturn.Line, TypeReturn.Column, typeReturn.Text);

            SemanticCheck.Type[] typeArgs = new SemanticCheck.Type[Arguments.Count];
            for (int i = 0; i < Arguments.Count; ++i)
            {
                if (!scope.IsDefinedType(Arguments[i].Type.Text, out typeArgs[i]))
                {
                    errors.Add(new SemanticError(Line, Column, TypeError.ClassNotDefine));
                }
            }

            scope.Define(Id.Text, typeArgs, typeReturn);
        }