Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78822 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59189 invoked from network); 6 Nov 2014 15:16:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2014 15:16:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 198.187.29.245 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 198.187.29.245 imap11-3.ox.privateemail.com Received: from [198.187.29.245] ([198.187.29.245:44827] helo=imap11-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/08-28384-2B09B545 for ; Thu, 06 Nov 2014 10:16:03 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id BCB6488022C; Thu, 6 Nov 2014 10:15:59 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap11.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap11.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iU6Lj5rR-kOP; Thu, 6 Nov 2014 10:15:59 -0500 (EST) Received: from oa-edu-171-46.wireless.abdn.ac.uk (oa-edu-171-46.wireless.abdn.ac.uk [137.50.171.46]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 7EA7A880276; Thu, 6 Nov 2014 10:15:58 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) In-Reply-To: Date: Thu, 6 Nov 2014 15:15:55 +0000 Cc: Levi Morrison , Stas Malyshev , internals , Nikita Popov Content-Transfer-Encoding: quoted-printable Message-ID: <80CC92E1-A1EF-4916-BCB3-ACB1DDBE623B@ajf.me> References: <5B1B375C-328B-40BD-B715-8EDA158B44CE@ajf.me> <545A912A.2050202@sugarcrm.com> <545AA193.6060606@sugarcrm.com> <3E396F3F-CD59-4198-8FD2-1A8C4ED3B87A@ajf.me> <5BB43ECD-089D-4DDD-AD95-1263B05279CB@ajf.me> To: Dmitry Stogov X-Mailer: Apple Mail (2.1990.1) Subject: Re: [PHP-DEV] [RFC][Vote] Return Types From: ajf@ajf.me (Andrea Faulds) > On 6 Nov 2014, at 15:08, Dmitry Stogov wrote: >=20 > Use A or B for return type in B::foo(). It'll lead to compile error = anyway (Class C is not defined). > It's not possible to compile this by design. Ok, let=E2=80=99s try this: I don=E2=80=99t think this can=E2=80=99t be compiled. When you get to B, = you know that A doesn=E2=80=99t extend anything, and B doesn=E2=80=99t = extend C, so C can=E2=80=99t possibly be a superclass of B, and it would = fail, right? -- Andrea Faulds http://ajf.me/