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

Issue 12087052: Implement Types.isSubtype for FunctionType with optional and named parameters. (Closed)

Created:
7 years, 10 months ago by Johnni Winther
Modified:
7 years, 10 months ago
Reviewers:
karlklose
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement Types.isSubtype for FunctionType with optional and named parameters. Committed: https://code.google.com/p/dart/source/detail?r=17832

Patch Set 1 #

Patch Set 2 : Test added #

Patch Set 3 : Status updated. #

Total comments: 8

Patch Set 4 : Updated cf. comments #

Patch Set 5 : Rebased #

Patch Set 6 : Rebased (again) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+321 lines, -13 lines) Patch
M sdk/lib/_internal/compiler/implementation/dart_types.dart View 1 2 3 4 5 chunks +65 lines, -5 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/typechecker.dart View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/util/link.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/util/link_implementation.dart View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 chunks +1 line, -4 lines 0 comments Download
M tests/compiler/dart2js/type_checker_test.dart View 1 2 3 4 2 chunks +126 lines, -1 line 0 comments Download
A tests/language/typedef_is_test.dart View 1 1 chunk +123 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Johnni Winther
7 years, 10 months ago (2013-01-29 15:16:28 UTC) #1
karlklose
LGTM, with comments. I prefer shorter names if you have pairs like sSomething and tSomething, ...
7 years, 10 months ago (2013-01-30 09:39:12 UTC) #2
Johnni Winther
7 years, 10 months ago (2013-01-30 10:26:57 UTC) #3
https://codereview.chromium.org/12087052/diff/6001/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/typechecker.dart (right):

https://codereview.chromium.org/12087052/diff/6001/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/typechecker.dart:737: // Since named
parameters are globally ordered we can determine subset
On 2013/01/30 09:39:12, karlklose wrote:
> 'determine subset *relation* *with*'?

Done.

https://codereview.chromium.org/12087052/diff/6001/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/typechecker.dart:740:
Link<SourceString> tNamedParameter = tf.namedParameters;
On 2013/01/30 09:39:12, karlklose wrote:
> 'tNames'?

Done.

https://codereview.chromium.org/12087052/diff/6001/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/typechecker.dart:741: Link<DartType>
tNamedParameterType = tf.namedParameterTypes;
On 2013/01/30 09:39:12, karlklose wrote:
> 'tTypes'?

Done.

https://codereview.chromium.org/12087052/diff/6001/tests/compiler/dart2js/typ...
File tests/compiler/dart2js/type_checker_test.dart (right):

https://codereview.chromium.org/12087052/diff/6001/tests/compiler/dart2js/typ...
tests/compiler/dart2js/type_checker_test.dart:476: expect(false, [], {}, [],
{'a': intType});
On 2013/01/30 09:39:12, karlklose wrote:
> That should be
>   expect(false, [intType], {}, [], {'a': intType});
> shouldn't it?

Done.

Powered by Google App Engine
This is Rietveld 408576698