Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78820 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55880 invoked from network); 6 Nov 2014 15:00:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2014 15:00:50 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:60275] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/57-28384-02D8B545 for ; Thu, 06 Nov 2014 10:00:49 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 10DCDB00099; Thu, 6 Nov 2014 10:00:46 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zhPw5QgposzI; Thu, 6 Nov 2014 10:00:45 -0500 (EST) Received: from [137.50.174.196] (oa-edu-174-196.wireless.abdn.ac.uk [137.50.174.196]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id F3E15B0009D; Thu, 6 Nov 2014 10:00:42 -0500 (EST) 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> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: Cc: Levi Morrison , Stas Malyshev , internals , Nikita Popov X-Mailer: iPhone Mail (12B411) Date: Thu, 6 Nov 2014 15:00:39 +0000 To: Dmitry Stogov Subject: Re: [PHP-DEV] [RFC][Vote] Return Types From: ajf@ajf.me (Andrea Faulds) > On 6 Nov 2014, at 07:43, Dmitry Stogov wrote: >=20 > It may be a serious new problem. For example you won't be able to compile > the following code at all? >=20 > class A { > function foo(): C {} > } > class B extends A { > function foo(): C {} > } > class C extends B { > function foo(): C {} > } > ?> >=20 > The similar code with argument type hinting works fine. > It's just a first example I could imagine, I believe, we will get more... I can't see any reason that example wouldn't work. The types didn't change, s= o there's no class loading needed for the covariance check. -- Andrea Faulds http://ajf.me/=