Commit Graph

286 Commits

Author SHA1 Message Date
Sergey G. Grekhov 391d5c409b [co19] Status files cleanup
Change-Id: Ia22499d5681213017b09eac818f4f57e1fba2885
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196485
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-04-22 13:40:48 +00:00
Sergey G. Grekhov d30d9ed839 [co19] Skip in status files removed or replaced where it is possible
Change-Id: Iccf97f1a6a2753321c5d60db5e9c2291eeeb159b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194400
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-04-12 13:26:49 +00:00
Sergey G. Grekhov 79f6f64836 [co19] Removed obsolete entries from co19-kernel.status
Cq-Include-Trybots: dart/try:dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I426cdcb95cb726b52d4510d92d67be49b364accd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192931
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-03-29 12:04:27 +00:00
Sergey G. Grekhov dac02ba37a [co19] skip test that uses dart:mirrors on precompiled and web platforms
Change-Id: I69466760bb870fc94415311d92359d669c07f097
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192744
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-03-24 11:25:19 +00:00
Nicholas Shahan 453b06d222 [tests] Remove triple shift test skips from status files
There are also skips for these tests in the legacy (*_2) suites.
I'm leaving those as skips because I think they will never be
expected to work since you have to opt into a newer language
version to get the feature.

Change-Id: I1631b1523c6a9be9a14c69c8cf772ea58309c706
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191482
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-19 02:32:34 +00:00
Ryan Macnak 5a385890b9 [test] Apply simarm64 status file entries to simarm64c.
Remove references to the removed simarmv6 architecture.

TEST=ci
Change-Id: I10e9fc8291c3e5b6b9a4bd71ca05de95e53f22c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187500
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-02-25 21:18:02 +00:00
sgrekhov 17499b302e [co19] Broken links in a status files fixed
Change-Id: I84b03b70949a64a5683efce17c5e12049b07add0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174401
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-30 07:17:50 +00:00
sgrekhov 395d37fcb5 [co19] Enable tests that start processes on AOT
Change-Id: Ifbe46a7419cc4332136fb5e29e880ed90d0a190c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172504
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-27 07:12:32 +00:00
Alexander Markov e9aa232066 Remove remaining tests for bytecode mode
Change-Id: I9690bd8a9bdcf16963424c64c1b80628e50fa28a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166922
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-09 22:30:19 +00:00
Tess Strickland 781094f2ce [vm/bytecode] Add parameter flags to FunctionDeclaration.
We create the parameter names array when loading the
FunctionDeclaration, but the required parameter flags are only set later
when we load the Code declaration. If there's an intermediate use of the
Function object that copies the required parameter flags, like creating
an ImplicitClosureFunction when loading a tearoff stored in the object
pool, there will be no set flags at that point.

Add a copy of the parameter flags to the FunctionDeclaration so the
required flags can be set at the same time as the parameter name and
type to avoid this scenario.

To avoid adding unneeded flags to the kernel bytecode, we only serialize
the parameter flags needed for each declaration, so FunctionDeclaration
and ClosureDeclaration only contain the required flag, and Code contains
all flags _but_ the required flag.

There are no trybots for strong mode + bytecode, but manually checked
by running the following on the main branch (cherry-picking the
test_matrix.json changes) and this branch:

python tools/test.py \
    -n dartkb-mixed-strong-linux-release-x64,dartkb-interpret-strong-linux-release-x64 \
    tests/language/nnbd/required_named_parameters/missing_required_argument_dynamic_test.dart

Cq-Include-Trybots: luci.dart.try:vm-dartkb-linux-release-simarm64-try,vm-dartkb-linux-release-x64-try
Change-Id: Ic75b831d5ceed08154e2c61b8f64461705558653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162501
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-09-14 15:28:20 +00:00
sgrekhov 3193e06783 [co19] Enable rest of LibTest/io tests
Change-Id: Ie0b73cc127b2e7e18715ff930a38beb18b9a717c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160065
Reviewed-by: Alexander Thomas <athom@google.com>
2020-08-28 12:35:39 +00:00
sgrekhov 8678553700 [co19] enable isolate and mirrors tests
Change-Id: Iff3d3f718a726015cf914b36998ca6b40725314c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160220
Reviewed-by: Alexander Thomas <athom@google.com>
2020-08-27 06:20:09 +00:00
sgrekhov 642412c447 [co19] Enable remaining core and collection tests
Change-Id: I5b8d7379904f196575111d38d5e526f11e4959ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158013
Reviewed-by: Alexander Thomas <athom@google.com>
2020-08-13 10:37:50 +00:00
sgrekhov 9b9f89a64c [co19] Skip not migrated to NNBD folders in a status file
Change-Id: Iaf54ad33ae79291caffda74843d46a238b6c2a17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144945
Reviewed-by: Sergey Grekhov <sgrekhov@unipro.ru>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Sergey Grekhov <sgrekhov@unipro.ru>
2020-04-30 05:29:14 +00:00
Bob Nystrom f6ca2c1d8f Remove the Dart 1 tests.
This deletes:

tests/co19
tests/corelib
tests/html
tests/isolate
tests/language
tests/lib

It does not delete tests/standalone because apparently there are tests
in there that are not in standalone_2. (I assume they were added after
the test migration. I don't know why they were added there.)

I have tried to remove references to the old tests from various scripts
and tools but may have missed some. (As you can imagine, grepping for
"lib" does not have the best signal-to-noise ratio.)

"It was a pleasure to burn. It was a special pleasure to see things
eaten, to see things blackened and changed. With the brass nozzle in his
fists, with this great python spitting its venomous kerosene upon the
world, the blood pounded in his head, and his hands were the hands of
some amazing conductor playing all the symphonies of blazing and burning
to bring down the tatters and charcoal ruins of history."

- Ray Bradbury, Fahrenheit 451

Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e
Reviewed-on: https://dart-review.googlesource.com/c/75420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-11 23:45:18 +00:00
Dmitry Stefantsov 8648d782ae Reland "[fasta] Report errors for bounds violations"
The original commit:
https://github.com/dart-lang/sdk/commit/aa6fb2d3a4298e60b5635f26507d5b39f4e531cb

Change-Id: I34287ec856fde16d56e9369ef2620311ba9bb722
Reviewed-on: https://dart-review.googlesource.com/c/79200
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-10-11 10:20:01 +00:00
Dmitry Stefantsov a539d2ef5f Revert "[fasta] Report errors for bounds violations"
The CL is reverted because it didn't account for the case when a check
of a user-specified type argument against the bound depends on another
type that is only known after type inference is done.

Change-Id: I1fd140af95ed37b9191a5b161a281d4639e3453f
Reviewed-on: https://dart-review.googlesource.com/c/79048
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-10-10 15:31:27 +00:00
Dmitry Stefantsov aa6fb2d3a4 [fasta] Report errors for bounds violations
Fixes #33308.

Bug: http://dartbug.com/33308
Change-Id: Iae087928468ed6883c438db95644135dc7ef0a6a
Reviewed-on: https://dart-review.googlesource.com/c/57621
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-10-10 12:03:36 +00:00
Kevin Millikin 0566f5fa27 Remove unnecessary test status lines
* The co19_2 test suite doesn't have collection/Maps at all.  Though
  test.py will ignore the unnecessary test status lines, there is no
  reason to have them.

* The co19 test suite has these tests but they are not expected to
  pass with a Dart 2 SDK.  They are already skipped for all Fasta
  targets, so the individual expectations can be removed.

Change-Id: I4d4c27254d4ff7da5a49da77fb2314b5beb035c1
Reviewed-on: https://dart-review.googlesource.com/c/78500
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-10-08 14:29:48 +00:00
Aske Simon Christensen d3bd06d4e8 Check class interface requirements using override check code.
When a member in the interface of a non-abstract class is found to
have an implementation with the correct name which does not override
the representative declaration of the member in the interface (and thus
has not been checked against that member for override validity), call
the override check to check interface validity.

Override relations thus checked produce an extra context message
explaining that the override relation must hold because both members
are inherited by a non-abstract class.

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

Change-Id: I955f057e35fa30f33c19da37c9cea1262042431c
Reviewed-on: https://dart-review.googlesource.com/c/74642
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-10-03 14:56:43 +00:00
Jens Johansen 570fd5a788 Error on re-export, export and import of libraries with same name.
Fixes #12916.

Change-Id: Icef0f04f1575c8dad5f1cd23a9363f06fa2a2b35
Reviewed-on: https://dart-review.googlesource.com/74161
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-25 09:09:21 +00:00
Daniel Hillerström 7ad1e5da99 Perform substitution on type argument/parameter bounds.
Fixes regression #34528. Introduces a new test to mitigate future
regressions.

Closes #34528.

Change-Id: Iaf0a8f44db2a8b4a8151c391ddb8dff69910fe3a
Reviewed-on: https://dart-review.googlesource.com/75840
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-09-24 14:02:01 +00:00
Aske Simon Christensen 8385c36d97 Move all int literal parsing and checking code together.
Report error for negated hex literals > 2^63.

Optimized common case of web int literal exactness check.

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

Change-Id: Ib72b2dbb21e42489ee2d06b17302daf83d560df1
Reviewed-on: https://dart-review.googlesource.com/72802
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-24 11:17:36 +00:00
Daniel Hillerström de984e58cb Type checking for redirecting factories.
Implements static semantics for redirecting factories (c.f. §10.6.2 of
the specification). This CL does not include inference of actual type
arguments on redirectees, that is it does not handle the case where
type arguments have been omitted on the redirectee as in this
following example program:

  class A<T> {
    factory A() = B;
  }
  class B<T> implements A<T> {
    B();
  }

Closes https://github.com/dart-lang/sdk/issues/32988.

Also resolves the second part of
https://github.com/dart-lang/sdk/issues/30579.

Can possibly also close https://github.com/dart-lang/sdk/issues/11578.

Change-Id: I5f1fb60510ba6cdc917321239819c1f817b5b85d
Reviewed-on: https://dart-review.googlesource.com/74580
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-09-19 06:20:20 +00:00
Dan Rubel 49da026e3e Report error for extends void type parameters
Change-Id: I634b836ea40199a1e7962b7d07ca9f5d1ef3f16a
Reviewed-on: https://dart-review.googlesource.com/74680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-13 20:27:56 +00:00
danrubel 9764bac918 Update OutlineBuilder to handle class C with M
That is, when `extends S` is missing.

Also address comment in https://dart-review.googlesource.com/c/sdk/+/73940

Change-Id: Ieee7ae42bf1e63d40cab08044068b809ea1f474d
Reviewed-on: https://dart-review.googlesource.com/74016
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-12 15:19:33 +00:00
Daniel Hillerström 3d4f28b23a Disallow default values in redirecting factory constructors.
Closes https://github.com/dart-lang/sdk/issues/34160

Change-Id: Idf6ee172b5fe81aa17920d12b68525a37a3c2231
Reviewed-on: https://dart-review.googlesource.com/72660
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-05 05:41:04 +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
Daniel Hillerström a56203041f Checks whether the type of a switch expression is assignable to the
types of its case expressions.

Resolves the first part of
https://github.com/dart-lang/sdk/issues/34207. According to the
language team the second part may soon become irrelevant.

Change-Id: Ifce38f2a62c293156dafa94f16799d5a126c6b9c
Reviewed-on: https://dart-review.googlesource.com/71981
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-09-03 11:03:56 +00:00
Jens Johansen 33704fa75f Fasta: Instance field cannot be const
Fixes #32326.

Change-Id: Idef32a842a68c5c9ee58caff7b6e731204f033b6
Reviewed-on: https://dart-review.googlesource.com/72041
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-08-31 10:28:19 +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
Daniel Hillerström 73a35c9937 Checks whether a constant factory has a constant target.
Closes https://github.com/dart-lang/sdk/issues/34161

Change-Id: Ie5eb4d3307e0fd389bcd25b8c548b6dff64633ab
Reviewed-on: https://dart-review.googlesource.com/71300
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-08-30 08:37:02 +00:00
Aske Simon Christensen 94dabdaae7 Error when importing a part
Fixes https://github.com/dart-lang/sdk/issues/33650

Change-Id: I2fb5f4bf7c20309c2da9660911b7ce2088e7efea
Reviewed-on: https://dart-review.googlesource.com/71820
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-08-29 12:19:17 +00:00
Daniel Hillerström 23e379d0aa Checks whether an interface is implemented multiple times.
It is a compile-time error if an interface appears multiple times
across the extends and implements clauses.

This CL implements a check to detect the aforementioned case. A
previous commit implemented this by expanding and refactoring the
restricted super types check in source_loader.dart
(c.f. checkSemantics method). The restricted super types check decides
whether a type is allowed to appear in an 'extends', 'implements', or
'with' clause. However, it turned out it may have sat too early in the
compilation pipeline as it failed to detect the following case

   class A implements Object {}

I decided that it was somewhat suboptimal to implement a special case
for "Object". Therefore I have moved the check to a later stage in the
pipeline, where classes without a super class have had the Object
class injected as their default super class. The check is now
implemented in kernel_class_builder.dart (c.f. checkSupertypes
method).

Closes https://github.com/dart-lang/sdk/issues/34193

Change-Id: Ie7153c896337b589118cac4b80e9df8ea5a09daa
Reviewed-on: https://dart-review.googlesource.com/70864
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-08-23 14:36:40 +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
Daniel Hillerström 5780deb18a Signal a compile-time error when a type variable name conflicts with a setter name.
Specification disallow name conflicts between
  - type variables and class names
  - type variables and getter names
  - type variables and member names

Although not present in current specification, the language team confirms that
it is also supposed to be a compile-time error if there is conflict with a setter.

Closes https://github.com/dart-lang/sdk/issues/33827

Bug:
Change-Id: Ia25bc91c3287f93ae43faae121a1f9d81b179c6b
Reviewed-on: https://dart-review.googlesource.com/70500
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-08-22 06:55:22 +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
Aske Simon Christensen f2766eb24e Disallow references to this in field initializers.
Fixes https://github.com/dart-lang/sdk/issues/33858

Change-Id: I619de64353ac5131d949d8e3898617435e9f6dcc
Reviewed-on: https://dart-review.googlesource.com/68920
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-08-10 11:12:58 +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
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
Dmitry Stefantsov 7d1f3b358a [fasta] Update test status after the fixes for #32613
Change-Id: Idd473d5105237bcb57c2c051e3a1903c041ec323
Reviewed-on: https://dart-review.googlesource.com/65323
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-07-18 10:00:08 +00:00
Zach Anderson d0510501d2 [build] Add -a kbc for interpreter
This CL adds support to build.py and test.py for building/testing
a VM with the interpreter on x64, e.g.:

$ ./tools/gn.py -m release -a x64 --bytecode
$ ./tools/build.py -m release -a x64 --bytecode runtime
$ ./tools/test.py -m release -a x64 -r vm -c dartkb language_2

Change-Id: I956d23790636609d4a2e71129481fcbd7afef9a0
Reviewed-on: https://dart-review.googlesource.com/65206
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-07-17 21:51:41 +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
Aske Simon Christensen 90e27b19ea Check for conflicts between a static setter and a constructor or static method.
Bug: https://github.com/dart-lang/sdk/issues/33237
Change-Id: I44c69f32039de9b024c942706e96bf1998217350
Reviewed-on: https://dart-review.googlesource.com/60583
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-06-28 11:47:33 +00:00
Aske Simon Christensen bd9aa5139a Error on cyclic constructor redirect.
Fixes https://github.com/dart-lang/sdk/issues/30856

Change-Id: Ib0cb851904fdcb12fff11bae92fe177739fe793f
Reviewed-on: https://dart-review.googlesource.com/60429
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-06-28 10:37:23 +00:00
Kevin Millikin df2529d443 Detect when a class has a member that conflicts with a static one
In Dart 2 classes are not allowed to have an instance method, getter,
or setter that conflicts with a static method, getter, or setter
declared in the class.  Detect this at the start of top-level type
inference when we build an explicit interface for every class.

Change-Id: I39c1887a07fde0c40367d8f243a37f06dfbba353
Reviewed-on: https://dart-review.googlesource.com/60581
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-06-27 09:30:58 +00:00
Dmitry Stefantsov 4fe71ec275 [fasta] Report instantiate-to-bound failure due to non-simple bounds
Fixes #33208, #31810, #32416, #32417

Bug: http://dartbug.com/33208
Bug: http://dartbug.com/31810
Bug: http://dartbug.com/32416
Bug: http://dartbug.com/32417
Change-Id: Id178daf35be459fdefe04091bf929b5743d89e81
Reviewed-on: https://dart-review.googlesource.com/41264
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-06-22 13:41:55 +00:00
Aske Simon Christensen f20672e00a Parse name of factory as method name instead of constructor reference.
Report an error when a factory constructor has type parameters.

Report a better error than the old "couldn't find constructor" or
"illegal method name" when the name of a constructor does not match
the name of the enclosing class.

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

Change-Id: Ie46a5b4cbe07ba05ce2936e1f8f9ca2cad0208f7
Reviewed-on: https://dart-review.googlesource.com/57620
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-06-11 09:55:24 +00:00