Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Treat S<dynamic> as S<Object>? #38

Closed
vsmenon opened this issue Feb 11, 2015 · 7 comments
Closed

Treat S<dynamic> as S<Object>? #38

vsmenon opened this issue Feb 11, 2015 · 7 comments

Comments

@vsmenon
Copy link
Contributor

vsmenon commented Feb 11, 2015

We've discussed mapping these to the same:

S<T>                =>   S == S<Object>
S<T extends Base>   =>   S == S<Base>

Should we?
@jacob314 @leafpetersen

@sigmundch
Copy link
Contributor

(FYI you can use markdown code blocks to preserve the format, I just went ahead and edited the code above in place :))

@leafpetersen
Copy link
Contributor

I think this is fine. One subtlety that should probably be dealt with is that the following:

class Foo<T extends num, S extends Comparable<T>>
var x = new Foo();

should probably be interpreted as

...
var x = new Foo<num, Comparable<num>>();

@jacob314
Copy link
Contributor

SGTM

@jmesserly
Copy link
Contributor

I think we decided the distinction of dynamic vs Object needs to be preserved at runtime, although it will rarely make a difference. (when T is substituted into function parameter type positions, where dynamic is treated as bottom instead of top).

@leafpetersen @vsmenon thoughts on this one?
S<T extends Base> => S == S<Base>

@vsmenon
Copy link
Contributor Author

vsmenon commented Aug 12, 2015

@leafpetersen - is this still an open issue?

@leafpetersen
Copy link
Contributor

I believe this is still open.

@leafpetersen leafpetersen self-assigned this Aug 12, 2015
@jmesserly
Copy link
Contributor

moved to dart-lang/sdk#25877

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants