Johnni Winther
02f0f53ddf
[cfe] Don't block nnbd top merge on typedef types
...
The MergeVisitor was trying to merge FunctionType.typedefType in order
to merge function types, thus preventing nnbd top merge of two
compatible types that were just introduced through different typedefs
or function type syntax.
Change-Id: Icea75598168c86ed33314db22ebeec3e666c3675
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184785
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-02-16 11:30:21 +00:00
Johnni Winther
8103c90dbf
[cfe] Use combined member signature in override inference in legacy code
...
+ emit only one message per method given that it now always has the
same root cause, namely that the combined member signature does not
exist.
Closes #31797
Change-Id: Id89a5557c5fdda1db087c20cbe92847dd08216a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175305
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-12-09 17:33:20 +00:00
Johnni Winther
c7519a3f01
[cfe] Pass static target to inferInvocation
...
This is used to detect calls to identical which need special treatment
for flow analysis.
Change-Id: I5109ccc94cdffd8cd46843adfbe4df6b83b92122
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175240
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-12-07 13:21:57 +00:00
Konstantin Shcheglov
24852421e2
Change method override inference to use combined member signature.
...
https://github.com/dart-lang/language/pull/975
Change-Id: I5cec14a384b124a29dcd5adac0f0be6e5214cc9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151044
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-12 18:59:28 +00:00
Johnni Winther
f4f0ba4b36
[cfe] Update id-tests post unfork
...
These were for some reason not updated by the update_all script on the
first run.
Change-Id: I49dc1f5524c120947a971356548755325c63e8d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147360
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-05-08 17:25:41 +00:00
Johnni Winther
3f18d37333
[cfe] Implement NNBD_TOP_MERGE update
...
Change-Id: I6b204b5d7def6a9d1dd4709e47f95eb102741489
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144763
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-04-27 16:28:08 +00:00
Konstantin Shcheglov
7e4673f497
Check overrides using only direct superinterfaces.
...
Change-Id: Ib17c3fb18d6ec4ff4541835a78c645a7b13affd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142760
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-04-21 02:42:04 +00:00
Konstantin Shcheglov
f290ae0696
Issue 40554. Apply NORM and TOP_MERGE only when one of the interfaces is not syntactically equal.
...
Bug: https://github.com/dart-lang/sdk/issues/40554
Change-Id: Ib96873a825a5a33142655231881562e278b586d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143249
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-04-13 16:42:13 +00:00
Konstantin Shcheglov
fa3a4eb956
Update TOP_MERGE according to the spec change.
...
Bug: https://github.com/dart-lang/sdk/issues/41412
Change-Id: If61638188e594cb1b4272e0011ff0ebd5dbb2772
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142942
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-04-09 16:28:09 +00:00
Konstantin Shcheglov
dcdc71d763
Report CONFLICTING_GENERIC_INTERFACES using ClassHierarchy.
...
Change-Id: Ib5d79403358efffd5365ac4931c3163d746d933a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142567
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-04-07 15:50:28 +00:00
Johnni Winther
46bb15edf3
[cfe] Fix inheritance test data discrepancies.
...
Change-Id: I367aace60324a7755f795d2f24aaf0d138bc8d59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141602
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-04-02 13:14:39 +00:00
Konstantin Shcheglov
c957128c7e
Document differences in inheritance tests between CFE and analyzer.
...
Change-Id: I812a268990f8db844b03f06545804ce60e7164e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141380
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-03-30 17:34:08 +00:00
Konstantin Shcheglov
8120ee57d2
Merge types during instance member inference.
...
Change-Id: If3f252d1c031fcb5219e485ac7a053186e6b950c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141207
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-03-27 16:22:26 +00:00
Konstantin Shcheglov
216d98ad2c
Use NNBD_TOP_MERGE to combine signatures of the inherited members.
...
Initial: https://dart-review.googlesource.com/c/sdk/+/133041
Reverted: https://dart-review.googlesource.com/c/sdk/+/133086
Instance inference is not supported yet in this CL, will continue
in following CLs.
Change-Id: I72de01180b0624eeafc03bfe415ed3d928f1110f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133167
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-03-26 21:13:12 +00:00
Johnni Winther
9605fc367f
[cfe] Report error on required named parameters overriding optional named parameters
...
Closes #40950
Change-Id: I5d829affd3df9ca66d5a1b632f364779bdcfb2ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140541
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-03-24 06:22:16 +00:00
Konstantin Shcheglov
5e4f28b900
Use ClassHierarchy for computing implemented interfaces.
...
Change-Id: Ie7acf61f9a29d59cc1416dea85a6adb7c534b8c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-03-23 22:00:37 +00:00
Konstantin Shcheglov
6b7d7aa2c1
Type Function should be excluded from extended / implemented / mixed types.
...
Change-Id: If225400a976657f042856bfdaf95b285f98cebb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-03-23 20:35:37 +00:00
Johnni Winther
0e75a0650f
[cfe] Handle mixing in Function
...
Closes #35477
Closes #35573
Change-Id: I0612641108caf1fa08da1aae7684e7f33dfe3b46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140402
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-03-23 09:56:30 +00:00
Konstantin Shcheglov
bdf1454357
Consider FunctionType(s) with required named parameters as subtypes of legacy FunctionType(s) with named parameters.
...
Change-Id: Ic2f6b0226ec7885e45ef54053b95b84d3bbf8201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140181
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-03-21 21:51:36 +00:00
Johnni Winther
eb4880beca
[cfe] Don't include Function in Class.supertype and Class.implementedTypes
...
Change-Id: Ib510080a331915a66a0ca51507f8f2bcd29940c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140042
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-03-20 16:48:09 +00:00
Johnni Winther
6dff390dec
[cfe] Compute consolidated supertypes
...
Change-Id: Ifa2303afd61af184b171f13f5959b0786273cedb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140041
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-03-19 15:26:09 +00:00
Dmitry Stefantsov
3b6935f30e
[cfe] Report NNBD warnings as errors in strong mode
...
Closes #40981 .
Bug: https://github.com/dart-lang/sdk/issues/40981
Change-Id: I95715ab973a6f09bf7f8b4e090e5a80663cd4861
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139463
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-03-19 11:26:39 +00:00
Johnni Winther
6c6144bb74
[cfe] Implement consolidated in ClassHierarchyBuilder
...
Closes #40414 and #40156
Change-Id: I066aa8ceef4f998230215fd9e9b446b2281cc3bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138294
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-03-13 08:16:49 +00:00
Johnni Winther
101588f0f4
[cfe] Implement legacy top merge functionality
...
+ fix getter/setter type inference
Change-Id: I9a4bed2b6a53131cbc9946bac0a01a4b15a63a91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137922
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-03-03 12:19:09 +00:00
Johnni Winther
fbe9f6115d
[cfe] Handle Object* in NNBD_TOP_MERGE
...
Closes #40481
Change-Id: I5f1060b137e9855106873b2173930d3ebed69930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137921
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-03-02 12:15:50 +00:00
Johnni Winther
5800997ed7
[cfe] Correctly merge nnbd signatures
...
Change-Id: I33e55f6ba4c2822c790667a06e0456410696ca04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137920
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-03-02 12:15:50 +00:00
Johnni Winther
a9162bd599
[analyzer,cfe] Implement mixed inheritance id test for analyzer
...
Change-Id: Ie4ce09b83c2a96a5ad16c60d2924f18cd90a4089
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136633
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2020-02-24 13:28:26 +00:00
Johnni Winther
5829fc7829
[analyzer,cfe,dart2js] Add marker.options files to automate running id tests on all configurations
...
Change-Id: Ib5eb7f3967634721047f8dcc57b9e6c350b91a41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136226
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-21 08:34:26 +00:00
Johnni Winther
6adbaacca3
[cfe] Add test for issue40524
...
Change-Id: Ic061bf901752ff1e776a8a3c6933128fadff2da0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136130
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-18 12:56:09 +00:00
Johnni Winther
a350984b65
[cfe] Add inheritance tests for reported problems
...
Change-Id: I2dfc46f718e7609f3626040eb3542b5441574975
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135907
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-18 12:00:29 +00:00
Johnni Winther
514a754150
[cfe] Add ClassMember.isProperty
...
Change-Id: I08e38f706f4606e80b607f180443924c85ee4b2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135905
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-18 11:05:04 +00:00
Johnni Winther
ed2df21191
[cfe] Decouple MemberBuilder from ClassMember
...
Change-Id: Ia9d3a3ffa51781cfef1af0451902fe97620d2517
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135303
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-02-12 09:57:55 +00:00
Dmitry Stefantsov
fd992e423e
[cfe] Normalize supertypes before nnbd-top-merging them
...
Closes #40454 .
Bug: http://dartbug.com/40454
Change-Id: Ia255c99c937a04876e04a0f0f5935147e55fbd35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134842
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-07 18:14:40 +00:00
Johnni Winther
0fe2779149
[cfe] Don't check override for member signatures.
...
Closes #40460
Change-Id: If418c0c809ec15febfa63c5363f8353cb16fc9de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134521
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-06 08:59:31 +00:00
Johnni Winther
178384832c
[cfe] Handle unresolved superclass on opt-out class with opt-in platform
...
Closes #40366
Change-Id: I3452cc825df52009cb294102d99de06c168413f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133782
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-31 08:27:21 +00:00
Johnni Winther
5fb7223b9a
[cfe] Handle parameter type inference for mixed inheritance
...
Closes #39207
Change-Id: Idaac1dcf6980fdebff326002adc466cb06fd0c91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133781
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-30 14:26:38 +00:00
Johnni Winther
7248e98023
[cfe] Support nnbd platform without experiment enabled
...
All handling of the opt-out features were guarded by the experimental flag.
With this CL the opt-out semantics is used irregardless of the
the experimental flag. This supports compiling with opt-out semantics
against libraries which have been compiled with the flag enabled, as will
be the case when the nnbd sdk is unforked.
Closes #40334
Change-Id: I2df5c700f97844bdd3e33bccba7e72013f0c831e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133780
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-30 12:56:26 +00:00
Johnni Winther
5b47e0fbb7
[cfe] Special case inference of Object.== parameter in legacy mode
...
Closes #40334
Change-Id: I526ff75a2f135d911f8d555804d03cddc98c3bc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133234
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-28 13:17:37 +00:00
Johnni Winther
0a771440dd
[cfe] Using isSameType in override checking of bounds
...
Closes #40220
Change-Id: I2008bcd4c96fb05efad4bd446215cd5710731fce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132846
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-24 12:41:19 +00:00
Johnni Winther
4ad57412bb
[cfe] Use legacy erasure and nnbd top merge in computation of supertypes in ClassHierarchyBuilder
...
Closes #40134
Change-Id: I50e6f4c6fe7b1e0fa7f3e0e609e015f630cff1b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132343
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-22 08:37:36 +00:00
Johnni Winther
5e389080a4
[cfe] Test supertypes computed from ClassHierarchyBuilder
...
Change-Id: Ia079754bd8272d7b5689a3bdab1e69d5188082be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132342
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-22 07:08:36 +00:00
Johnni Winther
d302d7f10a
[cfe] Insert member signatures for nnbd aware inheritance
...
Change-Id: I86dbbd586434af81b6dc4f4ae748cbd8177d06e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129080
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-15 07:36:28 +00:00
Johnni Winther
818ec6db92
[cfe] Implement nnbd-top-merge
...
+ and use nnbd-top-merge and legacy erasure in hierarchy computation
Change-Id: I4bf06ce8d3c68a9926865ebf84b24b4029828d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128065
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-12-13 17:19:59 +00:00
Dmitry Stefantsov
d9d5fbc109
[cfe] Create TypeParameterTypes with default nullabilities
...
Change-Id: I85be937240ba5cc39840e78f374902c1e36521a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124327
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2019-11-19 11:22:43 +00:00
Johnni Winther
f443bc918e
[cfe] Add tests for inheritance from opt-out libraries
...
Change-Id: If139945dfdd808da0c24ac550ecfa235b41d3c23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123737
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-11-13 10:08:08 +00:00