Commit Graph

676 Commits

Author SHA1 Message Date
William Hesse c71a5279c5 Revert "Add more tests for async*/await-for operations."
This reverts commit a0d576e6cd.

Reason for revert: Turned many buildbot builders red. Use the "Choose tryjobs" button to run more configurations on this type of commit.  Use the "tools/bots/approve_results.dart" tool to update expectations for builders running the new workflow

Original change's description:
> Add more tests for async*/await-for operations.
> 
> Change-Id: I2c8ffb8a6738b8dee43cfdf85be0c54d2735b6cc
> Reviewed-on: https://dart-review.googlesource.com/c/85391
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=lrn@google.com,leafp@google.com

Change-Id: I81830c3fc565b62e98538feba9bd64c6dd11dd51
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/86023
Reviewed-by: William Hesse <whesse@google.com>
2018-12-04 20:09:46 +00:00
Lasse Reichstein Holst Nielsen a0d576e6cd Add more tests for async*/await-for operations.
Change-Id: I2c8ffb8a6738b8dee43cfdf85be0c54d2735b6cc
Reviewed-on: https://dart-review.googlesource.com/c/85391
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-12-04 13:58:03 +00:00
Sigmund Cherem 8d41ec30c0 Remove obsolete comment in status files.
I added these when we were maintaining the .status files with a script at the
time strong-mode was being implemented in the CFE. The comments are no longer
relevant.

TBR=paulberry@google.com

Change-Id: I3d37da32cd611731e3e0d91a5aa751fa550cc179
Reviewed-on: https://dart-review.googlesource.com/c/85408
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-11-27 01:25:51 +00:00
Samir Jindel 733b53d971 [vm] Mark enum_private_test/01 as flaky.
Change-Id: I1d5b597f051808f4ef5dfbe5cc5a8e4bf77016b5
Reviewed-on: https://dart-review.googlesource.com/c/84533
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-11-15 16:20:50 +00:00
Samir Jindel 6914a86177 [vm] Update status file for enum_private_test/01.
Change-Id: I9c666c22a4f6e5eae9f98fa20f37480e9c6e940b
Reviewed-on: https://dart-review.googlesource.com/c/84530
Auto-Submit: Samir Jindel <sjindel@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-11-15 15:16:49 +00:00
Alexander Markov ed48cfeb47 [vm/bytecode] Support source positions when executing bytecode
This includes both interpreted and compiled bytecode.

Change-Id: I6309ec4f0687f68caf6260cc57dacf94f027177d
Reviewed-on: https://dart-review.googlesource.com/c/84481
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-11-15 00:48:04 +00:00
Vyacheslav Egorov 5db3314a86 [gardening] Update status for language_2/type_constants_test/none
Hot reload does not support deferred libraries.

TBR=lrn@google.com

Change-Id: Ie33966404d1274b8cbec7a54c284fd9c0022b5af
Reviewed-on: https://dart-review.googlesource.com/c/83981
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-11-09 11:28:02 +00:00
Lasse R.H. Nielsen 4f5bc1ea22 Add test for constant type literals being valid in switch cases and constant maps.
Implementations already allow type constants, some just do not have the correct semantics.

See: https://dart-review.googlesource.com/c/sdk/+/81274/2..4
Change-Id: I2f535e4609b9d3b002ba33f579f3b840d70e0fdb
Reviewed-on: https://dart-review.googlesource.com/c/82981
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-11-09 10:22:00 +00:00
Aart Bik abe8794605 Revert "[Gardening] Mark language_2/vm/mult_int_test as failing on windows-dartkp-simarm64"
This reverts commit 3f585d1b78.

Reason for revert: underlying issue (spilling) has been fixed

Original change's description:
> [Gardening] Mark language_2/vm/mult_int_test as failing on windows-dartkp-simarm64
> 
> Issue https://github.com/dart-lang/sdk/issues/35091
> 
> Change-Id: I129c05994223fc5067ec720290fff9cc317f8bb4
> Reviewed-on: https://dart-review.googlesource.com/c/83386
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Auto-Submit: Martin Kustermann <kustermann@google.com>

TBR=vegorov@google.com,kustermann@google.com

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

Change-Id: Idc8fbe3397e393813fffcab1336f74f324bc70bd
Reviewed-on: https://dart-review.googlesource.com/c/83880
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2018-11-08 21:32:56 +00:00
Martin Kustermann 3f585d1b78 [Gardening] Mark language_2/vm/mult_int_test as failing on windows-dartkp-simarm64
Issue https://github.com/dart-lang/sdk/issues/35091

Change-Id: I129c05994223fc5067ec720290fff9cc317f8bb4
Reviewed-on: https://dart-review.googlesource.com/c/83386
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2018-11-07 12:13:48 +00:00
Lasse R.H. Nielsen 095d694add Add tests for set literals.
Change-Id: Ia5e576e801bd4c9dd3fabca5f11c8e4f86e98803
Reviewed-on: https://dart-review.googlesource.com/c/82840
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-11-06 13:47:35 +00:00
Erik Ernst 4cf179bcf1 Corrected outdated tests string_split_test and string_supertype_checked
Change-Id: I9ecb49d921b3df1bb5cda63b65e6ae07e618110d
Reviewed-on: https://dart-review.googlesource.com/c/82721
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2018-11-05 14:21:19 +00:00
Martin Kustermann 6d9dc93d0e [VM] Follow-up status file update after landing changes to kernel2kernel constant evaluator
Change-Id: Ia99a27ce81eed0a6f74b669217c5d998f157ace4
Reviewed-on: https://dart-review.googlesource.com/c/82584
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-11-02 11:14:15 +00:00
Martin Kustermann 8953788993 [VM] Convert const Symbol("..") to SymbolConstants in kernel2kernel transformation
Issue https://github.com/dart-lang/sdk/issues/34911

Change-Id: Ib504d57b5a529a04f511f737af4cec0ff0590250
Reviewed-on: https://dart-review.googlesource.com/c/82069
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-11-02 09:28:15 +00:00
Alexander Markov 056fdb8734 [vm/kernel] Fix kernel tree shaker after FunctionType.typedefType change
Fixes https://github.com/dart-lang/sdk/issues/34995

Change-Id: Ieef2696ea9cfe689a661dc7d1ebd86b257b49bbb
Reviewed-on: https://dart-review.googlesource.com/c/82261
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-11-01 15:41:12 +00:00
Peter von der Ahé ba73aa9452 Update status file for VM precompiler
Change-Id: I57c4dc2e5effd62bdddbe69c711070bd31a6c2ea
Reviewed-on: https://dart-review.googlesource.com/c/82220
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-10-31 11:17:31 +00:00
Ryan Macnak 2085277771 [vm, reload] On the path for no shape changes, defer freeing the old class table until the next safepoint.
Compare the reload rollback path.

Bug: https://github.com/dart-lang/sdk/issues/34888
Change-Id: I5b9e7cd8392f9c9d61df31481956a9fa67435b33
Reviewed-on: https://dart-review.googlesource.com/c/81940
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-10-30 21:53:54 +00:00
Jens Johansen a1293f1591 test.py -c fasta: Enable asserts and verify
Change-Id: Ie7ff93cb552a0b2ae8e11078dd19358d199889d1
Reviewed-on: https://dart-review.googlesource.com/c/82040
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-10-30 08:34:03 +00:00
Alexander Aprelev 821b5fe72a [gardening] Mark language_2/disassemble_test flaky
Bug: dartbug.com/34971
Change-Id: Iafc435a472b6f112cc812813ed90690318b98d2e
Reviewed-on: https://dart-review.googlesource.com/c/81920
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-10-29 20:55:33 +00:00
Samir Jindel e23acaaf90 [vm/aot] Fix obfuscation.
Test Plan:

Make vm-kernel-precomp-obfuscate-linux-release-x64-try green, ensuring status file changes
reflect design gaps and not bugs.

Tested locally that obfuscated Flutter Gallery runs.

Change-Id: Ifcdc334de58f43c310e15b58dbcf6fe1597206f2
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-obfuscate-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/81009
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-10-26 13:00:33 +00:00
Martin Kustermann dec268cfae [VM] Catch non-instantiated type arguments for constant partial instantiation expression
This makes us report the following error

  * in JIT:

  Unhandled exception:
  'test.dart': error: Type arguments must be instantiated in partial instantiation.
  #0      main (...)
  ...

  * in AOT:

  test.dart:7:28: Error: The type '#lib1::C::T' is not a constant, only instantiated types are ...
    const C({this.callback = _defaultCallback});
                           ^
  test.dart:7:17: Context: While analyzing:
    const C({this.callback = _defaultCallback});
                ^
  test.dart:5:37: Error: The type '#lib1::C::T' is not a constant, only instantiated types are ...
    void foo([dynamic Function(T) f = _defaultCallback]) {}
                                    ^
  test.dart:5:33: Context: While analyzing:
    void foo([dynamic Function(T) f = _defaultCallback]) {}
                                ^
  test.dart:11:38: Error: The type '#lib1::bar::T' is not a constant, only instantiated types are ...
  void bar<T>([dynamic Function(T) f = _defaultCallback]) {}
                                     ^
  test.dart:11:34: Context: While analyzing:
  void bar<T>([dynamic Function(T) f = _defaultCallback]) {}



Issue https://github.com/dart-lang/sdk/issues/32912

Change-Id: I05c7019119a50a9cc38939d9cb41aeaa06c853bc
Reviewed-on: https://dart-review.googlesource.com/c/81278
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-10-25 09:23:18 +00:00
Lasse R.H. Nielsen 03765ed6ec Update old mixin tests. Remove the --super-mixins flag from the tests.
Bug: http://dartbug.com/34781
Change-Id: Ib07e1927e7de35ff0c48514b9e89da65a5f192dd
Reviewed-on: https://dart-review.googlesource.com/c/79700
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-10-23 08:35:49 +00:00
Martin Kustermann 349adc5b1f Reland "[VM] Use c++/kernel2kernel constant evaluator for const StaticInvocation in the kernel IR"
Fixes https://github.com/dart-lang/sdk/issues/34770

Change-Id: I55b02e6ce327f4a08d96612fea44f7b03bddcbb5
Reviewed-on: https://dart-review.googlesource.com/c/79680
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-10-16 11:22:56 +00:00
Dmitry Stefantsov bf270577cc [fasta] Report errors on generic function types in type arguments
Fixes #30931

Bug: http://dartbug.com/30931
Change-Id: Ia44f8ff95e85547997912c7dd1403ae1f77aec33
Reviewed-on: https://dart-review.googlesource.com/c/79720
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-10-15 13:48:03 +00:00
Dmitry Stefantsov 22b11717ac [fasta] Fix bounds checking: non-generic types are always well-bounded
Change-Id: I745450f0d4c9a41f9df3e1dc97dd42cf25d69edc
Reviewed-on: https://dart-review.googlesource.com/c/79681
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-10-15 12:50:23 +00:00
Johnni Winther dc9d6785de Report compile-time errors on invalid switch cases
This is a temporary fix for issue 32557 until CFE handles it.

Change-Id: I4f0cfa5a98af6b25536f0c8e0a257940f8ce708b
Reviewed-on: https://dart-review.googlesource.com/c/79561
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2018-10-12 17:52:12 +00:00
Kevin Millikin 69cf0ec97c Signal an error if a class extends a mixin
Declared mixins are not classes and should not be able to be
extended.  This was not allowed by the analyzer anyway and since the
mixin declaration feature is not launched, we are not breaking any
code by making this bug fix.

Change-Id: Ia49dd207213accb16ad8dd819a22844d65ccfcab
Reviewed-on: https://dart-review.googlesource.com/c/79524
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-10-12 14:45:28 +00:00
Daniel Hillerström eee8787a8d Generate noSuchMethod forwarders for private members inherited from a
class in a foreign library.

This CL changes the predicate which is used to decide whether to
generate noSuchMethod forwarders such that it returns true whenever
the class in question has a user defined no such method or the
enclosing library of the class is different from that of the member.

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

Change-Id: I0ffcbb8c8bdd69e4261bcefce2251d31babc19cf
Reviewed-on: https://dart-review.googlesource.com/c/79209
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-10-12 13:58:10 +00:00
Aske Simon Christensen 5cbb640f7c Error for type arguments after named constructor with implicit new
Closes https://github.com/dart-lang/sdk/issues/34403

Change-Id: I18a55b8f33ed313c048add4a8b49f5f98fc26cf5
Reviewed-on: https://dart-review.googlesource.com/c/78080
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-10-12 09:48:02 +00:00
Kevin Millikin 2fa1143600 Check classes at mixin applications
When a declared mixin is applied to a class, the class must implement
the superclass constraint interfaces named in the mixin declaration.

Change-Id: I6ace9fe244c1c87860b69c2c5e68f2c31ae73d7c
Reviewed-on: https://dart-review.googlesource.com/c/79206
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
2018-10-12 08:34:07 +00:00
Sigmund Cherem 0cdd5b9ff3 Raise warning to error: duplicate key in a const map is now an error in Dart.
Eventually the plan is to handle this in the CFE when it performs
constant-evaluation, but for now we can check this in dart2js
(see https://github.com/dart-lang/sdk/issues/32983)

Change-Id: Ic2e5cfd96961094e634da201c55f82398c060aca
Reviewed-on: https://dart-review.googlesource.com/c/79421
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-10-12 00:18:34 +00:00
Dmitry Stefantsov 265d0d9ec1 Update status files after 8648d782
Change-Id: I14f42755ed1101a837ea13bd8de425bcb9b422cb
Reviewed-on: https://dart-review.googlesource.com/c/79210
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-10-11 11:33:02 +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
Peter von der Ahé dfb8e97b86 Report errors on members hiding prefixes
Fixes https://github.com/dart-lang/sdk/issues/34498

Change-Id: I7aef905f88502805e15deed8ebd453f7896daac1
Reviewed-on: https://dart-review.googlesource.com/c/79047
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-10-11 07:30:13 +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 c8b709d95b Update status files after aa6fb2d3
Change-Id: Ia474d49b1766c38e1f7a34009bd213622aced0c4
Reviewed-on: https://dart-review.googlesource.com/c/79043
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-10-10 14:09:42 +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
Martin Kustermann 6c0b854477 [VM] Fix canonicalization of doubles: Two doubles are canonicalized to the same value if they are idencial()
Fixes https://github.com/dart-lang/sdk/issues/34730

Change-Id: I9f60c5f81ceb9bd31794efe20012a343dab748bb
Reviewed-on: https://dart-review.googlesource.com/c/78747
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-10-09 12:33:57 +00:00
Kevin Millikin 1f916eb4e6 Mark a failing test
In the VM's ahead-of-time compiler, a constant -0.0 is not identical
to a literal -0.0.

Change-Id: I93599bbe62bcbc3d891f959af18d2fc1f49fe0f6
Reviewed-on: https://dart-review.googlesource.com/c/78743
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
2018-10-09 11:30:18 +00:00
Peter von der Ahé 6cd25af684 Configure defines correctly in config_import_test.dart
Change-Id: I5ad46c03c92fa55249e35e83d9f78dabdfcc69f2
Reviewed-on: https://dart-review.googlesource.com/c/78521
Commit-Queue: Peter von der Ahé <ahe@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-10-09 11:06:29 +00:00
Alexander Markov f939503b50 [vm/aot] Make mixin deduplication transformation more robust wrt new mixins
Previously, mixin deduplication transformation expected that isAnonymousMixin
classes could occur only in a superclass position. After this change,
deduplication also handles (canonicalizes) isAnonymousMixin classes in
implementedTypes, as CFE uses isAnonymousMixin classes in implementedTypes
to represent superclass constraints for mixin declarations.
No other uses of isAnonymousMixin classes supported.

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

Change-Id: I8558ce53c4fb1e5a06f839fa5ec8022958d9dafd
Reviewed-on: https://dart-review.googlesource.com/c/78383
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2018-10-08 19:05:54 +00:00
Aske Simon Christensen bb2775b16a Only perform override check on declared members.
The code in class_hierarchy.dart that looped over override pairs
included implementations inherited from its superclass as potential
overriders, presumably in a broken attempt to include some interface
checks into the mix.

With this problem fixed, the special case in kernel_class_builder.dart
that excluded overriders not declared in the current class (i.e.
declared in a mixin) could be removed without incurring false
positives.

These override checks performed on members from a mixin produce an
extra context message indicating the class where the two members meet,
giving rise to the override relation (similarly to interface checks).

Since the same member can now override more than one member (or even
the same member more than once), the diagnostics message duplication
check has been extended to also include the context in the comparison.

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

Change-Id: I990e5719ae1749fd1aad1ad478aaa6e173cb170b
Reviewed-on: https://dart-review.googlesource.com/c/76900
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
2018-10-03 14:56:43 +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
Paul Berry 49f36b0b2d Reland "Test that the result of instantiate-to-bounds is appropriately checked for super-boundedness."
This is a reland of 7419667d67

I reverted this CL in
https://dart-review.googlesource.com/c/sdk/+/77520 because I thought
it had broken a bunch of bots.  It turns out that the bots weren't
broken; they were just erroneously reporting a breakage because some
change-detection code had noticed that there were new failing tests,
and there is not yet a way to tell the change-detection code that the
failures are expected.

Original change's description:
> Test that the result of instantiate-to-bounds is appropriately checked for super-boundedness.
>
> When I implemented super-boundedness for the analyzer in
> b1a54154f8, very little test status
> changed, indicating we didn't have much test coverage for verifying
> that the result of instantiate-to-bounds was appropriately checked for
> super-boundedness.  This CL fills in the coverage gap.
>
> Change-Id: I8f6fbb3aa4cae1e62861b5eddb113ee9b4bb085c
> Reviewed-on: https://dart-review.googlesource.com/77010
> Commit-Queue: Paul Berry <paulberry@google.com>
> Auto-Submit: Paul Berry <paulberry@google.com>
> Reviewed-by: Erik Ernst <eernst@google.com>

Change-Id: Ic84321e928aaf4c6533e6cf5b9d521a1da77dba7
Reviewed-on: https://dart-review.googlesource.com/c/77660
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-10-02 20:24:16 +00:00
Paul Berry d70b0fa3be Revert "Test that the result of instantiate-to-bounds is appropriately checked for super-boundedness."
This reverts commit 7419667d67.

Reason for revert: Broke a lot of bots.  Will investigate tomorrow.

Original change's description:
> Test that the result of instantiate-to-bounds is appropriately checked for super-boundedness.
> 
> When I implemented super-boundedness for the analyzer in
> b1a54154f8, very little test status
> changed, indicating we didn't have much test coverage for verifying
> that the result of instantiate-to-bounds was appropriately checked for
> super-boundedness.  This CL fills in the coverage gap.
> 
> Change-Id: I8f6fbb3aa4cae1e62861b5eddb113ee9b4bb085c
> Reviewed-on: https://dart-review.googlesource.com/77010
> Commit-Queue: Paul Berry <paulberry@google.com>
> Auto-Submit: Paul Berry <paulberry@google.com>
> Reviewed-by: Erik Ernst <eernst@google.com>

TBR=paulberry@google.com,lrn@google.com,leafp@google.com,eernst@google.com

Change-Id: I536c9721a1d79b98b2e3c2a6f7650b134b19f561
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/77520
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-10-01 23:54:48 +00:00
Paul Berry 7419667d67 Test that the result of instantiate-to-bounds is appropriately checked for super-boundedness.
When I implemented super-boundedness for the analyzer in
b1a54154f8, very little test status
changed, indicating we didn't have much test coverage for verifying
that the result of instantiate-to-bounds was appropriately checked for
super-boundedness.  This CL fills in the coverage gap.

Change-Id: I8f6fbb3aa4cae1e62861b5eddb113ee9b4bb085c
Reviewed-on: https://dart-review.googlesource.com/77010
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-10-01 22:40:05 +00:00
Paul Berry b237cf1037 Fix incorrect constructor name in const_native_factory_test
Change-Id: I981ee1f1bb466158ceea19d184b5943e31d78825
Reviewed-on: https://dart-review.googlesource.com/77000
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-27 23:25:38 +00:00
Alexander Markov 2742a5d558 [Gardening] Update test status
Issue: https://github.com/dart-lang/sdk/issues/34599
Issue: https://github.com/dart-lang/sdk/issues/34606
Change-Id: Ieba1080a23d72b5c05086ece2c1cb5ea2e0ad5be
Reviewed-on: https://dart-review.googlesource.com/77003
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-09-27 18:20:37 +00:00
Paul Berry d79f7493b3 Test that type parameters of typedefs are properly bounds checked.
I'm trying to fix an analyzer bug where typedef type parameters
weren't checked properly, and it appears that we have no language_2
test cases for it.

Change-Id: I216a337eeaae6ac2008c0c26139797e00099ffcb
Reviewed-on: https://dart-review.googlesource.com/76707
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-27 12:50:05 +00:00
Kevin Millikin c9b05d3f1f Allow super calls in mixin declarations
Allow super calls to occur in mixin declarations if they target a
method from any of the superclass constraint interfaces.

Instead of compiling the Dart mixin declaration
    mixin M on S0, S1 {...}
to Kernel:
    abstract class _M&S0&S1 = S0 with S1;
    abstract class M extends _M&S0&S1 { ... }
we compile it to Kernel:
    abstract class _M&S0&S1 implements S0, S1 {}
    abstract class M extends _M&S0&S1 { ... }
because the former is not symmetrical with respect to S0 and S1.  It
will prefer a method from the 'mixin' S1 over one from S0 which can
give a compile-time error if the method from S0 is more general.

Modify mixin inference to support the new compilation of mixin
declarations.  It still has to support old-style VM super mixins until
support for those is removed from the VM.

Change-Id: Ib945aa11cc19c457b07bc802beae10d1663ff6b7
Reviewed-on: https://dart-review.googlesource.com/76141
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-09-27 10:19:30 +00:00