consulo / consulo-unity3d

Frameworks: Unity3D
Apache License 2.0
103 stars 10 forks source link

Can't implicit convert [] to out [] error #80

Closed winxalex closed 8 years ago

winxalex commented 8 years ago
screen shot 2016-07-18 at 2 42 12 pm screen shot 2016-07-18 at 2 41 32 pm
VISTALL commented 8 years ago

Strange. Sorry - but without example i can't fix it

winxalex commented 8 years ago

Write code from the screens

public static void MyFunc(out GUIContent[] displayOptions){
List<GUIContent> guiContentList=new List<GUIContent>();
displayOptions=guiContetentList.ToArray();
}
VISTALL commented 8 years ago

Hm, reproduced

VISTALL commented 8 years ago

Simple example

namespace AA
{
    public static class Test
    {
        public static void test(out string[] t)
        {
            string[] otherParams = new string[0];

            t = otherParams;
        }
    }
}