view gcc/testsuite/g++.dg/inherit/covariant14.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
children
line wrap: on
line source

// Copyright (C) 2005 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 18 Oct 2005 <nathan@codesourcery.com>

// PR 22604
// Origin: Volker Reichelt <reichelt@gcc.gnu.org>

struct A;

struct B
{
  virtual A* foo();  // { dg-message "overridden" }
};

namespace N
{
  struct A : B
  {
    virtual A* foo(); // { dg-error "invalid covariant" }	
  };
}