Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(925)

Issue 2375103004: fix #27210, remove TypeParameterMember equality (Closed)

Created:
4 years, 2 months ago by Jennifer Messerly
Modified:
4 years, 2 months ago
Reviewers:
Leaf
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

fix #27210, remove TypeParameterMember equality

Patch Set 1 #

Total comments: 6

Patch Set 2 : fix bound check to use == #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -13 lines) Patch
M pkg/analyzer/lib/dart/element/type.dart View 1 chunk +15 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/element.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/member.dart View 1 chunk +0 lines, -6 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/type.dart View 1 2 chunks +7 lines, -1 line 0 comments Download
M pkg/analyzer/lib/src/generated/type_system.dart View 1 2 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
Jennifer Messerly
https://codereview.chromium.org/2375103004/diff/1/pkg/analyzer/lib/dart/element/type.dart File pkg/analyzer/lib/dart/element/type.dart (right): https://codereview.chromium.org/2375103004/diff/1/pkg/analyzer/lib/dart/element/type.dart#newcode708 pkg/analyzer/lib/dart/element/type.dart:708: DartType get bound; trying to make TypeParameterType instances usable ...
4 years, 2 months ago (2016-09-29 07:08:34 UTC) #2
Leaf
https://codereview.chromium.org/2375103004/diff/1/pkg/analyzer/lib/src/generated/type_system.dart File pkg/analyzer/lib/src/generated/type_system.dart (left): https://codereview.chromium.org/2375103004/diff/1/pkg/analyzer/lib/src/generated/type_system.dart#oldcode931 pkg/analyzer/lib/src/generated/type_system.dart:931: if (t1 == t2) { On 2016/09/29 07:08:34, John ...
4 years, 2 months ago (2016-09-30 05:08:23 UTC) #3
Jennifer Messerly
Thanks! PTAL. https://codereview.chromium.org/2375103004/diff/1/pkg/analyzer/lib/src/generated/type_system.dart File pkg/analyzer/lib/src/generated/type_system.dart (left): https://codereview.chromium.org/2375103004/diff/1/pkg/analyzer/lib/src/generated/type_system.dart#oldcode931 pkg/analyzer/lib/src/generated/type_system.dart:931: if (t1 == t2) { On 2016/09/30 ...
4 years, 2 months ago (2016-09-30 23:23:12 UTC) #4
Jennifer Messerly
@Leaf, in case it helps, the idea to refine the bound was from your suggestion ...
4 years, 2 months ago (2016-10-01 00:02:34 UTC) #5
Jennifer Messerly
On 2016/10/01 00:02:34, Jennifer Messerly wrote: > @Leaf, in case it helps, the idea to ...
4 years, 2 months ago (2016-10-18 01:16:18 UTC) #6
Leaf
On 2016/10/18 01:16:18, Jennifer Messerly wrote: > On 2016/10/01 00:02:34, Jennifer Messerly wrote: > > ...
4 years, 2 months ago (2016-10-18 20:39:58 UTC) #7
Jennifer Messerly
4 years, 2 months ago (2016-10-20 23:24:12 UTC) #8
On 2016/10/18 20:39:58, Leaf wrote:
> On 2016/10/18 01:16:18, Jennifer Messerly wrote:
> > On 2016/10/01 00:02:34, Jennifer Messerly wrote:
> > > @Leaf, in case it helps, the idea to refine the bound was from your
> suggestion
> > > here: https://github.com/dart-lang/sdk/issues/26965#issuecomment-237610598
> > > 
> > > I'm happy to merge this with the other CL too if that makes it easier to
see
> > how
> > > they're related.
> > 
> > Hey Leaf, wondering where we're at with this CL
> > This other CL depends on this one:
https://codereview.chromium.org/2375373002
> > 
> > Should I merge them? Any advice on what to do?
> 
> Right sorry.  Yes, I think merging them would be helpful.  Also, I was worried
> about the following kinds of cases:
> 
> void f<T <: num>(T x, T y) {
>   var z = x;
>   var f = () => x;
>   f = () => y;
>   if (x is int) {
>     z.isEven; // Should be an error, make sure that promotion doesn't carry
> over?
>     x = z; // Should be a downcast, make sure that it is?
>     f().isEven; // Should be an error, make sure that it is
>     var g = () => x;
>     g = f; // Should be an error, make sure that it is
>     g().isEven; // Should work
>     x = g(); // Probably should work?
>     int r = x; // should work
>   }
> }
> 
> Can you add tests to make sure that all of this works as intended?

Excellent I'll merge this with the other one. Closing this one out. :)

Powered by Google App Engine
This is Rietveld 408576698