Commit graph

185 commits

Author SHA1 Message Date
Mike Fairhurst a5f102a7d1 Analyzer: first pass at reporting unchecked nullable value usage.
Change-Id: I095c7feff821535a17c7cbb0c4bdb9bb04253f16
Reviewed-on: https://dart-review.googlesource.com/c/88752
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-01-16 18:38:34 +00:00
Sam Rawlins c54bc11770 Split DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE off; fixes #30084 and
fixes https://github.com/dart-lang/linter/issues/1349

Bug: https://github.com/dart-lang/sdk/issues/30084
Change-Id: I4954b883c1baf019a62776fec108eac60960b22e
Reviewed-on: https://dart-review.googlesource.com/c/88881
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-15 03:25:27 +00:00
Brian Wilkerson e9eb4842ea Remove the unused hint code INVALID_ASSIGNMENT
Change-Id: I4b3aff6b53dcfb5d5f00c49992050e08e5b52002
Reviewed-on: https://dart-review.googlesource.com/c/88641
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-08 19:15:47 +00:00
Sam Rawlins 9dbb6fb113 Add a Hint enforcing contract of @literal
Example code:

```dart
import 'package:meta/meta.dart';

class A {
  @literal
  const A();

  @literal
  const A.named();
}

var a = A();
var b = const A();
const c = A();
var d = new A();

var e = new A.named();
```

Produces:

Analyzing b.dart...
  hint • This instance creation must be 'const', because the A constructor is marked as '@literal' at b.dart:11:9 • non_const_call_to_literal_constructor
  hint • This instance creation must be 'const', because the A constructor is marked as '@literal' at b.dart:14:9 • non_const_call_to_literal_constructor
  hint • This instance creation must be 'const', because the A.named constructor is marked as '@literal' at b.dart:16:9 • non_const_call_to_literal_constructor
3 hints found.

Bug: https://github.com/dart-lang/sdk/issues/34259
Change-Id: Iba10e5e0a0b2d0f7e99556cd6c201cea229ad675
Reviewed-on: https://dart-review.googlesource.com/c/88422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-01-08 17:20:05 +00:00
Brian Wilkerson c39a58a9fe Generate an error if a constant set contains two elements with the same value
Change-Id: Ie359a1ea639e9c928df32c727bcd2f075f92033f
Reviewed-on: https://dart-review.googlesource.com/c/88425
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-01-05 15:13:12 +00:00
Sam Rawlins ce256c762c Impl of INVALID_LITERAL_ANNOTATION
Bug: https://github.com/dart-lang/sdk/issues/34259
Change-Id: Ia5ca627a89dcb3f0fcd5ce74048df8fdf9dd9c9c
Reviewed-on: https://dart-review.googlesource.com/c/88283
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-03 18:07:44 +00:00
Brian Wilkerson 53447f5d63 Fix an exception in ErrorReporter that caused server to crash
Change-Id: I3ff1d8923e32e4f8d210fd7ada5052dcd108869d
Reviewed-on: https://dart-review.googlesource.com/c/88226
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-02 22:06:17 +00:00
Sam Rawlins 428629efd8 Enforce sealed annotation on classes and mixins
This CL replaces https://dart-review.googlesource.com/c/sdk/+/75941
(there were some large refactorings, and I got a new laptop and lost my Git repo)

Bug: https://github.com/dart-lang/sdk/issues/34232
Change-Id: Ia0746b94a23ccb757bc209e76098243896be8c55
Reviewed-on: https://dart-review.googlesource.com/c/88127
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-02 18:07:52 +00:00
Brian Wilkerson 737209b85c Remove some unused hint codes
Change-Id: I1388355e7832dec17ed06da14262573ea4e60eef
Reviewed-on: https://dart-review.googlesource.com/c/88161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-31 16:23:28 +00:00
Brian Wilkerson 0fb5974ba0 Improve the error reporting when the same-named types are used as type arguments (issue 33946)
Change-Id: Ic83dea89e4ad51d923f1d147fe4c54e129549fa8
Reviewed-on: https://dart-review.googlesource.com/c/87425
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-12-17 21:10:34 +00:00
Paul Berry 5768e513f8 Rework analyzer representation of experimental flags to prepare for codegen.
This CL introduces
pkg/analyzer/lib/src/dart/analysis/experiments_generated.dart, which
will eventually be code generated from a YAML description of the
currently-allowed set of experimental flags.

Change-Id: Iabbefa8e5037573d4b4e7b7b4eb661c1698bd673
Reviewed-on: https://dart-review.googlesource.com/c/86220
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-12-10 22:32:24 +00:00
Dan Rubel 089f098849 Auto generate more analyzer error codes
* MISSING_CATCH_OR_FINALLY
* STACK_OVERFLOW
* INVALID_OPERATOR_FOR_SUPER
* VAR_AND_TYPE

Change-Id: Ib308cd979f9c5644c28ab1f927fa9cc8add38269
Reviewed-on: https://dart-review.googlesource.com/c/86462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-12-07 11:46:48 +00:00
Paul Berry 670f9ab49b Merge commit '65401da92251a7318e3264b816ce0c4e14701751' into analyzer 2018-12-04 15:38:21 -08:00
danrubel 848d93c0b5 Improve parser recovery given superclass field initializer
This improves upon the patch in
https://dart-review.googlesource.com/c/sdk/+/85780
to better recover given malformed constructor initializer such as

C() : super = 42;

and

C() : super.a = 42;

This also add a new FieldInitializedOutsideDeclaringClass error code
to better indicate the problem and how the user should fix it.

Change-Id: I4476c6c9fac20b0dd47970c2c81078a5c441bde1
Reviewed-on: https://dart-review.googlesource.com/c/85781
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-12-04 21:27:13 +00:00
Paul Berry 63770042aa Merge commit '80c23f87a3e3123d7e337c1fc8bc3b5ec49b34a0' into analyzer 2018-11-30 08:12:45 -08:00
danrubel 80c23f87a3 Update more analyzer error codes to be generated
This updates more analyzer error codes to be generated
from the corresponding CFE error code.

Several of these analyzer error codes had multiple CFE error
codes mapped to them. In these situations, new analyzer error
codes were added to match the existing CFE error codes:

* EXTERNAL_FACTORY_WITH_BODY
* EXTERNAL_FACTORY_REDIRECTION
* CATCH_SYNTAX_EXTRA_PARAMETERS

Change-Id: Ib1cbb9e04d2092e4859e2cfadbcc85e03093f808
Reviewed-on: https://dart-review.googlesource.com/c/85431
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-11-30 15:00:36 +00:00
Brian Wilkerson 67472e59fb Remove an unused error code and the fix associated with it
Change-Id: I5118cea64a9c687e7ebd102a09cbfbaf467d1e96
Reviewed-on: https://dart-review.googlesource.com/c/85320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-25 19:11:46 +00:00
Brian Wilkerson cb88347087 Port the SDK violation hint to the master branch
Change-Id: Id795400473796f05e46c0ffdd0a8920f8ad5bcd3
Reviewed-on: https://dart-review.googlesource.com/c/84688
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-19 21:14:48 +00:00
Brian Wilkerson 716c9dcde2 Add a hint when Future is imported from core in code targeted to run with an SDK prior to 2.1
Change-Id: I925412b9c7c3023836a0a2a7d3d00847adf0b0c7
Reviewed-on: https://dart-review.googlesource.com/c/84547
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-11-16 19:07:27 +00:00
Brian Wilkerson 1d00a8a11f Add checking for errors related to set literals
Change-Id: Iad1442da6be318a709f5782fbda4a9055f55dfac
Reviewed-on: https://dart-review.googlesource.com/c/84302
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-13 20:08:23 +00:00
Brian Wilkerson f6128b48b6 Add constant evaluation for operators that now apply to bool as well as int
Change-Id: I080386cddfece2d789fcee7d13bdda01260cc724
Reviewed-on: https://dart-review.googlesource.com/c/84160
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-12 21:26:08 +00:00
Konstantin Shcheglov c9ae39a9bf Issue 34741. Update error message to make it less unclear.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34741
Change-Id: If766d0aad5d87578a578849f269746a64430a68b
Reviewed-on: https://dart-review.googlesource.com/c/84100
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-12 19:00:34 +00:00
Brian Wilkerson 268993acb2 Provide support for is and as expressions
Change-Id: I853fee6a868314392d37f51f8dd36e2dda319c38
Reviewed-on: https://dart-review.googlesource.com/c/84050
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-11-12 17:10:20 +00:00
Brian Wilkerson 3a427f3294 Add an object representation for literal constant sets
Change-Id: If9ebebac0ba6891c7c5bd2398898f20a7ea82c6b
Reviewed-on: https://dart-review.googlesource.com/c/83940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-09 17:29:31 +00:00
Paul Berry 5665636983 Merge commit '7fd78ed5b606e64d30ec201de9adce6fdf8856ba' into analyzer 2018-10-22 13:07:24 -07:00
Konstantin Shcheglov 4e6fa7f41b Simplify RecordingErrorListener, and create errors list lazily.
The method addAll() is not really used.

We also use getErrorsForSource() only once in Analyzer / Server, and
only in tasks. So, we don't need Map<Source, errors>, and can use just
a single set of errors, which is cheaper than Map.

R=brianwilkerson@google.com

Change-Id: I001b0ce33ea496dd98191408245e3e82a47ff605
Reviewed-on: https://dart-review.googlesource.com/c/81140
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-22 19:38:45 +00:00
Brian Wilkerson a342cecffd Disable support for the old super mixins
Change-Id: I8f8074b67ea43249fcc10deddd2325938996d529
Reviewed-on: https://dart-review.googlesource.com/c/79469
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-22 16:02:01 +00:00
Konstantin Shcheglov c44fa48f8f Extract and rewrite MethodInvocation resolution.
This is a copy of https://dart-review.googlesource.com/c/sdk/+/78182,
but now in the analyzer branch.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I75d17a351ee7a33c164d560009cf3ffd088d956a
Reviewed-on: https://dart-review.googlesource.com/c/80942
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-22 03:36:30 +00:00
Konstantin Shcheglov 163b356b79 Remove CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION.
There is no destinction anymore.
So, we don't need a cycle, and can report just one error kind.

R=brianwilkerson@google.com

Change-Id: I54680ca5b5df275b2d68804a0ad7caeda3ed92aa
Reviewed-on: https://dart-review.googlesource.com/c/80982
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-21 19:49:44 +00:00
Brian Wilkerson 469e1e2e64 Remove unnecessary library directives
Change-Id: I7a157080e4d7fd80d64489a13de4e996b5870930
Reviewed-on: https://dart-review.googlesource.com/c/79474
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-13 00:44:04 +00:00
Dan Rubel e4c3fa0a9c Improve recovery when parsing named constructor invocation with invalid type arguments
The parser now generates a ConstructorWithTypeArguments error and a new
handleInvalidTypeArguments event after a begin/endTypeArguments event pair
when those type arguments are in a syntatically invalid location.

For example: `new C.n<int>();` in
```
class C<T> { T f; C.n() {} }
main() { var x = new C.n<int>(); }

Most listeners handle this event by dropping the invalid type arguments,
but AstBuilder now preserves those invalid type arguments in the AST
to support better code quick-fixes/quick-assists/refactoring.

Change-Id: I5b22bd4903cd9ee3645936b9a108598b603cf9ca
Reviewed-on: https://dart-review.googlesource.com/c/79300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-10-11 19:57:22 +00:00
Konstantin Shcheglov e221a6288b Move reporting MISMATCHED_GETTER_AND_SETTER_TYPES for classes to using new interfaces.
R=brianwilkerson@google.com

Change-Id: I07e8af54ffebd446a1492fab667e4148468cc2f8
Reviewed-on: https://dart-review.googlesource.com/c/78925
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-10 16:25:49 +00:00
Konstantin Shcheglov 4df3626d19 Remove support for (non)nullable types from Analyzer.
R=brianwilkerson@google.com

Change-Id: Ia26c203ed4fa238d1a546fe67e009fa542ed8f82
Reviewed-on: https://dart-review.googlesource.com/77666
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-02 20:05:15 +00:00
danrubel 7c7417e170 Improve fasta parser mixin and class header recovery
This updates the parser to recover when
* 'extend' or 'extends' is used rather than 'on' in a mixin declaration
* 'extend' or 'on' is used rather then 'extends' in a class declaration

This also introduces a new ExpectedInstead error message to better
communicate to the developer the keyword that should be used.

Fix https://github.com/dart-lang/sdk/issues/34563

Change-Id: Iafcb3d18db8ca3898c1e4dae74e5124c108ead48
Reviewed-on: https://dart-review.googlesource.com/77140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-28 17:11:49 +00:00
Konstantin Shcheglov 9185294e7a Reland: Implement inheritance/override checks from the spec.
Relands https://dart-review.googlesource.com/c/sdk/+/76061
Was reverted in https://dart-review.googlesource.com/c/sdk/+/76301

The difference with the original CL is that we don't look into
superclass and mixins of mixed-in for concrete members. This reduces
the number of errors in Flutter codebase to 1.


R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34392
Change-Id: I86256b598d116439194cbaf4d09b4f72013d6563
Reviewed-on: https://dart-review.googlesource.com/76340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-25 18:51:04 +00:00
Zach Anderson 95d37b0921 Revert "Implement inheritance/override checks from the spec."
This reverts commit 836a1d7a88.

Revert "Don't use ClassElementImpl for now in override checking."

This reverts commit 58e44c1400.

Revert "large_class_declaration_test is slow now."

This reverts commit 56f6c52d58.

Revert "Add regression test for issue 34392."

This reverts commit ef7d144bc7.

Revert "Mixin declarations don't have supertype, fix isMoreSpecificThan()."

This reverts commit 95b8a19a20.

Change-Id: Icda9cf9091ef35acc8fd61ac5dc135b3717eba0a
Reviewed-on: https://dart-review.googlesource.com/76301
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-09-24 21:27:34 +00:00
Konstantin Shcheglov 836a1d7a88 Implement inheritance/override checks from the spec.
This CL starts moving checks from strong-mode specific checker,
and old InheritanceManager into an implementation that is based
on the current spec, and avoids old baggage. It also fixes the issue
we were asked to fix for Dart 2.1.

Bug: https://github.com/dart-lang/sdk/issues/34392
Change-Id: Id5a23c5db7704b2b530bb894ae92628a08eaa70f
Reviewed-on: https://dart-review.googlesource.com/76061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-24 16:28:50 +00:00
Konstantin Shcheglov 81ce969060 Enable implicit constructors with optional parameters in mixin applications.
The spec changed in 63c6851dd0

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34375
Change-Id: If7ba66d82fa4127cc6764d93f299790e8a862b42
Reviewed-on: https://dart-review.googlesource.com/75422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-19 16:12:21 +00:00
Konstantin Shcheglov a27bafc306 Check that the concrete member in the class has same type as the super-invoked member in the mixin.
R=brianwilkerson@google.com

Change-Id: I985872d2eb5eaf7608b030b9803d664ad0878b04
Reviewed-on: https://dart-review.googlesource.com/75243
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-18 17:06:22 +00:00
Brian Wilkerson c28db2d6e1 Make reporting of some errors conditional
Change-Id: I4bea35cce9f5d3da425425284c056b7ca228993e
Reviewed-on: https://dart-review.googlesource.com/74668
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-09-13 15:25:03 +00:00
Konstantin Shcheglov d09429debb Generate more mixin errors.
R=brianwilkerson@google.com

Change-Id: Ia858efb270caa5664728395d47b4e31e34a0ed91
Reviewed-on: https://dart-review.googlesource.com/74667
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-12 20:54:28 +00:00
Konstantin Shcheglov f89053aecc Report ABSTRACT_SUPER_MEMBER_REFERENCE as error.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/33662
Change-Id: Ic80386c20acd2cd1ceebeb90fbb1d6e18982b024
Reviewed-on: https://dart-review.googlesource.com/74499
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-12 17:07:18 +00:00
Mike Fairhurst 6784fb596f First wave of int2double -- accept doubles as ints except const
Change-Id: I79661b8cf6e1395302b03f1bd3d0260225ffc5e4
Reviewed-on: https://dart-review.googlesource.com/73841
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-11 22:00:48 +00:00
Konstantin Shcheglov a02a589813 Keep just one UNDEFINED_GETTTER/METHOD/SETTER error.
There is no distinction between them from the langauge of view anymore.

This is a preparatory step before reporting super-invoked abstract
class members as errors, which we should do according to the issue.

Which, in turn, is for consistency between repoting corresponding
error for super-invoked, but not concrete members in mixin applications.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/33662
Change-Id: I00e8f185dbbdd1ffac88c500394a1e1497be6f9a
Reviewed-on: https://dart-review.googlesource.com/74481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-11 18:40:02 +00:00
Brian Wilkerson 7fa80d8200 Remove unused error codes
Change-Id: I8e89c8f486ccfb1d294f753aff3c391c210c5778
Reviewed-on: https://dart-review.googlesource.com/74300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-09-10 21:18:02 +00:00
Konstantin Shcheglov ae2f75abec Report CompileTimeErrorCode.MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER.
R=brianwilkerson@google.com

Change-Id: I697327cb6b436b8b3448d91b23f720e758f52a51
Reviewed-on: https://dart-review.googlesource.com/74265
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-10 21:12:12 +00:00
Konstantin Shcheglov b6c98976d5 Report CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE for mixins.
R=brianwilkerson@google.com

Change-Id: I513d1026793829a3df7ad46ab40c9c4ddeb379be
Reviewed-on: https://dart-review.googlesource.com/74263
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-10 20:30:23 +00:00
Konstantin Shcheglov 3346632ad3 Report CompileTimeErrorCode.EXTENDS_NON_CLASS for mixins.
I'm also renaming an error to MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE,
because the spec says that `on` clause uses interfaces, not classes.

R=brianwilkerson@google.com

Change-Id: I561fd5605b66cf5a6e870c037ac16c43fc81b403
Reviewed-on: https://dart-review.googlesource.com/74260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-10 18:11:00 +00:00
Konstantin Shcheglov 63fbfcc69a Translate InvalidInlineFunctionType to ParserErrorCode.INVALID_INLINE_FUNCTION_TYPE.
R=brianwilkerson@google.com, danrubel@google.com

Change-Id: I2b1c7938c081b771e554149846c8157f8332e061
Bug: https://github.com/dart-lang/sdk/issues/33398
Reviewed-on: https://dart-review.googlesource.com/74043
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-09-10 16:08:41 +00:00
Konstantin Shcheglov 9e3bcc4cec Report MIXIN_INSTANTIATE when a mixin is instantiated.
R=brianwilkerson@google.com

Change-Id: Ia19d69bd7f0212bcdfb37f228046c727a36d62e3
Reviewed-on: https://dart-review.googlesource.com/74042
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-09 17:04:48 +00:00