cannot combine with previous 'type-name' declaration specifier

前端 未结 6 523
暖寄归人
暖寄归人 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:51

    I saw this error when there was some dead incomplete code in my file that I'd forgotten to take out. The compiler indicated the error at the start of a method at the return type, so I spent a lot of time looking at the method declaration and call. Turned out the incorrect typo was above the method. since there was no ";" the compiler could only tell that the void keyword was misplaced.

提交回复
热议问题