Commit Graph

1972 Commits

Author SHA1 Message Date
Vyacheslav Egorov eec96f9076 [vm/kernel] Preserve strong mode types in async transformation
Async transformation uses dynamic variables in few places (e.g.
for temporaries and for incomming arguments) - which creates
not strongly typed AST with method invocations having dynamic
receivers and non-null interface targets at the same time.

To maintain strong typedness of the AST we insert unsafeCast
when accessing the temporaries.

Bug: https://github.com/dart-lang/sdk/issues/34463
Change-Id: I11e38c128645ebc8acb0c982a80fe4c5c4036673
Reviewed-on: https://dart-review.googlesource.com/75000
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-09-14 17:19:29 +00:00
Peter von der Ahé 56c2ed5e9e Avoid deprecation in source_loader
Change-Id: Idf3250bd8fcc56f7d52e3f245671d2c1b91d0956
Reviewed-on: https://dart-review.googlesource.com/63144
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-09-13 08:10:15 +00:00
Jens Johansen 5bcc80439f Fasta: Don't crash on on raw generic type cycles
...in type variable bounds with typedefs.

This is the Fasta fix for #33479.

Change-Id: Id3c45891364d390a37424efbcfdb4254bb2f8c48
Reviewed-on: https://dart-review.googlesource.com/73860
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-09-12 12:37:02 +00:00
Peter von der Ahé 00ceb8e359 Share type handling between BodyBuilder and OutlineBuilder.
The BodyBuilder now operates on TypeBuilders instead of DartType.

This

* enables better error messages, and

* paves the way for removing the dependency on OutlineBuilder from BodyBuilder.

Change-Id: I2fb5e61a4d30c11f01d04cc0150d5352b4fb6999
Reviewed-on: https://dart-review.googlesource.com/74064
Reviewed-by: Jens Johansen <jensj@google.com>
2018-09-11 12:44:46 +00:00
Peter von der Ahé b62eef3d8b Use LocatedMessage for invalid types
Change-Id: Ib233b40211d1893b1de6bea36e84c91c81a49fa9
Reviewed-on: https://dart-review.googlesource.com/73343
Reviewed-by: Jens Johansen <jensj@google.com>
2018-09-06 10:25:15 +00:00
Peter von der Ahé 2782266d5c Unify QualifiedName and Identifier
Change-Id: Ie7e7131c58186efd5ed4e81e2f010cc240ce8d03
Reviewed-on: https://dart-review.googlesource.com/73341
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-06 08:57:07 +00:00
Konstantin Shcheglov 239bd1383b Report MEMBER_WITH_CLASS_NAME for static getter/setter with the enclosing class name.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34289
Change-Id: I8b593b4a652547e54ed06c80e34e82c11a14d7e8
Reviewed-on: https://dart-review.googlesource.com/73241
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-05 18:11:00 +00:00
Jens Johansen 4cbe28035d Better context message on SyntheticForwarder in MissingImplementation
Previously we could get something like this:
```
regress_32660_test_06.dart:9:7: Context: 'foo' is defined here.
class I extends G implements H {
      ^^^
```

because a SyntheticForwarder was added with a file location of the
class.

It now instead goes to the forwarding stub target and says
```
regress_32660_test_06.dart:6:3: Context: 'foo' is defined here.
  foo(int x, {int y}) => y;
  ^^^
```

Change-Id: I6fb1b958f58635c9afffa8e58cd49eb69df28afd
Reviewed-on: https://dart-review.googlesource.com/72680
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-09-05 14:05:33 +00:00
Jens Johansen 49ca2fcaf9 Detect cycles in type variable bounds
Fixes #32989.

Change-Id: I809d67a4c0cbbb24446ace6fd56bb3b1a4c1364a
Reviewed-on: https://dart-review.googlesource.com/73120
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-05 13:16:46 +00:00
Jens Johansen 416ef3fc4e Setter with name of class is error
Fixes #34225.

Change-Id: I1efd39ad1739f49a60d724ca13d916623b9fff09
Reviewed-on: https://dart-review.googlesource.com/72841
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-09-05 13:00:20 +00:00
Peter von der Ahé 2667a3e123 Regression test for issue 34291
See https://github.com/dart-lang/sdk/issues/34291

Change-Id: I3a3d621efac939a8005707283c1d7105c7d4d8b4
Reviewed-on: https://dart-review.googlesource.com/73140
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-05 12:40:45 +00:00
Kevin Millikin 9bdf2489b5 Signal errors and warnings for invalid returns
Implement the feature spec for checking returns against inferred
function return types:

https://github.com/dart-lang/sdk/blob/master/docs/language/informal/invalid_returns.md

with the change that an invalid return without a subexpression is
a warning, not an error.  This is because it is a warning in the
analyzer and it would be a breaking change to turn it into an
error.

The check for valid returns is moved to exactly where we handle
returns, rather than in ensureAssignable which is used as a
helper in a lot of places. A bug in type inference was fixed: we
would use `void` for the type of return without a subexpression
instead of `null`.  To accommodate that we would use a
non-standard subtyping relation for returns.  This could lead to
us inferring a return type of `void` in cases where we should
not.

Change-Id: Iee9ece9c722f47efa305f49490d3022d0bbb9f44
Reviewed-on: https://dart-review.googlesource.com/72403
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-09-04 16:50:51 +00:00
Jens Johansen 015840d31f Fasta: Wrong number of type parameters is an error
E.g. `new Map<String>` is now reported as an error.

Note that this does not add a check for whether correct types are given,
so e.g.

```
class Foo<X extends num> {}
main() {
  new Foo<String>();
}
```

is not caught by this fix.

Fixes #32972, #32281.

Change-Id: I57513b5c13865a828890775c8e14f7433d00bdbe
Reviewed-on: https://dart-review.googlesource.com/72382
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-04 10:10:32 +00:00
Peter von der Ahé 23dd0cccb2 Remove OutlineListener.
Revert "Store named types resolution during outline building."

This reverts commit 82947cccc9.

Revert "Store reference/type for invalid types."

This reverts commit 9fb6c09015.

Revert "Clear ShadowX references that are not required after compilation."

This reverts commit 6c39bc38f3.

Revert "Store constructor field initializera when the target is not a field."

This reverts commit 12326c10e1.

Revert "Don't rewrite error Severity for special cases of front-end testing."

This reverts commit 4bb3fb6cae.

Revert "Translate ConstructorElement(s) of parameterized InterfaceType(s) to ConstructorMember(s)."

This reverts commit 62a2752b96.

Revert "Store resolution for out of range integer literals."

This reverts commit 8df84c0a00.

Revert "Infer original expression in SyntheticExpressionJudgment."

This reverts commit cec29e4aa8.

Revert "Resolve invalid 'as' constant expression."

This reverts commit 77202bf2b0.

Revert "Resolve invalid return from constructor."

This reverts commit 737e546939.

Revert "Store import prefix offset into metadata and resynthesize."

This reverts commit c30af508a4.

Revert "Get documentation comments before metadata as well."

This reverts commit 29401573d5.

Revert "Put fileEndOffset into ArgumentsJudgment and use to report argument errors."

This reverts commit d69a354026.

Revert "Return SourceSpan with actual length from _CompilationMessage."

This reverts commit ac973e5ba7.

Revert "Store codeOffset / codeLength for classes."

This reverts commit 28583df3ee.

Revert "Store and resynthesize codeOffset/codeLength for functions and methods."

This reverts commit 5a2a13c8bf.

Revert "Fix analyzer/FE integration of invalid assignments to classes."

This reverts commit a814614cf4.

Revert "Fix analyzer/FE integration of assignments to non-l-values."

This reverts commit d10204f3a0.

Revert "Fix analyzer/FE integration of assignments to ambiguous types."

This reverts commit e87efdffb4.

Revert "Fix analyzer/FE integration of assignments to ambiguous types."

This reverts commit 1b5d273fd7.

Revert "Fix analyzer/FE integration of assignment with synthetic LHS."

This reverts commit 55aa031404.

Revert "Revert "Fix analyzer/FE integration of assignments to ambiguous types.""

This reverts commit 9f795883f1.

Revert "Store code range for constructors."

This reverts commit 675b296d49.

Revert "Store codeOffset/length code fields and top-level variables."

This reverts commit 9ef53bde19.

Revert "Re-land "Fix analyzer/FE integration of assignments to ambiguous types.""

This reverts commit 40d72aec8c.

Revert "Resolve metadata for part-of directives."

This reverts commit cf1cd3eba0.

Revert "Fix analyzer/FE integration of assignment with synthetic LHS, inside class method."

This reverts commit 43a8f1d0d6.

Revert "Fix analyzer/FE integration of prefix/postfix increment of non-l-values."

This reverts commit e2aceb692e.

Revert "Fix analyzer/FE integration of postfix-of-postfix and prefix-of-prefix increments."

This reverts commit ad6f89f13b.

Revert "Fix analyzer/FE integration of some obscure invalid assignment cases."

This reverts commit f074f3c120.

Revert "Resolve namespace combinators."

This reverts commit 7e39d07916.

Revert "Fix analyzer/CFE integration of some more obscure invalid assignment cases."

This reverts commit a94e43af7c.

Revert "Refactor duplicate code in ContextAwareGenerator."

This reverts commit 1f82d37124.

Revert "Resolve required arguments after named."

This reverts commit b255f0fab6.

Change-Id: I44616db9b8ef037a2580a1ab35050da7e72ff7d8
Reviewed-on: https://dart-review.googlesource.com/72642
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-03 11:45:33 +00:00
Peter von der Ahé 3c5fa9fd3f Test various uses of type variables
Change-Id: I579f4ba5dce3a4e1ff8be3afb6ab8b5814108496
Reviewed-on: https://dart-review.googlesource.com/72102
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-08-31 11:16:35 +00:00
Kevin Millikin 9803d5c786 Signal an error when invoking a non-function
When invoking an expression whose static type is not a function type,
signal an error.  However, allow invocations of expressions with
static type `dynamic` or `Function`.  Fixes #32975.

Change-Id: Ia54d8df650076ad5c9c9c3a2c6f79ea31acbbbfe
Reviewed-on: https://dart-review.googlesource.com/72082
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
2018-08-31 02:30:46 +00:00
Kevin Millikin 6e63df3bfb Revert "Avoid the deprecated input error in source_loader"
Reverted because of failures on the VM reload tests.

Change-Id: I880523a5f3e14cc6d318d4493f037b79515b1dce
Reviewed-on: https://dart-review.googlesource.com/71401
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-08-24 11:03:28 +00:00
Kevin Millikin 0eb0f700b8 Avoid the deprecated input error in source_loader
Avoid using deprecated errors by hadling them on a case-by-case basis.
This is a version of https://dart-review.googlesource.com/c/sdk/+/63144
with merge conflicts resolved.

Fixes #33686

Change-Id: I726740af2db5d32f15c8103c903376bc8ea948e6
Reviewed-on: https://dart-review.googlesource.com/71161
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-08-24 09:14:15 +00:00
Aske Simon Christensen a4b3009ca5 Require super initializer to be at the end of the initializer list.
Drops code to handle special evaluation order rules for super
initializer before the end.

Initializer check code now also recovers from initializer errors.

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

Change-Id: I1024853bfd3acfef42630bdc2fc47782746b07c0
Reviewed-on: https://dart-review.googlesource.com/68060
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-08-22 10:43:08 +00:00
Aske Simon Christensen f8a96b88e9 It is an error if a final field is not initialized.
Bug: https://github.com/dart-lang/sdk/issues/33022

This commit adds an error when a final field is not initialized at all
(and there is at least one generative constructor). A later commit
will add an error for the case where a field is initialized by some,
but not all, generative constructors.

A number of classes in the Dart2js and DDC support libraries use
uninitialized final fields to indicate getters in the corresponding
native classes. This commit adds a temporary whitelist for the
affected files, which can be removed when the fields have been
replaced by external getters.

This is tracked by https://github.com/dart-lang/sdk/issues/33762

Change-Id: I6b5cee230c7cd5554da2b61da7ebddb6b0b9396e
Reviewed-on: https://dart-review.googlesource.com/63781
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
2018-08-17 12:37:52 +00:00
Jens Johansen 57d48dcc9f Fix bug in incremental compiler, only later using initialized type
Before this CL, if initializing from a dill file containing a class,
say A, but it wasn't used, and then later using it as a type, say
'A a = new A()', the class hierarchy would complain about not knowing A.

This was caused by the class hierarchy initially being constructed using
the full component of the first compile (i.e. in the example above
without any usage of A and thus without including A), and subsequent
compiles telling the class hierarchy about new classes created in that
compile. The problem was, that if the class was loaded from a dill file
(in the example above 'A' was such a class) it would never be included
if not a part of the first full component.

This CL fixes it by changing the interface to the class hierarchys
`applyTreeChanges` function and letting the class hierarchy know about
libraries too: It will now basically just be given the full component
when asked to update, and just update with the libraries it doesn't
already know about. In the example above that would - once using 'A' -
include 'A'.

Change-Id: I895100b51659938636da0bca6c80516d87b57a24
Reviewed-on: https://dart-review.googlesource.com/69302
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-08-16 13:26:08 +00:00
Jens Johansen da428bb3d4 Update status for incremental_bulk_compiler_full
Change-Id: Ifd4c66f00e16c0ce08c665e768f79c1eeb8d58d5
Reviewed-on: https://dart-review.googlesource.com/69301
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-08-16 10:44:25 +00:00
Brian Wilkerson 49437e3bae Split TooManyArguments to support quick fixes
Change-Id: I31511f619cafbce01f68d6e182328567a2bc3523
Reviewed-on: https://dart-review.googlesource.com/70021
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-15 13:24:22 +00:00
Dan Rubel 0aeaef23e2 Remove parser reliance on "<".endGroup/endToken
This replaces calls to lt.endGroup when parsing type arg/param
with calls to computeTypeParamOrArg. This is a step towards
removing lt.endGroup everywhere and making type arg/param
parsing more resiliant and streamlined.

Change-Id: I5b3374769367f601c8910afa18116a2edd3f80c0
Reviewed-on: https://dart-review.googlesource.com/70000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-14 17:04:34 +00:00
Konstantin Shcheglov d69a354026 Put fileEndOffset into ArgumentsJudgment and use to report argument errors.
Change-Id: Id79bd71e7147be379e93024591134c12aa598a38
Reviewed-on: https://dart-review.googlesource.com/69221
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-10 15:40:37 +00:00
Samir Jindel 5c7d257978 [kernel/vm] Fix native extensions.
Tested with imports through current directory, VM binary directory,
and LD_LIBRARY_PATH. This also restores the Dart 1 behavior of not supporting
relative extension paths.

Change-Id: I090bf8592fef74d4ccde40e6f550baa84c98e3bc
Reviewed-on: https://dart-review.googlesource.com/69162
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-08-10 11:06:56 +00:00
Jens Johansen f9e50baa0b Update formated error for nonexisting constructor
This is an alternative fix for #33452.
This was originally fixed in 8e4d5c0a38,
but it was pointed out that it doesn't work if there were type arguments.

This should fix the problem in more cases.

Change-Id: I08ed27ecea1a8d471be9675d28b997614248c65e
Reviewed-on: https://dart-review.googlesource.com/68080
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-08-07 06:45:57 +00:00
Konstantin Shcheglov cec29e4aa8 Infer original expression in SyntheticExpressionJudgment.
Change-Id: I91a27d06ccf4197274fc96597d384ba4e2335dbd
Reviewed-on: https://dart-review.googlesource.com/68426
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-06 21:04:22 +00:00
Dmitry Stefantsov cda3659f7f [fasta] Handle annotations on formals of typedefs
Fixes #33799.

Bug: http://dartbug.com/33799
Change-Id: I5808e45839cece468d890dcaf344df0d4b249a3c
Reviewed-on: https://dart-review.googlesource.com/65701
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-08-03 14:29:30 +00:00
Jens Johansen ac8fdb5a58 Add :controller_stream and call _asyncStarListenHelper
This changes how we step out of async* functions slightly to match how
Dart1 behaves.

Bug: #29158

Change-Id: I8ee2df5eee8167fd1907a6e9f30c9dc7ab6939b1
Reviewed-on: https://dart-review.googlesource.com/63625
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-08-02 06:49:47 +00:00
Jens Johansen 2e98da68f9 Call _asyncStarMoveNextHelper in kernel
This changes how we step into async* functions slightly to match how
Dart1 behaves.

Bug: #29158
Change-Id: I4969ca48f798bd51f9d2d5bc26dd224fa7eff627
Reviewed-on: https://dart-review.googlesource.com/63624
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-08-02 06:16:15 +00:00
Paul Berry 31af5ce13c Revert CLs reworking generator class handling of non-lvalues.
This arc of work is breaking the Flutter roll--see
https://github.com/dart-lang/sdk/issues/33993.

This reverts the following commits:

- 55c0857037 (Create a common generator class to handle non-lvalues.)

- c9b197017c (Rename "assignment_of" -> "assignment_to".)

- 32fd7b15e4 (Remove special case for assignment to parenthesized
  expressions.)

- 432e59e589 (Fix error reporting if a for-in statement attempts to
  assign to a prefix.)

- 232bed3d11 (Change UnresolvedNameGenerator to use
  NonLvalueGenerator.)

- 0b778d0697 (Change IncompleteErrorGenerator to make use of
  NonLValueGenerator.)

- 1a5f94a0a4 (Fix analyzer-CFE integration of illegal references to
  instance members from static contexts.)

Change-Id: Id637e5ec60150a73031c05d7bb4c6effefd2aa8a
Reviewed-on: https://dart-review.googlesource.com/67091
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-07-27 17:18:28 +00:00
Paul Berry 232bed3d11 Change UnresolvedNameGenerator to use NonLvalueGenerator.
This avoids the need for custom assignment-handling logic in
KernelUnresolvedNameGenerator, and ensures that assignments to
unresloved names work properly with analyzer integration.

Change-Id: I802270987c90043d021f8560b56f47babf72fb1e
Reviewed-on: https://dart-review.googlesource.com/66701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-07-25 18:22:45 +00:00
Paul Berry 432e59e589 Fix error reporting if a for-in statement attempts to assign to a prefix.
This was regressed by https://dart-review.googlesource.com/c/sdk/+/66402.

Change-Id: Icad3d2d33cb4db0321534a6246c8cc5f50444edf
Reviewed-on: https://dart-review.googlesource.com/66416
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-07-25 14:12:13 +00:00
Dmitry Stefantsov c353d02a3c [fasta] Fix override checks for generic methods
Fixes #33971.

Bug: http://dartbug.com/33971
Change-Id: I66ee51ccfa0b8109602593f04961b58bf589d0be
Reviewed-on: https://dart-review.googlesource.com/66560
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-07-25 12:44:42 +00:00
Paul Berry 55c0857037 Create a common generator class to handle non-lvalues.
This allows all non-lvalue cases to be integrated with the analyzer
using a common code path.

Change-Id: I15cd2bc07a2d3609e78886609f3e29ee6aa807fc
Reviewed-on: https://dart-review.googlesource.com/66402
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-07-24 21:34:50 +00:00
Konstantin Shcheglov 1fe0518d3b Resolve values of duplicate named arguments.
Change-Id: I3a84db8e7c7e29f730ec0687aee4ed0a62b84f94
Reviewed-on: https://dart-review.googlesource.com/66280
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-24 21:30:50 +00:00
Mike Fairhurst 5c9c90f7e1 Revert "Check void usage and invalid returns"
This reverts commit 11001793a2.

Reason for revert: Doesn't allow void to void assignment. This is breaks a lot of packages.

Original change's description:
> Check void usage and invalid returns
> 
> Closes https://github.com/dart-lang/sdk/issues/30470
> 
> Change-Id: I2ed5b54c74e0bba2771036774bbe2197ce29109d
> Reviewed-on: https://dart-review.googlesource.com/65141
> Commit-Queue: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>

TBR=ahe@google.com,dmitryas@google.com

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

Change-Id: I78f479cf8b0824dd338ae43a5514f320fd112a3f
Reviewed-on: https://dart-review.googlesource.com/66040
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-07-20 22:29:45 +00:00
Dmitry Stefantsov fdd0494a02 [fasta] Don't skip metadata on redirecting factories and their formals
Fixes #33800.

Bug: http://dartbug.com/33800
Change-Id: I36c3404c5abd0ebd72205a56d5e90bad174e6d60
Reviewed-on: https://dart-review.googlesource.com/65540
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-07-19 10:19:35 +00:00
Paul Berry 863c79a5fa Fix analyzer/FE integration of unresolved method invocations with no targets.
Change-Id: I0429801429082a39601f588308774aed1c26a240
Reviewed-on: https://dart-review.googlesource.com/65572
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-18 22:04:40 +00:00
Peter von der Ahé 11001793a2 Check void usage and invalid returns
Closes https://github.com/dart-lang/sdk/issues/30470

Change-Id: I2ed5b54c74e0bba2771036774bbe2197ce29109d
Reviewed-on: https://dart-review.googlesource.com/65141
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-07-18 10:18:52 +00:00
Peter von der Ahé c6f525634f Normalize status files
Change-Id: I2668ec23b5fe83623acefcf53110499ecf30dcb9
Reviewed-on: https://dart-review.googlesource.com/65502
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-07-18 09:54:33 +00:00
Konstantin Shcheglov 7a35e9cade Store resolution for using non-constant factory for constant instance creation.
This also fixes https://github.com/dart-lang/sdk/issues/33642

Change-Id: I696da4895de28758264034f5a40914c3847b21b8
Reviewed-on: https://dart-review.googlesource.com/65200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-17 17:34:12 +00:00
Dan Rubel b571e9391c Report missing semicolon on last consumed token
This moves the location on which a missing semicolon error is reported,
making it easier for a user to understand and fix,
and fixing some of the statement completion tests.

Change-Id: I11b9de57e2b3104238e1edb801ad1cd02e9a63a2
Reviewed-on: https://dart-review.googlesource.com/64900
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-17 12:30:37 +00:00
Brian Wilkerson 00c8cf84c5 Convert Unspecified to NonConst[Constructor|Factory]
Change-Id: If71220e1ee7b8a57daea228191c9fafef22b6bc2
Reviewed-on: https://dart-review.googlesource.com/64920
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-07-16 21:22:32 +00:00
Konstantin Shcheglov 946be233f6 Use special error templates for for-in loops.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I7006468db607cf53d202b37c01913fb20bd722e7
Reviewed-on: https://dart-review.googlesource.com/65034
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-16 15:18:06 +00:00
Dmitry Stefantsov 48a258a4a5 [Fasta] Additional override checks
Checks override on fields and for methods with type parameters.

Bug: 32613
Change-Id: Ia32d1080959bc706fd72a075fb6ba724fa93fd58
Reviewed-on: https://dart-review.googlesource.com/64542
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-07-16 15:00:05 +00:00
Dmitry Stefantsov 7d6cd21706 CFE and member conflict rules
See https://github.com/dart-lang/sdk/issues/32613
and https://github.com/dart-lang/sdk/issues/33235#issue-326617285

Bug: #32613, #33235, #33237
Change-Id: I0d1432185b6811137e31135ac2c7f58c4de2de6c
Reviewed-on: https://dart-review.googlesource.com/64500
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-07-16 14:09:01 +00:00
Dmitry Stefantsov 0277432f28 [fasta] Fix inference for const redirecting factories invocations
Fixes #33813.

Bug: http://dartbug.com/33813
Change-Id: I53708666f6c5d55760a8bc23f042565ba073812f
Reviewed-on: https://dart-review.googlesource.com/64841
Reviewed-by: Jens Johansen <jensj@google.com>
2018-07-16 11:24:36 +00:00
Konstantin Shcheglov 312a7d13ec Store resolution for unresolved type instance creation.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I91af78cc5b99924c8dab77662d6bd08786a24fd9
Reviewed-on: https://dart-review.googlesource.com/65026
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-15 16:50:49 +00:00