view gcc/testsuite/objc.dg/invalid-method-2.m @ 138:fc828634a951

merge
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 08 Nov 2018 14:17:14 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */

/* Test that using an invalid type in a method declaration produces a
   friendly error without a compiler crash.  */

@interface MyClass
@end

@implementation MyClass
- (x) method /* { dg-error "unknown type name" } */
{
  return 0;
}
- (id) method2: (x)argument /* { dg-error "unknown type name" } */
{
  return 0;
}
@end