Peter von der Ahé
3a9240374e
Generalize warnUnresolvedSuper{Get,Set,Method}.
...
Change-Id: I79a342bde85c34c1f9c531532f0af23777691569
Reviewed-on: https://dart-review.googlesource.com/7713
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Peter von der Ahé <ahe@google.com >
2017-09-25 12:44:32 +00:00
Aske Simon Christensen
fab74715fe
Report error if a member has the same name as the enclosing class
...
To recover properly from the error, change lookup priority in the Diet Listener from setter, field/getter/method, constructor to setter, constructor, field/method/getter.
Closes https://github.com/dart-lang/sdk/issues/29944
Change-Id: I3648501880e4e2059c386aa0032d37d0470aab96
Reviewed-on: https://dart-review.googlesource.com/7712
Commit-Queue: Aske Simon Christensen <askesc@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-25 11:55:02 +00:00
Brian Wilkerson
cc787d4803
Recover from getters that have parameter lists
...
Change-Id: I07665f297f067537a45e304d1f1138b6532e8c21
Reviewed-on: https://dart-review.googlesource.com/7559
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-23 00:13:58 +00:00
Brian Wilkerson
29dd1d6ab3
Recover from finding a colon in a for-in loop
...
Change-Id: Idc10149af816d50046289ac29b3d6480a4caa51d
Reviewed-on: https://dart-review.googlesource.com/7761
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-09-22 19:36:28 +00:00
danrubel
603158e917
report more analyzer error messages
...
Change-Id: I8b196ff7fca0e9fb1a5f0dfe6a3477887efa0f76
Reviewed-on: https://dart-review.googlesource.com/7640
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-22 17:01:37 +00:00
Dan Rubel
2140b878a7
cleanup parser event param
...
This removes the rightParen from parser events
and uses leftParen?.endGroup when needed
Change-Id: Ibc919edff4fffddc35d100453ac652eb5c5ac6e5
Reviewed-on: https://dart-review.googlesource.com/7560
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-09-22 15:50:37 +00:00
Dan Rubel
8fedf42184
fix out of order directive error codes
...
Change-Id: I903d3e5e59b9d836c7dbe23c5610286437731cb2
Reviewed-on: https://dart-review.googlesource.com/7500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-22 13:06:15 +00:00
Peter von der Ahé
5bd48bf6f4
Implement instrumentation of warnings.
...
Change-Id: Ifa1e093dd40b7b36da28adaf6193fb35996872fb
Reviewed-on: https://dart-review.googlesource.com/7555
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-09-22 11:35:22 +00:00
Aske Simon Christensen
944b7715bd
More general handling of expected identifier after dot
...
Don't crash when a dot is followed by something which is not an identifier or keyword. Give a more general error message which does not assume that the unexpected token is a keyword.
Closes https://github.com/dart-lang/sdk/issues/29941
Closes https://github.com/dart-lang/sdk/issues/29943
Change-Id: I6e8ea9682680e5f374b70a6ee8c6bb9dd3271b4b
Reviewed-on: https://dart-review.googlesource.com/7270
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-22 10:32:55 +00:00
Kevin Millikin
785ae4a9e0
[Kernel] when transferring libraries, keep their canonical names
...
Before: ownership of some or all of the libraries from one Kernel
program (P1) would be transferred to another program (P2). All the
canonical names in P1 would be unbound from their references and the
canonical names would eventually be recreated for the libraries that
were transferred.
After: when ownership of a library is transferred, the ownership of
the canonical name subtree rooted at the library's name is also
transferred. This allows the 1:1 relationship between Canonicalname
and Reference to be maintained which will enable lazy deserialization
of procedure bodies (because the mapping from CanonicalNames to
References in the corresponding link table will be persistent).
Change-Id: I98f975d6ba5804f975c30528a484756b39f09d2a
Reviewed-on: https://dart-review.googlesource.com/7549
Commit-Queue: Kevin Millikin <kmillikin@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2017-09-22 08:19:27 +00:00
Paul Berry
d04154084b
Minor changes to subpackage_relationships_test.dart
...
- We now favor Platform.packageConfig (if non-null) for finding the
.packages file.
- We allow .dart files to be symbolic links.
These changes allow the test to work inside google3.
Change-Id: I58939a1c89ee326d98fb9ab5ab56c5d9881c6823
Reviewed-on: https://dart-review.googlesource.com/7584
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-21 17:59:23 +00:00
Dan Rubel
76ad63dadb
fix error dangling annotation
...
Change-Id: Iad0870c7d4a4864654af22f8fc7d69b0be961d4e
Reviewed-on: https://dart-review.googlesource.com/7420
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-21 17:28:07 +00:00
Brian Wilkerson
6edb5d8df7
Add recovery for field formal parameters
...
Change-Id: I09a1c6627a8fc1d67ffad4010212f2e9511612fe
Reviewed-on: https://dart-review.googlesource.com/7108
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-21 13:47:52 +00:00
Paul Berry
291b83b345
Move reload.dart to test directory.
...
This will allow us to run hot_reload_e2e_test.dart internally.
Change-Id: Ia44b086683ea629a0af15addd652543daa1700ce
Reviewed-on: https://dart-review.googlesource.com/7450
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-09-21 13:43:02 +00:00
Peter von der Ahé
9baee97ea2
Revert "Add NamedNode.nameOffset, fill it for constructors, and use in Analyzer."
...
This reverts commit 9a8621b60a .
Revert "Rework getElement() in resynthesizer."
This reverts commit e4fa080f69 .
Revert "Create (empty) initializers for parameters resynthesized from Kernel."
This reverts commit 8df6c79b9d .
Revert "Run NonErrorResolverTest in strong mode. Extract not strong tests."
This reverts commit 9bdda4b1d3 .
Revert "Move TypeProvider creation into KernelResynthesizer and create loadLibrary functions."
This reverts commit c59eaf1788 .
Revert "Return SimpleIdentifier or PrefixedIdentifier from _buildIdentifier()."
This reverts commit 6d0515f9ca .
Change-Id: I1099ca715ce6287ab56808b7cc3abe0589e939c1
Reviewed-on: https://dart-review.googlesource.com/7550
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-21 12:19:47 +00:00
Paul Berry
45521d17c4
Change main functions in test files to take optional args.
...
This will allow these tests to be run inside google3, where the test
framework calls main with no arguments.
Change-Id: I139a9b100fe3a1eb3003933ec9fef4298706ff5d
Reviewed-on: https://dart-review.googlesource.com/7342
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-09-20 21:07:27 +00:00
Dan Rubel
7e25f2a336
tests for annotation at EOF
...
Change-Id: I43aafd04dba8511cb603c6ca31a8135d868f52ef
Reviewed-on: https://dart-review.googlesource.com/7300
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-20 18:24:24 +00:00
Konstantin Shcheglov
9a8621b60a
Add NamedNode.nameOffset, fill it for constructors, and use in Analyzer.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: If0f815e86049381e9db3386f243789e9b4f9f5ce
Reviewed-on: https://dart-review.googlesource.com/6780
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-20 17:54:30 +00:00
Paul Berry
a8afd3ab16
Remove reified_dart.dart, batch_consistency.dart, and dartk.dart.
...
These files all have to do with the old "dartk" front end, which is no
longer used.
Change-Id: I67041bf0a3a8a9213153123d9f79ac1632cc4d24
Reviewed-on: https://dart-review.googlesource.com/7101
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-09-20 15:33:16 +00:00
Paul Berry
2d74043f3a
Implement type promotion of type parameter bounds.
...
Fixes #30804 .
Change-Id: I16094e54514b2109fda4b388083d2467a0b11bc7
Reviewed-on: https://dart-review.googlesource.com/7105
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-09-19 23:19:46 +00:00
Dan Rubel
9c1d97bb9c
update parser to use token.isModifier
...
Change-Id: Iee07cbde6c45b621bb13d1774c1d9f4bd97268ea
Reviewed-on: https://dart-review.googlesource.com/6840
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-09-19 20:27:03 +00:00
Brian Wilkerson
bd33fb43bd
Pass the left brace in an enum declaration to the listeners (rather than the right brace)
...
Change-Id: I3bec6cbde6beb1233c48e7ed8926f0e98fd8e3a5
Reviewed-on: https://dart-review.googlesource.com/6741
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-09-19 15:35:33 +00:00
Aske Simon Christensen
2259cd377c
Better error message for illegal qualified types
...
Also simplifies handleType to include only the relevant cases.
Closes https://github.com/dart-lang/sdk/issues/29940
Closes https://github.com/dart-lang/sdk/issues/29945
Closes https://github.com/dart-lang/sdk/issues/29980
Change-Id: If685437a7689aadaf980cc626be09296c74d00e9
Reviewed-on: https://dart-review.googlesource.com/6920
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Aske Simon Christensen <askesc@google.com >
2017-09-19 13:20:03 +00:00
Konstantin Shcheglov
8a90e7a113
Explicitly disable colors in CompilerContext when run KernelDriver.
...
Running external processes while performing compiletion is crazily
expensive and surprising. This makes NonErrorResolverTest_Kernel about
2x faster (although still 2x slower than the current AnalysisDriver
implementation).
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: I577fc15de50eeb7eba9454cb506bb2c30cd161ff
Reviewed-on: https://dart-review.googlesource.com/6660
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-19 01:08:08 +00:00
Konstantin Shcheglov
d6fff5126d
Fix for storing and resynthesizing import/export directive offsets.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: Icc187e2b68a765b65455c05a2d25a816123a9e92
Reviewed-on: https://dart-review.googlesource.com/6641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-18 17:46:13 +00:00
Brian Wilkerson
0995bbd6ef
Pass the left paren in to listeners
...
Change-Id: I7de73b11c001f56fd45f60f58623c905b5a29f31
Reviewed-on: https://dart-review.googlesource.com/5325
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-18 16:34:26 +00:00
Jens Johansen
4d55a6779e
[kernel] Offset on IfStatement
...
Bug:
Change-Id: I40acad4d9f66da0324dcf7da95aab05c0784faac
Reviewed-on: https://dart-review.googlesource.com/5661
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-09-18 09:31:09 +00:00
danrubel
dc5378d3bd
Update front_end messages_test
...
Update the test to report any messages
that have analyzerCode without a dart2jsCode
Change-Id: Icdbc5c71c25e7820d133388a8917ee373dbb611b
Reviewed-on: https://dart-review.googlesource.com/6280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-17 14:52:42 +00:00
Paul Berry
76bfd75d51
Create a new class to handle propagation of covariance information.
...
This class will be expanded in future CLs to add the ability to create
forwarding stubs.
Change-Id: Icba0c19e7a5dcd3f55f559154fd0938e0190652f
Reviewed-on: https://dart-review.googlesource.com/6344
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-17 13:57:38 +00:00
Konstantin Shcheglov
329523060f
Parse annotations for enums and named mixin applications.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Iadc4de193176be22ea0af8f371f578df938b423c
Reviewed-on: https://dart-review.googlesource.com/6167
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-15 23:27:08 +00:00
Sigmund Cherem
1ca12788c6
Revert "Check whether type-arguments and type-parameters length match from the body builder."
...
This reverts commit 321a4ec048 .
Some VM tests expect to see the behavior with a raw type instead of
an invalid type. I'll revert first, then resend this CL with the default
result changed.
R=ahe@google.com
Change-Id: I2cdd855dbaec93d0a0c257f7e202518fd9b59c81
Reviewed-on: https://dart-review.googlesource.com/6342
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-15 22:15:09 +00:00
Sigmund Cherem
321a4ec048
Check whether type-arguments and type-parameters length match from the body builder.
...
Bug:
Change-Id: I395365393c9032ff179d675f42ca56b7981531e0
Reviewed-on: https://dart-review.googlesource.com/5620
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-15 20:37:41 +00:00
Paul Berry
24e1a84fcd
Add more tests of forwarding stubs for fields.
...
Change-Id: I0229fdaadc80dcea6e9977e3af015202352e2e32
Reviewed-on: https://dart-review.googlesource.com/6200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-15 19:13:27 +00:00
Sigmund Cherem
b09e403e5c
Fix command to update expectations
...
Change-Id: I0c9ec26c1b94779e1b31c045f82864ccce6d0266
Reviewed-on: https://dart-review.googlesource.com/6164
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2017-09-15 17:47:49 +00:00
Paul Berry
d161b43df7
Fix annotations on forwarding stubs to match new terminology.
...
Also add a missing test case.
Change-Id: I662e666227fab2ab004869bc126eb1428d9eb9a2
Reviewed-on: https://dart-review.googlesource.com/6180
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-15 17:32:33 +00:00
Paul Berry
ccc177b1ce
Extend covariance checks to handle fields.
...
Change-Id: I8f9a7569977f2fe21da3c121903190ee507b4414
Reviewed-on: https://dart-review.googlesource.com/6161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-15 16:45:42 +00:00
Brian Wilkerson
b30fab9320
Pass the of keyword in part-of directives to listeners
...
Change-Id: I0774f6ee806aff52981bc2f049ef402f4f52c102
Reviewed-on: https://dart-review.googlesource.com/5340
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-15 15:54:43 +00:00
Paul Berry
034a8f37a4
Rework terminology and representation of covariant checks.
...
Instead of using enums, we use booleans, and we change the terminology
as follows:
FormalSafety.semiSafe -> isGenericCovariantImpl
InterfaceSafety.semiTyped -> isGenericCovariantInterface
(The enum value FormalSafety.unsafe turned out to be redundant with
isCovariant, so it is no longer needed).
Similarly, the annotations in the front end tests are updated as follows:
@checkFormal=unsafe -> @covariance=explicit
@checkFormal=semiSafe -> @covariance=genericImpl
@checkInterface=semiTyped -> @covariance=genericInterface
Change-Id: Iafc0c5d3fc4e7608a2b8c52d8c29f293d9219995
Reviewed-on: https://dart-review.googlesource.com/5540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2017-09-15 15:43:50 +00:00
Dan Rubel
db7129d8a4
cleanup endMetadataStar event
...
Change-Id: I9fcd69219858cdb063d3e37f2788750f72132d65
Reviewed-on: https://dart-review.googlesource.com/6140
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-15 12:37:37 +00:00
Konstantin Shcheglov
0a76d327e3
Resynthesize LibraryElement documentation from Kernel.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: I24fe6be8c27b0182eb859073cd9cba498065d23b
Reviewed-on: https://dart-review.googlesource.com/6081
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-09-15 03:47:57 +00:00
Paul Berry
5014aebb8d
Avoid a crash when a method overrides a field.
...
Fixes #30695 .
Change-Id: I7935f8d1895e47477ddb1291809efb246c92b913
Reviewed-on: https://dart-review.googlesource.com/5960
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-14 21:44:58 +00:00
Konstantin Shcheglov
e0f906068b
Resolve to dynamic if the type prefix is not a String.
...
Currently we implicitly cast the prefix to String and this sometimes
fails, and cause one test in Analyzer resynthesizer fail in checked
mode only.
https://dart-review.googlesource.com/c/sdk/+/5891
R=ahe@google.com , paulberry@google.com
Bug:
Change-Id: I92993b12f74799defed837c43bda1be734a97787
Reviewed-on: https://dart-review.googlesource.com/5940
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-14 21:07:55 +00:00
Paul Berry
6bf3330e29
Enable a test now that #30034 is fixed
...
Change-Id: Ie8796e7d66281329917ea5b1cb50278a00325a88
Reviewed-on: https://dart-review.googlesource.com/5890
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-14 20:21:29 +00:00
Paul Berry
872c843040
Suppress type promotion when the promoted type would not be a subtype.
...
Fixes #30699 .
Change-Id: I2b3d93e5dbef208f2266bcae4954bebec19cb1cd
Reviewed-on: https://dart-review.googlesource.com/5887
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-14 20:04:26 +00:00
Konstantin Shcheglov
2ffe920fd0
Don't use absolute path for the test in expectations.
...
Sorry for spamming.
I messed it up again :-(
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Id9167724b7e711ee006b395284a09bfb25e5b4c9
Reviewed-on: https://dart-review.googlesource.com/5892
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-14 20:01:03 +00:00
Konstantin Shcheglov
bee9cc3c42
Revert "Don't use absolute path for the test in expectations."
...
This reverts commit 047cd9265d .
Reason for revert: Unintentional changes.
Original change's description:
> Don't use absolute path for the test in expectations.
>
> R=ahe@google.com , paulberry@google.com , sigmund@google.com
>
> Bug:
> Change-Id: I5fae0b9c26c9d1766bfe3e53b00d1be3d49aad81
> Reviewed-on: https://dart-review.googlesource.com/5888
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
TBR=paulberry@google.com ,ahe@google.com ,scheglov@google.com ,sigmund@google.com
Change-Id: I1115f49d4a6c66ed8db40b29dc3a4d83b8075c51
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/5900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-09-14 19:57:08 +00:00
Konstantin Shcheglov
047cd9265d
Don't use absolute path for the test in expectations.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: I5fae0b9c26c9d1766bfe3e53b00d1be3d49aad81
Reviewed-on: https://dart-review.googlesource.com/5888
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-14 19:53:09 +00:00
Konstantin Shcheglov
8ea25ec10c
Resynthesize deferred imports from Kernel.
...
R=brianwilkerson@google.com
Bug:
Change-Id: I6eca89aced40ccfca273152860dad2c5fdd3ddb5
Reviewed-on: https://dart-review.googlesource.com/5886
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-14 19:25:21 +00:00
Konstantin Shcheglov
2e7d54ae33
Refactor kernel shaker.
...
1. Make helper classes private to the library.
2. Merge RootsMarker into _RetainedDataBuilder.
3. Format and sort.
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: I87d9a553044de61d04600ef2e00081a58de2d92b
Reviewed-on: https://dart-review.googlesource.com/5882
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-14 18:31:51 +00:00
Konstantin Shcheglov
84ef57d722
Rename .shaker/.outline to .shaker.expect/.outline.expect and update the message.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: I958e7e4a593d5dac2fe0ff6a14852c5587b49672
Reviewed-on: https://dart-review.googlesource.com/5884
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-14 18:17:34 +00:00