Commit graph

4422 commits

Author SHA1 Message Date
Kallen Tu 134839098b Serialization/Deserialization for Variance in Type Parameters.
Change-Id: I9bce86293c23c4b9d2b8011e866f04bcab80e74a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118881
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-09-27 16:57:00 +00:00
Aske Simon Christensen a12c275901 [CFE] Avoid talking about const context in error messages.
The constant evaluator does not know if the expression it is evaluating
is actually in const context. If not, those messages are misleading.

Fixes https://github.com/dart-lang/sdk/issues/38568

Change-Id: Iddfb1fbdc12eb1874a1f400cf08763e003db23e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118982
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-09-27 14:49:57 +00:00
Brian Wilkerson 349e861fd3 Enable urls for codes with recently published docs
Change-Id: I327c996d54e9281338e1b986844c4fc3f1b42803
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119103
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-27 14:17:30 +00:00
Jens Johansen c3c31b74fd [parser] Fix bug wrt when the handleNonNullAssertExpression is added
This fix is basically a revert of the first fix for for the same issue,
627e4c8cad

Fix #37708

Bug: 37708
Change-Id: Ic470b2663e7171fcac6a8de3d9e1276b7815a64b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118574
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-27 11:53:15 +00:00
Kallen Tu 327bc451f8 Added variance support in listeners to ast.
Pass variance data to field in TypeParameter through the listeners.
ast_to_text will print variances for classes and mixins if specified.

Avoids serialization/deserialization (impl in future CL).

Change-Id: I298537604823710f0d30001f4cb5f1e81530959f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118464
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-26 18:11:10 +00:00
Brian Wilkerson 3c18db7d9e update analyzer error message generator to generate hasPublishedDocs
Change-Id: I87fae43033876c84448e785417bd5a72efe52ef9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118180
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-26 17:11:02 +00:00
Johnni Winther 6ff8d2199d [cfe] Don't crash on constructors in extensions
Change-Id: I11cdb9699101f384c2734c3551b4eefdfda6eccb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118980
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-26 12:32:25 +00:00
Johnni Winther 53564db036 [cfe] Handle implicit extension call()
Change-Id: Ib0aa04b7b00c54c21932040bd8912d95c138f62e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118960
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-26 10:36:51 +00:00
Johnni Winther ee7aae43c0 [cfe] Handle explicit extension index access
+ avoid implicit extension for [] or []= when the other is defined on
the receiver.

Change-Id: I99c76a66bfb4f72c396097b2f347aad9f0a42f33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118940
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-26 10:36:51 +00:00
Johnni Winther 0bf6b6ae64 [cfe] Handle instantiation of extension tear-offs and check bounds on extension method invocation
Change-Id: I212f95c897889a28934910c2c21c64bea6c6a64c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118585
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-26 08:41:38 +00:00
Jens Johansen acfda5d837 [CFE] Parser test framework
Change-Id: I1f27b380a2e6f8ea34d8ce66de6d581a1da8bf96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118572
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-26 08:40:08 +00:00
Paul Berry 6c81690c3a Flow analysis: add tests of things that shouldn't be promoted.
Change-Id: I1c172091c8aa12023ba94f528e1e1b7abb9f9e1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118203
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-25 19:04:28 +00:00
Paul Berry 39a1baef6b Prepare to publish analyzer 0.38.4
Change-Id: I251e7bde7b3423cbfb2ee6fe1150088bf44747dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118647
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-25 19:00:01 +00:00
Konstantin Shcheglov b31e71e990 Revert "Issue 37608. Use instantiated FunctionType for tear-off(s)."
This reverts commit acac9ab11b.

Reason for revert: breaks source_gen, see https://github.com/dart-lang/sdk/issues/38546

Original change's description:
> Issue 37608. Use instantiated FunctionType for tear-off(s).
> 
> I was working of switching runtimeTypeMatch() to purely
> typeSystem.isSubtypeOf(), without working around dartbug.com/35993
> and dartbug.com/33441, but bots were failing. I think that was because
> of this issue with incorrect tear-off types. We have to fix it before
> switching to less generous TypeSystem.
> 
> R=​brianwilkerson@google.com, paulberry@google.com
> 
> Bug: https://github.com/dart-lang/sdk/issues/37608
> Change-Id: I1f5dfc5e86553a352d72e772e791978772fe8fa4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118379
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/37608
Change-Id: Icb6bf93f9b39d3af1d13e9b103afea5364b9169a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118646
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-25 18:06:16 +00:00
Kallen Tu c3bbd6a247 Added parser recovery for multiple variance modifiers.
New error message for multiple variances and will handle recovery from
more than one variance modifier before a parameter.

Change-Id: I63ed8a7f04dd664e20d72b632b40f723aa43020f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118621
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-25 17:12:06 +00:00
Jacob MacDonald bd1ca04b79 add meta dependency to kernel and front_end
Towards https://github.com/dart-lang/sdk/issues/38482 and  https://github.com/dart-lang/sdk/issues/38483

Change-Id: I4a8431d7864fbfa682a3fa80696e2f8a998f0f38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118320
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-09-25 15:51:27 +00:00
Dmitry Stefantsov e034104f04 [cfe] Remove TypeEnvironment.*Type getters
The getters were returning types of undefined nullabilities.  Now the
nullability-aware getters on CoreTypes should be used instead.

Closes #38224.

Bug: http://dartbug.com/38224
Change-Id: I617a0ef8ee17ebd792c2bc1ec6477a5ee469fee1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118570
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-25 13:28:28 +00:00
Dmitry Stefantsov 463894f986 [cfe] Remove NullabilityBuilder.legacy
TL;DR: Use cases of 'legacy' constructor are covered by the 'omitted'
constructor.

The initial idea behind the removed constructor was to use it on all
types in opted-out libraries, as if the programmer had a way to specify
which type is legacy.  That didn't prevent from building the 'omitted'
NullabilityBuilder into 'legacy' nullability sometimes.  In some cases
we still had to use the 'omitted' constructor because we didn't have the
access to the library object yet, and then, then the
NullabilityBuilder.build method is invoked, and the library object is
passed to it, we build 'legacy' nullability.

Change-Id: I975fa93e23ee55e93db5f3e642a97ad6901b06c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118568
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-25 13:28:28 +00:00
Dmitry Stefantsov 4209c50587 [cfe] Remove NullabilityBuilder.pendingImplementation
Closes #38286.

Bug: http://dartbug.com/38286
Change-Id: Id9e3167f5e03dbaeb7f776aed3f4fcaf068a1b95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118567
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-25 13:28:28 +00:00
Johnni Winther b03d472e4c [cfe] Handle default values on extension methods
Closes #38541

Change-Id: I078800cc98b5444c2c7f6f87b2d89bcf764bfc23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118582
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-25 08:45:27 +00:00
Dmitry Stefantsov 12f6cbb7b1 [cfe] Thread nullability modifiers for TypeParameterTypes from source
Closes #38218, #38221.

Bug: http://dartbug.com/38218
Change-Id: I4689b0b192b71790c8fc5ffba6ccb807f289f771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118580
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-25 08:15:47 +00:00
Dmitry Stefantsov 13fcf27c25 [cfe] Implement library-specific NullabilityBuilder getters
Change-Id: Ia7ca900f52bab8549224147bdf2ea161fc60002c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118564
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-25 08:15:47 +00:00
Dmitry Stefantsov db3bf8f509 [cfe] Preserve abstraction level in TypeDeclarationBuilder.buildType
The .buildType method and its implementations should receive builders as
arguments, not already built objects.  The already built objects should
be passed to .buildTypeWithBuiltArguments instead.  The absraction level
is prserved in this CL by passing in a NullabilityBuilder, not a
Nullability into .buildType.

Change-Id: I1dd87974e0081b82a5c6593f3e8a133d20563f6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118563
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-25 08:15:47 +00:00
Dmitry Stefantsov adbfe7ce05 [cfe] Update the rules for TypeParameterType.nullability
Closes #38220.

Bug: http://dartbug.com/38220
Change-Id: If200e1173bd36997715003cc87c35a8e17f4e115
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118561
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-25 08:15:47 +00:00
Johnni Winther 7b9bcd08b4 [cfe] Correctly substitute function types from extension on-clauses
Change-Id: Icf6bf59544d2c14cc153cdf77b675554d319b6b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118541
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-25 07:30:17 +00:00
Johnni Winther 2f7ad92ee4 [cfe] Handle null aware explicit extension application
Handles expressions like `Extension(c)?.foo`.

This CL also includes an update to SourceExtensionBuilder.build
addressing a comment in a previous CL.

Change-Id: I0ebcd95d16743c0aa6da22120182b2219fc30726
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118443
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-25 07:30:17 +00:00
Kallen Tu 89220fd812 Variance Parsing and Syntax Support
With the experiment flag on, will properly parse the `in`/`out`/`inout`
keywords. Without it, will issue an error regarding the flag. First CL
for parsing, syntax support, no AST work yet.

Keywords only parse correctly for classes and mixins.
See test `variance_disabled_syntax_test.dart`.


Change-Id: I37d765804fa0752512abf52fa44456a173087ef0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117929
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-09-24 17:21:39 +00:00
Jens Johansen cc7baf9bf5 [CFE] Fix of crash etc in error messages wrt formal parameters
With something like
x2() {
  y(z, {z}) {}
}

in a part, we create an error on the 2nd 'z'.
That error message gets the file uri of the body builder which is correct.
The context gets (for the 1st 'z') gets the file uri of the
FormalParameterBuilder which in turn got it from the "parent" which is the
library which is the "main library", i.e. not the "part library".

This causes - in the face of parts - one of two things:
1) It will point into the wrong file and the error message will be bad.
2) It tries to point into the wrong file, but the wrong file is not big
   enough, and we thus get a crash.

This CL fixes it so the FormalParameterBuilder has the right uri.

Fixes https://github.com/dart-lang/sdk/issues/38523.

Bug: 38523
Change-Id: I303dbec2934ae930b8f2f2c9f63a4aa00db3a89c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118448
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-24 11:50:09 +00:00
Jens Johansen 98d94e7efc [CFE] Reproduction of crash etc in error messages wrt formal parameters
Reproduction of dartbug.com/38523

Bug: 38523
Change-Id: Iffc30a622685c0c8d7a0daf0b84c910072c8146f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118446
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-24 11:43:28 +00:00
Jens Johansen 1b03bc34c8 [CFE] Cleanup incremental_load_from_dill_test yamls
Change-Id: I30012b08499e5c5a7babb74cb43706031fb3f4cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118445
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-24 10:50:18 +00:00
Jens Johansen fdda2729c3 [CFE] Fix crash when mixin application has mixin application super from dill
Fixes https://github.com/flutter/flutter/issues/40966.

Change-Id: Idf3febc50b5c8d637e9f3f43e8bd3e6b8bdee2fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118444
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-24 10:47:18 +00:00
Jens Johansen dccbb236a9 [DDC/bazel/frontend] Fix same library in old and new dill
Because we cache dills, it gives problems when loading the same library
from two different dills and starts "ping-ponging" between them.

See http://dartbug.com/38496 for details.

This solves the problem by removing any old dill from the cache,
that overlaps with what we're loading in now.

Bug: 38496
Change-Id: I61c2b3694d1d0d8fd5e9b62c4a03b6ac03ae4308
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118386
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-24 09:53:47 +00:00
Aske Simon Christensen c71ee4b0c9 [cfe] Report override errors at the class in which the override takes place.
Change-Id: Ib5b80d3cca6e15966f822bf96294dee8f4dedc04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115247
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-09-24 08:28:21 +00:00
Johnni Winther 175fc6edff [cfe] Use original name in extension method errors.
Previously the errors were reported using the synthesized name, like
`Extension|method` instead of `method`.

+ Report errors on invalid uses of explicit extension application as
an expression or lvalue.

Change-Id: I6d85430be4ab3966ee94131b37aa365265c07eac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118383
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther b7ad248209 [cfe] Handle annotations on extension members
Closes #38439

Change-Id: I3c995ba5ca3058530318b14e46d275ce6ccc8778
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118381
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther bf76e4b49c [cfe] Handle complex extension setters
Change-Id: Ic5753c70a13fed819df7aa6900a8191f9bed4195
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118042
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther 2b3541da57 [cfe] Make IfNullJudgment an internal expression
Change-Id: I68c81e10692823e9fad552272167c0bf87144db4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117942
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther 2777806901 [cfe] Handle dynamic invocation
Change-Id: I13ca160a2dd5862d558928826adee7bcacf67d04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117731
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther 18e4f6ba8d [cfe] Handle conflicting extension and extension member names
Change-Id: Ib0c7ffce985b31dfcdacaca599ff31f3d05a25a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117730
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther 2be1d090ca [cfe] Correctly resolve extension properties in face of getter/setter conflict
Change-Id: I0b818edb27de1b2cd1dcd2e046f42616cd7cb257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117729
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther 71896d5586 [cfe] Support implicit this access to extension methods in extensions
Change-Id: Idad98ca0d0fb27010ef4a522593f283b97ecc873
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117720
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther 25166af3ea [cfe] Remove SyntheticExpressionJudgment
Change-Id: I2891d772d99d1fd8a5ba42e393d900f3c1618a5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117700
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther 037b9052d2 [cfe] Handle compound assignment on explicit extension application
Change-Id: Ie8b23593db5286d1d44125ea0dcc76f95cb9b4e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117545
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther bdd432f427 [cfe] Handle if-null assignment on explicit extension application
Change-Id: I30e02767d23982cb8cae08113bd6b0f97d325e03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117544
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther a2a155afd1 [cfe] Refactor null-aware if-null and compound assignments
Change-Id: Ie96ac05974cff706af5b49536cd9a006a9786195
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117540
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-09-24 07:55:45 +00:00
Alexander Markov 3edcf8f959 [vm/bytecode] Split AST and bytecode platform dill files
Currently Dart SDK has 2 platform dill files:
* vm_platform_strong.dill is used when compiling Dart sources (in kernel
  service and various kernel compilers).
* vm_platform_strong_stripped.dill is used to build core snapshot,
  so its contents is used for execution in the VM.

Before this change, if Dart SDK is built with bytecode, then both
vm_platform_strong.dill and vm_platform_strong_stripped.dill contain
bytecode and AST.

This change removes bytecode from vm_platform_strong.dill, and removes
AST from vm_platform_strong_stripped.dill.

Sizes:

Dart SDK is built without bytecode:

  5861400 out/ReleaseX64/vm_platform_strong.dill
  2819336 out/ReleaseX64/vm_platform_strong_stripped.dill
 32105720 out/ReleaseX64/dart-sdk/bin/dart

Dart SDK is built with bytecode, before this change:

 11146480 out/ReleaseX64/vm_platform_strong.dill
  4846488 out/ReleaseX64/vm_platform_strong_stripped.dill
 34219256 out/ReleaseX64/dart-sdk/bin/dart

Dart SDK is built with bytecode, after this change:

  5861400 out/ReleaseX64/vm_platform_strong.dill
  2027224 out/ReleaseX64/vm_platform_strong_stripped.dill
 28382456 out/ReleaseX64/dart-sdk/bin/dart

Change-Id: Ia7c61a9bce1c95edfd3b2810a67c0964fb37377f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118371
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-23 23:08:41 +00:00
Konstantin Shcheglov acac9ab11b Issue 37608. Use instantiated FunctionType for tear-off(s).
I was working of switching runtimeTypeMatch() to purely
typeSystem.isSubtypeOf(), without working around dartbug.com/35993
and dartbug.com/33441, but bots were failing. I think that was because
of this issue with incorrect tear-off types. We have to fix it before
switching to less generous TypeSystem.

R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/37608
Change-Id: I1f5dfc5e86553a352d72e772e791978772fe8fa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118379
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-23 20:22:07 +00:00
Dmitry Stefantsov 8d487b4fdc [kernel] Recover TypeParameter.variance while deserializing
Change-Id: I46d78dc5e98c5e3707d448eccfd6bdabb1c25ddb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/91827
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-09-23 15:17:38 +00:00
Dmitry Stefantsov 4d9db7b22f [fasta] Account for variance of type parameters in instantiate-to-bound
Change-Id: I7a0aa3810129fa6a6a8cff5f961c19157154cd37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/85101
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-09-23 15:17:38 +00:00
Dmitry Stefantsov 9505a1b87f [fasta] Add variance field to type parameters
Change-Id: I0c3eda4057b52853c063a682ff15fb17a595db3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/85082
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-09-23 15:17:38 +00:00