OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [property/] [property-neg-7.m] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* { dg-do compile } */
2
 
3
@interface NSArray
4
{
5
  int count;
6
}
7
@property(readonly) int count;
8
@end
9
 
10
@implementation NSArray
11
@synthesize count;
12
@end
13
 
14
void foo (NSArray *ans[], id pid, id apid[], int i) {
15
    NSArray *test;
16
    test.count = 1; /* { dg-error "readonly property can not be set" } */
17
    ((NSArray *)pid).count = 1;  /* { dg-error "readonly property can not be set" } */
18
    ((NSArray *)apid[i]).count = 1; /* { dg-error "readonly property can not be set" } */
19
    ans[i].count = 3; /* { dg-error "readonly property can not be set" } */
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.