Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/objc.dg/method-1.m @ 118:fd00160c1b76
ifdef TARGET_64BIT
author | mir3636 |
---|---|
date | Tue, 27 Feb 2018 15:01:35 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Tests of duplication. */ /* { dg-do compile } */ @interface class1 - (int) meth1; /* { dg-message "previous declaration" } */ - (void) meth1; /* { dg-error "duplicate declaration of method .\\-meth1." } */ @end @interface class2 + (void) meth1; /* { dg-message "previous declaration" } */ + (int) meth1; /* { dg-error "duplicate declaration of method .\\+meth1." } */ @end @interface class3 - (int) meth1; @end @implementation class3 - (int) meth1 { return 0; } /* { dg-message "previous definition" } */ - (int) meth1 { return 0; } /* { dg-error "redefinition of" } */ @end @interface class4 + (void) meth1; @end @implementation class4 + (void) meth1 {} /* { dg-message "previous definition" } */ + (void) meth1 {} /* { dg-error "redefinition of" } */ @end