1 /* Test if ObjC types play nice in conditional expressions. */
2 /* Author: Ziemowit Laski */
4 /* { dg-do compile } */
5 /* { dg-options "-fconstant-string-class=Foo" } */
6 /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */
8 #ifdef __NEXT_RUNTIME__
9 #include <Foundation/NSObject.h>
10 #define OBJECT NSObject
12 #include <objc/Object.h>
15 #include "../../objc-obj-c++-shared/objc-test-suite-types.h"
17 @interface Foo: OBJECT {
24 @interface Bar: OBJECT
25 + (Foo *) getString: (int) which;
28 TNS_STRING_REF_T _FooClassReference; /* Only used by NeXT. */
31 + (Foo *) getString: (int) which {
32 return which? [Foo description]: @"Hello";