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] - Rev 801

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

/* { dg-do compile } */
 
@interface NSArray 
{
  int count;
}
@property(readonly) int count;
@end
 
@implementation NSArray
@synthesize count;
@end
 
void foo (NSArray *ans[], id pid, id apid[], int i) {
    NSArray *test;
    test.count = 1; /* { dg-error "readonly property can not be set" } */
    ((NSArray *)pid).count = 1;  /* { dg-error "readonly property can not be set" } */
    ((NSArray *)apid[i]).count = 1; /* { dg-error "readonly property can not be set" } */
    ans[i].count = 3; /* { dg-error "readonly property can not be set" } */
}
 

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

powered by: WebSVN 2.1.0

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