Commit Graph

4770 Commits

Author SHA1 Message Date
Paul Berry c90e0b9cb3 Propagate covariance fixes to fields.
Change-Id: Iedd00f8d9acb6208cbdd127a1a39a48a1f10ddda
Reviewed-on: https://dart-review.googlesource.com/9120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-28 17:59:53 +00:00
Konstantin Shcheglov b756c80ac0 Store documentation comments directly into Kernel AST nodes.
R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug:
Change-Id: Ibe818653b8a4f92aad3aadc37da9d6fbacf35eb4
Reviewed-on: https://dart-review.googlesource.com/8721
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-09-28 17:06:01 +00:00
Paul Berry f406efd265 In InterfaceResolver, favor inheriting the first member with the proper type.
We have to generate a forwarding stub whenever the inherited member
isn't the same as the one that ClassHierarchy would have chosen, and
ClassHierarchy favors inheriting the first member.  So this will avoid
creation of unnecessary forwarding stubs.

Change-Id: If2411c6ed0474da66544735b196f8042f98c2591
Reviewed-on: https://dart-review.googlesource.com/9063
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-27 22:38:47 +00:00
Paul Berry 46734c96f9 Create forwarding stubs properly for getters, setters, and fields.
Change-Id: Ife2be67a29d46957e56ff34faab83c15f9f8579b
Reviewed-on: https://dart-review.googlesource.com/9062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-27 22:29:02 +00:00
Paul Berry c0a2789b00 Clear class inference info after type inference is complete.
This should allow more memory to be reclaimed by GC.

Change-Id: I9fe8ad5ffb1b92910457630579bb0822fad9a3cc
Reviewed-on: https://dart-review.googlesource.com/9061
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-27 22:23:21 +00:00
Paul Berry c13eb60426 Implement logic for creating forwarding stubs and propagating covariance annotations.
This logic isn't hooked up yet; it's just unit tested.

Change-Id: Iacaf4fbc7c31be68c4c38cea60eca080c2aa1637
Reviewed-on: https://dart-review.googlesource.com/8734
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-27 17:57:34 +00:00
Dan Rubel f0caee1b24 Improve import directive recovery and report analyzer errors
- New handleRecoverImport event
    for clauses in import directive that are out of order
- New error codes for
    Duplicate prefix
    Prefix after combinator

Change-Id: I0fea7ad4b4014a0b8578d3982e0515fe85044854
Reviewed-on: https://dart-review.googlesource.com/7980
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-27 12:56:46 +00:00
Konstantin Shcheglov 7f33f78026 Issue 30875. Don't damage _redirecting# when adding kernels to DillLoader.
R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug: https://github.com/dart-lang/sdk/issues/30875
Change-Id: Iede037673458131a357050ab61eb9930b70d372b
Reviewed-on: https://dart-review.googlesource.com/8381
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-09-26 20:41:14 +00:00
Paul Berry 1916dc75e6 Move command_line.dart and most of compile_platform.dart into lib/
This should make it possible to run compile_platform_test.dart inside
google3, where package layout conventions are more strictly enforced
(files in test/ cannot import files in tool/).

Change-Id: I2299e0340b0edfc1a684a635de8cf87ecb9f241f
Reviewed-on: https://dart-review.googlesource.com/8701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-26 17:34:01 +00:00
Paul Berry 9b45cc7e4d Implement ForwardingNodes.resolve().
This method figures out which method a given forwarding node resolves
to, accounting properly for the fact that when there is multiple
inheritance, the inherited method is the one with the most specific
type.

Change-Id: Ia412e2d195dd697e35c1c08480b51f2a6bd1cac5
Reviewed-on: https://dart-review.googlesource.com/8360
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-26 16:48:11 +00:00
Aske Simon Christensen 394f854fec Catch URI parse failure and report error
Closes https://github.com/dart-lang/sdk/issues/29977
Closes https://github.com/dart-lang/sdk/issues/29987
Change-Id: I448089036b20572d1cc8cb9d5e79cfd402caf273
Reviewed-on: https://dart-review.googlesource.com/8440
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-09-26 11:26:20 +00:00
Sigmund Cherem 4c893290e4 Reapply "Check whether type-arguments and type-parameters length match from the body builder."
This reverts commit 1ca12788c6.

Patchset 1 is the reverted CL, patchset 2 shows the changes.

Bug:
Change-Id: I4ffcb9ec20f2ac3c59d09adc3a6693f52c71601d
Reviewed-on: https://dart-review.googlesource.com/6360
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-09-26 04:09:37 +00:00
Paul Berry 95552a890e Verify consistency between InterfaceResolver and ClassHierarchy.
One of the roles of InterfaceResolver will be to determine when
ClassHierarchy's technique for finding an inherited member would
produce the wrong result, and adding a forwarding stub when that
happens.  Since ClassHierarchy's technique for finding an inherited
member is to just pick the first member it finds, we need to make sure
InterfaceResolver visits superclasses in the same order, so it will
know which member ClassHierarchy would pick.

This CL adds tests to make sure both classes visit members in the same
order, by testing that:

- methods in mixins take precedence over those from superclasses.

- methods in superclasses take precedence over those from interfaces.

- methods in interfaces are considered in the order in which the
  interfaces are named.

Also, I discovered that it was unnecessary for InterfaceResolver to
visit mixins, since ClassHierarchy has already merged methods from
mixins into the list of members it considers to be "declared in" the
class.

Change-Id: If0ca03824887c87e0ae2090532c75cf6c5ad3161
Reviewed-on: https://dart-review.googlesource.com/8322
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-25 22:06:49 +00:00
Paul Berry d9ca760992 Start writing the infrastructure for creating forwarding stubs.
This CL adds the ability to create a list of "forwarding nodes" for a
source class.  A forwarding node is a data structure that will later
be resolved to either an explicitly declared member in the class or a
superclass, or to a forwarding stub.  The idea is that we will create
the forwarding nodes at the time of outline building, and later,
during type inference, we will resolve each forwarding node as it is
encountered.

The reason we need to defer resolution of the forwarding nodes until
inference is because we may need to use the results of type inference
to determine which member a given forwarding node resolves to.  For
example:

num f() => 1;
class A {
  final x = 1; // Inferred type: int
}
class B {
  final x = f(); // Inferred type: num
}
abstract class C implements A, B {}

We cannot determine at the time of building the outline for C whether
it inherits its x from A or B, because we need the results of type
inference to determine which of the two x's has a more specific type.

Note that some refactoring of ClassHierarchy was necessary in order to
allow the front end to maintain member lists in the same order used
internally by ClassHierarchy.  This will let us avoid unnecessary
redundant sorting of methods.

Change-Id: Iee754957e0ad3b16c4b60608e17a4a7b0006dfb4
Reviewed-on: https://dart-review.googlesource.com/7851
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-25 20:59:49 +00:00
Paul Berry ac57ed0a09 Visit classes in topo order when preparing inference.
This will be needed once we start adding the creation of forwarding
stubs to inference, since we'll need to create the forwarding stubs
for base classes before creating the forwarding stubs for derived
classes.

Also, change the nomenclature "prepareInitializerInference" to
"prepareTopLevelInference" since this inference stage already infers
more things than just initializers, and will soon start doing even
more.

This required creating a "ShadowClass" class to allow easy access to
the SourceClassBuilder from the Class object.  In future CLs I will
store other information related to inference and forwarding stubs in
ShadowClass.

Change-Id: Ie322c6c2230de2ffd2c042a707289992b1967f4f
Reviewed-on: https://dart-review.googlesource.com/7852
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-25 17:42:27 +00:00
Dan Rubel bc5531fd1c remove native clause processing from parser listeners
* Finish updating the fasta parser to handle native clauses
* Remove outdated native clause processing from listeners

Change-Id: I2797145d6aff07da2ee4e008d5e1f233f30813a2
Reviewed-on: https://dart-review.googlesource.com/7900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-09-25 15:48:49 +00:00
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
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
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
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 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
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 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 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