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

Issue 47923014: Issue 14364. Strengthen isDirectSupertypeOf() to check type parameters. (Closed)

Created:
7 years, 1 month ago by scheglov
Modified:
7 years, 1 month ago
Reviewers:
jwren, Brian Wilkerson
CC:
reviews_dartlang.org, lukeechurch_gmail.com
Visibility:
Public.

Description

Issue 14364. Strengthen isDirectSupertypeOf() to check type parameters. https://code.google.com/p/dart/issues/detail?id=14364 However when we check for isSubType() we need to consider "dynamic" as bottom, i.e. as a subtype of any other type. R=brianwilkerson@google.com, jwren@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=29559

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fixes for review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -37 lines) Patch
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/BottomTypeImpl.java View 1 chunk +1 line, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/DynamicTypeImpl.java View 1 chunk +2 lines, -2 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/FunctionTypeImpl.java View 6 chunks +6 lines, -6 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java View 1 7 chunks +23 lines, -16 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/TypeImpl.java View 1 chunk +5 lines, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/TypeParameterTypeImpl.java View 4 chunks +6 lines, -6 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/type/Type.java View 1 1 chunk +9 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java View 2 chunks +38 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java View 2 chunks +69 lines, -0 lines 0 comments Download
M tests/language/language_analyzer.status View 1 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
scheglov
7 years, 1 month ago (2013-10-30 03:57:45 UTC) #1
Brian Wilkerson
LGTM https://codereview.chromium.org/47923014/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java File editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java (right): https://codereview.chromium.org/47923014/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java#newcode468 editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java:468: ClassElement je = j.getElement(); nit: I really hate ...
7 years, 1 month ago (2013-10-30 14:00:02 UTC) #2
scheglov
Committed patchset #2 manually as r29559 (presubmit successful).
7 years, 1 month ago (2013-10-30 15:58:14 UTC) #3
scheglov
7 years, 1 month ago (2013-10-30 15:58:50 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/47923014/diff/1/editor/tools/plugins/com.goog...
File
editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java
(right):

https://codereview.chromium.org/47923014/diff/1/editor/tools/plugins/com.goog...
editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java:468:
ClassElement je = j.getElement();
On 2013/10/30 14:00:02, Brian Wilkerson wrote:
> nit: I really hate short names like 'je'. Can we use something like
'jElement'?

Done.

https://codereview.chromium.org/47923014/diff/1/editor/tools/plugins/com.goog...
File
editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/type/Type.java
(right):

https://codereview.chromium.org/47923014/diff/1/editor/tools/plugins/com.goog...
editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/type/Type.java:104:
* @param withDynamic is {@code true} is "dynamic" should be considered as a
subtype of any type
On 2013/10/30 14:00:02, Brian Wilkerson wrote:
> nit: "is {@code true} is" --> "{@code true} if"

Done.

Powered by Google App Engine
This is Rietveld 408576698