Repository: PowerShell/PowerShell
File: src/System.Management.Automation/engine/parser/Compiler.cs (C#)

Code before:
                else
                {
                    var argValue = ast.PositionalArguments[0].Accept(s_cvv);
                    result = new OutputTypeAttribute(s_attrArgToStringConverter.Target(s_attrArgToStringConverter, argValue));
                }
            }
            else
            {
                var args = new object[ast.PositionalArguments.Count];
                for (int i = 0; i < ast.PositionalArguments.Count; i++)
                {
                    var positionalArgument = ast.PositionalArguments[i];
                    var typeArg = positionalArgument as TypeExpressionAst;
                    args[i] = typeArg != null
                        ? TypeOps.ResolveTypeName(typeArg.TypeName, typeArg.Extent)
                        : positionalArgument.Accept(s_cvv);
                }

                if (args[0] is Type)
                {
                    result = new OutputTypeAttribute(LanguagePrimitives.ConvertTo<Type[]>(args));
                }
                else
                {
                    result = new OutputTypeAttribute(LanguagePrimitives.ConvertTo<string[]>(args));
                }
            }

            foreach (var namedArg in ast.NamedArguments)
            {
                var argValue = namedArg.Argument.Accept(s_cvv);
                var argumentName = namedArg.ArgumentName;

                if (argumentName.Equals("ParameterSetName", StringComparison.OrdinalIgnoreCase))
                {
                    result.ParameterSetName = s_attrArgToStringArrayConverter.Target(s_attrArgToStringArrayConverter, argValue);
                }
                else if (argumentName.Equals("ProviderCmdlet", StringComparison.OrdinalIgnoreCase))
                {
                    result.ProviderCmdlet = s_attrArgToStringConverter.Target(s_attrArgToStringConverter, argValue);
                }
                else
                {
                    throw InterpreterError.NewInterpreterException(
                        namedArg,
                        typeof(RuntimeException),
                        namedArg.Extent,
                        "PropertyNotFoundForType",
                        ParserStrings.PropertyNotFoundForType,
                        argumentName,
                        typeof(CmdletBindingAttribute));

Review comment (suggestion):
I don't find `Type` in the core type list, why `ConvertTo<Type>` works in LCM?
https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/parser/TypeResolver.cs#L722

Code after:
                else
                {
                    var argValue = ast.PositionalArguments[0].Accept(s_cvv);
                    result = new OutputTypeAttribute(s_attrArgToStringConverter.Target(s_attrArgToStringConverter, argValue));
                }
            }
            else
            {
                var args = new object[ast.PositionalArguments.Count];
                for (int i = 0; i < ast.PositionalArguments.Count; i++)
                {
                    var positionalArgument = ast.PositionalArguments[i];
                    var typeArg = positionalArgument as TypeExpressionAst;
                    args[i] = typeArg != null
                        ? TypeOps.ResolveTypeName(typeArg.TypeName, typeArg.Extent)
                        : positionalArgument.Accept(s_cvv);
                }

                if (args[0] is Type)
                {
                    // We avoid `ConvertTo<Type[]>(args)` here as CLM would throw due to `Type[]`
                    // being a "non-core" type. NOTE: This doesn't apply to `string[]`.
                    Type[] types = new Type[args.Length];
                    for (int i = 0; i < args.Length; i++)
                    {
                        types[i] = LanguagePrimitives.ConvertTo<Type>(args[i]);
                    }

                    result = new OutputTypeAttribute(types);
                }
                else
                {
                    result = new OutputTypeAttribute(LanguagePrimitives.ConvertTo<string[]>(args));
                }
            }

            foreach (var namedArg in ast.NamedArguments)
            {
                var argValue = namedArg.Argument.Accept(s_cvv);
                var argumentName = namedArg.ArgumentName;

                if (argumentName.Equals("ParameterSetName", StringComparison.OrdinalIgnoreCase))
                {
                    result.ParameterSetName = s_attrArgToStringArrayConverter.Target(s_attrArgToStringArrayConverter, argValue);
                }
                else if (argumentName.Equals("ProviderCmdlet", StringComparison.OrdinalIgnoreCase))
                {
                    result.ProviderCmdlet = s_attrArgToStringConverter.Target(s_attrArgToStringConverter, argValue);
                }
                else
                {