cannot combine with previous 'type-name' declaration specifier

前端 未结 6 524
暖寄归人
暖寄归人 2021-01-17 12:23

My iOS app was working and all of a sudden I\'m seeing this error: \"cannot combine with previous \'type-name\' declaration specifier\". Any ideas on what could be causing t

6条回答
  •  逝去的感伤
    2021-01-17 12:54

    I got it in a header file when in fact the error was in the .cpp. Turns out I had a method trying to return a bool in a sketchy way:

    return (x == 1 && y == 2);
    

    Which it turns out doesn't work, but Xcode told me in this very obscure way.

    Not sure if this helps, but it's another example in a seeming desert of them.

提交回复
热议问题