Johnni Winther
b38821f39d
[kernel] Enforce lints in pkg/kernel
...
Change-Id: I954f7632f22b552febed2a3140f81245277cb050
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171581
Reviewed-by: Jens Johansen <jensj@google.com >
2020-11-11 12:51:28 +00:00
Dmitry Stefantsov
783d83950b
[cfe] Use type parser in type schema elimination tests
...
Closes : #44095 .
Bug: https://github.com/dart-lang/sdk/issues/44095
Change-Id: Iff15b0686557388c4e701075a4f6e4fc16dfa5fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170901
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-09 16:54:39 +00:00
Johnni Winther
a1f67241b9
[cfe] Handle required parameters in combined member signature creation
...
Change-Id: I4ee6a6f1f404a65e7abc926adaa08178698838e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170880
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-11-09 11:47:24 +00:00
Johnni Winther
38d7c7661d
[cfe] Special case Null in assignability errors.
...
In error reporting on assignability where the expression has type
`Null` we use a special messages that doesn't state that
"'Null' is nullable". Cases where `Null` is part of the type or where
the expression of type `Null` is derived from a collection are not
special cased.
Closes #43998
Closes #44093
Change-Id: Ic0c79e6362f2365eb3fe8222ccd2ef8fac4f188d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170433
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-11-09 11:07:44 +00:00
Johnni Winther
f27e0f96b4
[cfe] Add test to verify issue 31767 has been fixed
...
Closes #31767
Change-Id: I729514a172a924fb96183a9ba7978ae347560d5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170821
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-11-09 10:28:23 +00:00
Johnni Winther
1930c07cd7
[cfe] Add flags to MethodInvocation and fileEndOffset to Block
...
The CL add a 'flags' to MethodInvocation with the properties isInvariant
and isBoundsSafe. The former is used for to marks safe calls in unified
collection encoding. Both can be used further by backends.
The CL also adds a 'fileEndOffset' to Block. This is current set for
block declared in used code.
In response to https://github.com/dart-lang/sdk/issues/43994
and https://github.com/dart-lang/sdk/issues/43965
Change-Id: I579fc2928331465dfc2c152ccfd21297b12cfdd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170695
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-11-09 07:36:44 +00:00
Dmitry Stefantsov
b66fbd1829
[cfe] Use type parser in legacy upper bound tests
...
Closes #44094 .
Bug: https://github.com/dart-lang/sdk/issues/44094
Change-Id: Ib32a25545b65a91f951ee613276e7c275a91a739
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170698
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-11-06 17:00:03 +00:00
Dmitry Stefantsov
d54e2bb568
[cfe,ddc,dart2js,vm] Add NullType
...
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/170342/
* https://dart-review.googlesource.com/c/sdk/+/170344/
* https://dart-review.googlesource.com/c/sdk/+/170345/
* https://dart-review.googlesource.com/c/sdk/+/170346/
* https://dart-review.googlesource.com/c/sdk/+/170347/
The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.
Closes #40122 .
TEST=Verified by changes in .expect files in pkg/vm/.
Bug: https://github.com/dart-lang/sdk/issues/40122
Change-Id: Ib8197802fdc69694387ae47ac990c58b3aaab7a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170689
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-06 12:43:52 +00:00
Johnni Winther
1876c6751b
[cfe] Add test for forwarding stub targets
...
The added test show that we generate a super call to the wrong target
in some forwarding stubs. The target should have been the mixed in
member but is instead the super member that it overrides.
Change-Id: If7536628370ba69405cbedef969e727a5d220058
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170684
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-11-06 11:48:33 +00:00
Erik Ernst
d13eaddf97
Lower aliased redirecting factory constructor invocations
...
Change-Id: I281f959b94d6e9dc2d7f7c6e4923cc841897041b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170431
Commit-Queue: Erik Ernst <eernst@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-11-05 15:17:43 +00:00
Clement Skau
27ca552ddb
[SDK] Replaces async's _AsyncAwaitCompleter with _Future.
...
Run time (less is better) impact:
dart:
- Calls.AwaitAsyncCall -43.95% ~ -55.50%
- Calls.AwaitAsyncCallClosureTargetPolymorphic -40.33% ~ -53.58%
- Calls.AwaitAsyncCallInstanceTargetPolymorphic -42.69% ~ -55.65%
- Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -42.05% ~ -56.14%
- Calls.Await... 0% ~ -13%
dart-aot:
- Calls.AwaitAsyncCall -9.748% ~ -11.13%
- Calls.AwaitAsyncCallClosureTargetPolymorphic -8.673% ~ -13.19%
- Calls.AwaitAsyncCallInstanceTargetPolymorphic -9.799% ~ -11.74%
- Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -5.412% ~ -13.43%
Code size impact:
- flutter_gallery_app_so_brotli_size -0.1237% ~ -0.2410%
- flutter_gallery_readonlydata_size 0.1693% ~ 0.2041%
- flutter_gallery_instructions_size 0.1157% ~ 0.1779%
- flutter_gallery_total_size 0.1021% ~ 0.1413%
Bug: https://github.com/dart-lang/sdk/issues/39119
Change-Id: I64d28a8bea078277946d7be43737e265920c8f16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126322
Commit-Queue: Clement Skau <cskau@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-11-05 09:51:13 +00:00
Jens Johansen
7b75bd8ece
[CFE] Special case StrongModeNNBDPackageOptOut message in IncrementalCompiler
...
This CL fixes the wrong message, so - when in the process of fixing
the package nnbd settings - one gets the correct message, mentioning the
right packages and no longer mentioning the fixed ones.
Change-Id: Ied26094055e56b44dfdd2e942b98eb9e1e7968fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170423
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-05 09:43:23 +00:00
Jens Johansen
60a5c58196
[CFE] Fix not getting rid of NNBD error in package in incremental compiler
...
This fixes the issue of the error not going away, but can (see added
test) give a wrong error message when in the process of fixing the issues.
A follow-up CL will (try to) correct the wrong error message.
Change-Id: I3547fe5fb5cfd179897996029a00a4995a967e54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170422
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-11-05 08:47:42 +00:00
Jens Johansen
52297bf10e
[CFE] Set main, mode and problemsJson for expect-file output in incremental compiler
...
This only makes the expect files more correct.
Change-Id: Ib15117f9e0a4aa09ceecfe914cb46e050469d56a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170341
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-11-04 13:19:27 +00:00
Sam Rawlins
090e234172
Remove unused dart:async imports
...
As of Dart 2.1, Future/Stream have been exported from dart:core.
Change-Id: Ia4d70d1ccb55ac117bafe630a24b4ee2f60ff993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170126
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-11-03 18:49:54 +00:00
Jens Johansen
9ec87c2da0
[kernel] Field has 2 references
...
Change-Id: I9c946119e55256b9fbcbf3076ea008aaa1312e86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168949
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-03 16:02:16 +00:00
Jens Johansen
332ce76055
[CFE][kernel] Add 'invalid' nnbd mode; use when trying to out out when compiling in strong mode
...
Change-Id: I3d1a8da4378cd59e733fc796df38ae98aaf59d6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169881
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-03 14:12:56 +00:00
Johnni Winther
0609c6dacc
[cfe] Add predefined constructors for late error messages
...
This CL adds predefined constructors to LateInitializationErrorImpl that
only take the name of the late field/variable as argument. This can reduce
the size of the generated code for ddc/dart2js size because the long
message isn't repeated at all call sites.
In response to #43995
Change-Id: Ie276dd1455feab1655da3a503856da425b20f04f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169883
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-11-03 12:47:06 +00:00
Johnni Winther
3f7ca42391
[cfe] Ensure that getDispatchTargetKernel returns a concrete member
...
In response to #43988
Change-Id: I3aa73a073b275b634b679bebfa2bf2ed9c292074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170087
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-11-03 12:20:37 +00:00
Erik Ernst
1072a85ec7
Lower aliased constructor invocations
...
Change-Id: Iceb4c5bcf7e317a534eecb39f389b7e70aa39f84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169889
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Erik Ernst <eernst@google.com >
2020-11-02 15:10:09 +00:00
Johnni Winther
b74e408f1a
[cfe] Ensure redirecting factory parameters are declared before inference
...
Closes #43918
Change-Id: I5cbd733abebb388ebb1e70556f7c1ea8af105711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169888
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-11-02 15:09:19 +00:00
Johnni Winther
d70796bae8
[kernel] Add caching ability to StaticTypeContext
...
Dart2js is changed to use the caching scheme in preparation for dart2js
to use the static types computed by the CFE instead its own custom
static type computation.
Change-Id: I1d45eda2f67ce4b23d669ec49e476ee357b37fc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166845
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-10-30 17:55:21 +00:00
Johnni Winther
5efe55abf7
[cfe] Fix missing case of using receiver type instead of bound
...
+ fix test to expect erasure of `S & int` to `S` also when bound is `dynamic`.
Closes #43591
Change-Id: I44cb4c726648d4065bdf89bb2dbf71b2753c6c84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169340
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Erik Ernst <eernst@google.com >
2020-10-30 16:33:51 +00:00
Johnni Winther
9cd13cdaee
[cfe] Add test for issue42607
...
This verifies that we no longer emit spurious errors/warnings in opted out
libraries when trying to compile with sound null safety.
Closes #42607
Change-Id: I89063003fb5140d9cd0a3ce937017976e2fdd1c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169740
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-30 09:58:01 +00:00
Leaf Petersen
a6faf8f2f9
[Language] Enable null safety in Dart 2.12.
...
Closes https://github.com/dart-lang/sdk/issues/22
Change-Id: I662dd17fda0ff62a871314896fbf1dbe220f41de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166790
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Leaf Petersen <leafp@google.com >
2020-10-29 18:25:56 +00:00
Johnni Winther
13704520a0
[cfe] Indicate nullability as assignability issue when appropriate
...
Closes #43592 .
Bug: https://github.com/dart-lang/sdk/issues/43592
Change-Id: Ib57a70526a39a7125238546f08e1a2e97c279f0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168860
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-29 16:10:03 +00:00
Emmanuel Garcia
2672eb34f6
Add Flutter plugins to the list of allowed null safety experiments
...
This will allow to bump the dependencies in the Flutter repo.
https://github.com/flutter/flutter/pull/69238
Change-Id: Iacf681e88790f9805d874ec8dbfeb125779b62ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169462
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2020-10-29 01:19:33 +00:00
Alexander Markov
061848e97e
Cleanup misc remaining references to bytecode
...
Change-Id: I37c2dfb29a5bc4faf1478fb31623749cb8f67d67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169502
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
2020-10-28 21:51:20 +00:00
Srujan Gaddam
ed009afc4c
[package:js] Add static errors for invalid extends
...
Bug: https://github.com/dart-lang/sdk/issues/37896
dart2js disallows JS interop classes from extending Dart classes,
and ddc does not work as expected. Dart classes that extends JS
interop classes can't be declared in ddc and throw an error on
usage in dart2js. This CL adds static errors for both cases.
Change-Id: I72001d2e8bec046c0e1ab4c06fed8fcf84ade259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164840
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-10-28 16:04:15 +00:00
Johnni Winther
34cedb980c
[kernel] Make Procedure.kind final
...
Change-Id: I1a97c483bd0110061f4a60d26d28ab625dbbc00b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169220
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-27 13:56:38 +00:00
Jens Johansen
741bb5ec4e
[kernel] Change library nnbd bit encoding slightly
...
This is a follow-up to
https://dart-review.googlesource.com/c/sdk/+/169080
mostly changing the library nnbd bit encoding so that weak is uniquely
represented as "00" which is the default when nothing else is set.
Change-Id: I1cd31e8c1927fee29d579772fb6893cb28befbf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169200
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-27 11:53:48 +00:00
Jens Johansen
ae5fc78992
[kernel] Remove 'addMember'
...
Most of the time one already knows at the call site if it's a Field,
a Procedure etc --- so use that instead.
For now I'll leave the corresponding getters that are basically
documented as "don't use" ("[...] for convenience, not efficiency.
Consider manually iterating the members [...]").
Change-Id: Ib732759432c62963e6645f85f6df301c4281df9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168826
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-27 11:36:58 +00:00
Clement Skau
c486a07b02
[VM] Fixes yield* exception handling in sync*.
...
This adds a mechanism similar to that used in async functions where
exceptions are caught in the synthetic code and passed into the
generated body to be rethrow'n.
This ensures the exception is throw'n from the same place as the
original yield*, as per the spec.
Bug: https://github.com/dart-lang/sdk/issues/42466
Change-Id: I054b9db568a49b046b6bb49f3e775bf093f83950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160221
Commit-Queue: Clement Skau <cskau@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2020-10-27 06:46:27 +00:00
Kevin Moore
063c3ede72
Update pkg dependencies on pkg:analyzer
...
Now `pub get` actually succeeds on `pkg:front_end`
Change-Id: Ifdab9d6741efba034ecd56f27fd83e288267e46c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168662
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Auto-Submit: Kevin Moore <kevmoo@google.com >
2020-10-26 19:30:06 +00:00
Jens Johansen
bee48f6ed6
[CFE][kernel] Add more checks for NNBD settings mismatch
...
* When initializing from a dill in the incremental compiler check that
the nnbd mode matches what we're asked to compile.
If they don't, silently do not initialize from the file.
* When serializing and deserializing, assert that the individual
libraries match the component compilation mode.
* When appending dill libraries in the CFE, assert that they match
what we're asked to compile.
* Remove NonNullableByDefaultCompiledMode.Disabled -- it's not a thing
anyway.
https://github.com/flutter/flutter/issues/68901
Change-Id: I2e68f17cb3a065c4352e4db7c8aee3c13747f23a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169080
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-10-26 15:23:56 +00:00
Johnni Winther
34967229fb
[cfe] Remove custom equals/hashCode implements in ClassMember classes
...
These were added to verify consistency during refactoring of the class
hierachy builder but are not needed for semantics. As a negative
side effect deep override hierachy were severely hit on performance,
seeing an exponential blow up in class hierarchy build times.
This likely fixes the compile time regression seen in
https://github.com/dart-lang/build/issues/2688
Change-Id: Ie684efa15a7f2b9ba83c9c2dcbbbb3e579ef3575
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168942
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-10-26 10:54:05 +00:00
Johnni Winther
235453a9c9
[cfe] Disallow this access in initializers
...
Closes #43175
Change-Id: Ibd6045ac442a904c7c9c63874284687d025351c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168953
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-26 08:42:05 +00:00
Johnni Winther
a2972fe6c5
[cfe] Cache Covariance in ClassMember
...
+ use it to infer member covariance
Change-Id: Ic882040e5423b28deb77acf215c1d4890d30e3cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169060
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-26 07:44:35 +00:00
Johnni Winther
941fcbaaf8
[cfe] Only mark member signatures as forwarding stubs if covariance is changed
...
Change-Id: Ibe294b51afa6c7e3e6d683ca1a6b08817280d449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168954
Reviewed-by: Jens Johansen <jensj@google.com >
2020-10-26 07:44:35 +00:00
Johnni Winther
799a635c2c
[cfe] Use CombinedMemberSignature to create all forwarding stubs
...
Change-Id: Ia8b335350169365ed39e6de1ede4357aa0bf3984
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168941
Reviewed-by: Jens Johansen <jensj@google.com >
2020-10-26 07:44:35 +00:00
Johnni Winther
c5f478dfa8
[ddc] Don't remove covariance bits on injected members
...
The covariance optimization assumed that private members only occur
in the library in which they are private. This is not the case. The
CFE injects member signatures, forwarding stubs and noSuchMethod
forwarders for private members into other libraries.
This change takes that into account by only removing covariant bits
on members private to the enclosing library.
This hopefully a fix for https://github.com/flutter/flutter/issues/66122
Change-Id: I5070cee9eea8e785622cef33fdc7138a0a90f53a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168950
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-10-24 11:30:23 +00:00
Johnni Winther
45e3fb696d
Revert "[cfe] Use origin location for member signatures"
...
This reverts commit ed3b948b88 .
This CL caused out-of-memory on some Flutter tests.
Change-Id: Ib693f5b4a7271a070c1bab5861e49ac22437b8ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168952
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-24 09:19:24 +00:00
Alexander Markov
1615c04c63
Remove bytecode generator
...
Change-Id: Ic5fd2ab67c10ae642ee277a5acd9b4084e059861
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167762
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-23 19:30:43 +00:00
Johnni Winther
389201d6e4
Improve null-safe package dependency error message
...
Make it even clearer that the null safe package error is not a bug in Dart, but a missing dependency in the user's project. This is intended to reduce user confusion, as in https://github.com/flutter/flutter/issues/68787 .
Closes https://github.com/dart-lang/sdk/pull/43902
https://github.com/dart-lang/sdk/pull/43902
GitOrigin-RevId: cb72634b256d27f053f273a339caefcbb05567fc
Change-Id: I188e0aaa2d2b82bbd705029aa71705c7de53f1ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168981
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-23 17:19:42 +00:00
Johnni Winther
942f765763
[cfe] Use semantic nullability for "is non-nullable" queries in UP/DOWN
...
Previously declaredNullability was used which missed that FutureOr<Function?>
is nullable.
+ add computation, test and use of NonNull in UP/DOWN
Closes #43742
Change-Id: Icf0b95143a85abb5eec056ee0aea23ef40a5283a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168946
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-10-23 14:58:42 +00:00
Lasse Reichstein Holst Nielsen
51f8304b71
Add documentation to the Type class.
...
Change-Id: I32986b440d1c45d3d2a6314c03ff8864e0dcac85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108804
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Erik Ernst <eernst@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2020-10-23 12:41:52 +00:00
Jens Johansen
71f8a3285a
[CFE] Reproduction of member-signature vs forwarding stub for flutter issue #66122
...
This reproduces the weirdness seen in
https://github.com/flutter/flutter/issues/66122#issuecomment-714799890
In flutter it furthermore makes the compiled javascript go into a stack
overflow.
Notice how I've also had to introduce the option of disabling the
class ClassHierarchyTest (as it fails) to get both expect files so we
can see the differences, e.g. the introduction of
```
forwarding-stub set _widget(self2::HotReloadIssue* _) → void
return super.{fra::State::_widget} = _;
```
in `_HotReloadIssueState extends self2::__HotReloadIssueState&State&AfterLayoutMixin`.
Note that this CL doesn't fix anything.
Change-Id: Ieed6c4a3f36b94ddacc388fb2683b30e88f7d2ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168945
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-23 12:41:02 +00:00
Johnni Winther
d4e1b010c2
[cfe] Handle mixed in members separately from declared members class hierarchy builder
...
Change-Id: I2e91682ce999f66de9d7102eda25cd9ca36aa973
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168821
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-10-23 09:30:01 +00:00
Jens Johansen
c36d4d65af
[parser] Give errors when 'external' comes in wrong order
...
Fixes https://github.com/dart-lang/sdk/issues/43851
Fixes https://github.com/dart-lang/sdk/issues/43858
Fixes https://github.com/dart-lang/sdk/issues/43859
Change-Id: I33c9cde01a0843efba3ca0d0a679f4e31b06237c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168650
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-10-23 09:19:01 +00:00
Jens Johansen
553230ffb4
[parser] Give errors when 'abstract' comes in wrong order
...
Fixes https://github.com/dart-lang/sdk/issues/43855
Fixes https://github.com/dart-lang/sdk/issues/43856
Fixes https://github.com/dart-lang/sdk/issues/43857
Change-Id: I83ee716288741d2d84a1993e9743ad4b82af22ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168646
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-10-23 08:05:31 +00:00