- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 2 Oct 2013 18:11:06 -0700
- To: "Mark S. Miller" <erights@google.com>
- Cc: Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Wed, Oct 2, 2013 at 6:08 PM, Mark S. Miller <erights@google.com> wrote: > If Foo is a subtype of Bar and you pass a Bar to a function that takes a > Foo, what should happen? This is passing a supertype instance to a method that expects a subtype instance. Ideally, it should work as long as you only use parts that exist in the supertype. > I ask because Foo is a almost an LSP subtype of readonly<Foo>. The LSP > common supertype of Foo and readonly<Foo> has exactly the signature of > readonly<Foo>. Yes. ~TJ
Received on Thursday, 3 October 2013 01:11:52 UTC