Commit Graph

4276 Commits

Author SHA1 Message Date
Brian Wilkerson a0cfe5aa65 Fix more issues related to optional new and const
Change-Id: I0c1302c9b0505694853175f2b756c134e0caba19
Reviewed-on: https://dart-review.googlesource.com/38900
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2018-02-06 16:10:53 +00:00
William Hesse 9c35cff5cd Revert "New methods on Iterable, List, Set, Queue, Map."
This reverts commit 0b59f24f97.

Reason for revert: Creates crashes in dart2js with kernel, see
https://luci-milo.appspot.com/buildbot/client.dart/dart2js-linux-d8-minified-1-5-be/9751

Original change's description:
> New methods on Iterable, List, Set, Queue, Map.
> Changes signature of Iterable.singleWhere.
> Makes LinkedHashMap no longer be a HashMap.
> 
> Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
> Reviewed-on: https://dart-review.googlesource.com/32541
> 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: Iab904f5885a5213ae2e16ef496eed0b6843185f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39060
Reviewed-by: William Hesse <whesse@google.com>
2018-02-06 13:32:19 +00:00
Lasse R.H. Nielsen 0b59f24f97 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
Reviewed-on: https://dart-review.googlesource.com/32541
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-06 11:17:46 +00:00
Mike Fairhurst 30e0c886e4 Allow no return in a Future<void>, test for FutureOr<void>.
The latter was already passing (because FutureOr<void>.isVoid is true
already, which was a condition of early bailout for MISSING_RETURN).

The former was not working, but is now handled.

Unit tests for each.

Change-Id: I0f6e7ddc71940517c5746c1a5431f4491ee2eef3
Reviewed-on: https://dart-review.googlesource.com/37440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-02-05 23:13:05 +00:00
Konstantin Shcheglov c16575c1f2 Issue 30884. Index MethodInvocation type arguments.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/30884
Change-Id: I0597d56d72fbff804ecf1a2f435815d02678eba6
Reviewed-on: https://dart-review.googlesource.com/38784
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-05 19:34:46 +00:00
Brian Wilkerson 6b23aec701 Correctly resolve constructors in generic classes
Change-Id: I88a30b151b3177d6ae628c50bb51aceb48a70e7a
Reviewed-on: https://dart-review.googlesource.com/38780
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-05 19:19:37 +00:00
Brian Wilkerson 27c4418f2d Generate an error when the first argument of an assert is a function
Change-Id: Ie6eaddaab827936a1127275b325dc6d4a3357e24
Reviewed-on: https://dart-review.googlesource.com/31963
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-02-05 16:53:26 +00:00
Brian Wilkerson e8a43ecd56 Make ConstantAstCloner insert a const keyword where one is implied
Change-Id: I9056d408c3d58ff684534553e544a249ceb68591
Reviewed-on: https://dart-review.googlesource.com/38400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-05 13:36:48 +00:00
Dan Rubel d99c2c76a3 Add fasta parser break/continue error messages
In addition to updating the fasta parser error messages, this CL
updates the recovery tests to automatically allow break/continue errors
in the valid and recovery code if those errors appear in the
base code being tested. For example, if the base code is

   main() { break; }

the invalid code is

   main() { var a break; }

and the expected recovery code is

   main() { var a; break; }

then because the base code has a break-error, then that error
is allowed/expected in both the invalid and recovery code
without being explicitly listed in the test.

Change-Id: Ic7c188d6e6fb506ee83b8c99175caab3a82444f2
Reviewed-on: https://dart-review.googlesource.com/38500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-02-05 12:42:57 +00:00
Devon Carew 32beedf168 Print method params as 'foo: bar' instead of 'foo : bar'.
Change-Id: I5c50936e1ead2b39d144a4e74e37482cb49410bd
Reviewed-on: https://dart-review.googlesource.com/38421
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-04 02:02:35 +00:00
Jaime Wren 9388ac6694 Implcit new bug fix, hardcoding of flag now disabled.
Change-Id: I38f1535202cdba20e0db20f5df55eee314585ffc
Reviewed-on: https://dart-review.googlesource.com/38348
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-02 23:01:36 +00:00
Jaime Wren a1754ff2be TBR Bot fix. Hardcode previewDart2 to be false to have the Dart SDK build.
Change-Id: Ida8e3a720c7a0e06d7ec0297f4ee2ba397899848
Reviewed-on: https://dart-review.googlesource.com/38342
Reviewed-by: Jaime Wren <jwren@google.com>
2018-02-02 21:43:43 +00:00
Jaime Wren c5c5734e13 Implicit new and const work for the analyzer- add support for library prefixes: "prefix.ClassName.[constructorName]?()"
Change-Id: I9f9d59e38123bbbd5e47993a8f416603b77d47fb
Reviewed-on: https://dart-review.googlesource.com/38340
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-02 21:08:46 +00:00
Jenny Messerly 85cfbebd76 Fix constKeyword usage in DDC in preparation for implicit new/const
Change-Id: Iad3d38449dbe5bbb71d470cf085c2c071432abf5
Reviewed-on: https://dart-review.googlesource.com/38147
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-02 20:33:46 +00:00
Brian Wilkerson cb1b28f04f Initial parser work to parse instance creation without a keyword but with type arguments
Change-Id: I23421aa7387f5c249dfa9acbe4cda2f92c3481a2
Reviewed-on: https://dart-review.googlesource.com/38166
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2018-02-02 18:07:37 +00:00
Brian Wilkerson 49e04b7875 Add an isConst getter to TypedLiteral
Change-Id: Ia884fe5aa6ba9b40ba5ef8c342c2312b3dd2ea77
Reviewed-on: https://dart-review.googlesource.com/38140
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-01 19:23:38 +00:00
Brian Wilkerson 30fa9c93af Clean up AnalysisOptions API
Change-Id: I54b7ba69cc1e03d38844abac7fdba07ba6c3c578
Reviewed-on: https://dart-review.googlesource.com/38080
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-01 17:50:38 +00:00
Brian Wilkerson 02fa885504 Add inConstantContext to Expression and use it
Change-Id: I1075afbe99f7d71b42b2a4074827bb91ea195a46
Reviewed-on: https://dart-review.googlesource.com/38001
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-01 17:25:08 +00:00
Jaime Wren 1f4c74dabb Add the new language option in analysis_options.yaml files for enabling the preview-dart-2 flag
Change-Id: I32c090ad1d7696dd18a7db7ee470ea1af5f1ec91
Reviewed-on: https://dart-review.googlesource.com/37921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2018-01-31 22:45:08 +00:00
Jaime Wren ca0b707d2a Re-worked and refactored the resolution of implicit-new source in the analyzer resolver to make sure that any 'ClassName.methodName()' will not be mistakenly resolved as a constructor invocation.
Before any ASTs are constructed, a lookup happens to see if such a constructor exists, otherwise the AST replacement will not proceed, and even temporary ASTs will not be created: in this way we can add the test test_visitMethodInvocations_not_implicit_constructor.

Change-Id: I01e25af5d1eaec659cf02ca89f8a9a5da334e6a9
Reviewed-on: https://dart-review.googlesource.com/37920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2018-01-31 22:21:18 +00:00
Brian Wilkerson b74ceb0248 Remove a warning (issue 31351)
Change-Id: Id798aa7ece345970e3bfba15b260df6482a57074
Reviewed-on: https://dart-review.googlesource.com/37861
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-31 20:42:26 +00:00
Brian Wilkerson 1d9ac49dd9 Reland "Add an error when an integer literal is out of bounds"
Change-Id: Id6ef76b47bedabc96fc372f6aea455975dfcc213
Reviewed-on: https://dart-review.googlesource.com/37840
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-01-31 16:50:55 +00:00
Jaime Wren 0bca64f57e First draft on API change for support for implicit new and const in the InstanceCreationExpressionImpl class.
Change-Id: Id8df09456689a400957fec15b9f32b8f4f10bab1
Reviewed-on: https://dart-review.googlesource.com/37642
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2018-01-30 20:07:49 +00:00
Jaime Wren 25d0bac724 Initial tests for the implicit new and const constructor support in the analyzer
Change-Id: Ieef3294810520aaa03f6782971ccaaeff6ddb875
Reviewed-on: https://dart-review.googlesource.com/37422
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-01-30 18:57:59 +00:00
Leaf Petersen 991753313f Remove deep future flattening from analyzer and DDC
Change-Id: Ic48f29adec3a46744b259ba5b2b8ad7d97caa6c2
Reviewed-on: https://dart-review.googlesource.com/37424
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-01-30 18:11:11 +00:00
Brian Wilkerson d0f105de1a Reland "Produce an error if there would be an exception thrown by an assert in an initializer list"
Change-Id: Id79a8cf949a08d56a59268b687f299f3482a1b88
Reviewed-on: https://dart-review.googlesource.com/37540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-30 14:40:19 +00:00
Paul Berry e978cd6062 Encapsulate the handling of forwarding stub target references.
As discussed in https://dart-review.googlesource.com/c/sdk/+/34261.

Change-Id: I2af5021ad9738f6bc47bb11d2a1133f303d3ace9
Reviewed-on: https://dart-review.googlesource.com/36481
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-01-30 11:49:38 +00:00
Konstantin Shcheglov da4a20b53e Include parts into libraries being analyzed, even when using external summary store which already has the same part (but not a library).
R=brianwilkerson@google.com

Change-Id: I0d07d217dbd9a0751686375979aaac205df4c6da
Reviewed-on: https://dart-review.googlesource.com/37380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-29 19:42:34 +00:00
Jaime Wren 7af4db0ea0 Implicit new constructor work for the analyzer, behind the previewDart2 flag.
I could not add a test into element_resolver_test.dart as the scope lookup logic does not resolve the type "Object" to the ClassElement for the type Object, that is:

test_visitMethodInvocation_implicit() async {
    // Object()
    InterfaceType obType = _typeProvider.objectType;
    MethodInvocation invocation = AstTestFactory.methodInvocation2("Object");
    // The invocation element in visitMethodInvocation is not resolved to be a
    // ClassElement in this test harness.
  }


This prevents this source from being invoked.

I was however able to get this test, and an accompanying test for named constructors, to work in resolver_test.dart.  It felt like the wrong test file to include so I left the tests out- do advise.

test_visitMethodInvocations_implicitConstructor() async {
    String code = '''
class A {
  A() {}
}
main() {
  var v = A(); // marker
}
    ''';
    CompilationUnit unit = await resolveSource(code);
    AstNode constructorName = findMarkedIdentifier(code, unit, "(); // marker");
    InstanceCreationExpression instanceCreationExpression =
        constructorName.parent.parent.parent;
    expect(instanceCreationExpression, isNotNull);
    expect(instanceCreationExpression, isNotNull);
    expect(instanceCreationExpression.constructorName.type.type, isNotNull);
    expect(instanceCreationExpression.constructorName.staticElement, isNotNull);
    expect(instanceCreationExpression.staticElement, isNotNull);
    expect(instanceCreationExpression.staticType, isNotNull);
  }

Change-Id: I03214c194f1052d000d7f5e840df80d4f66e2a82
Reviewed-on: https://dart-review.googlesource.com/36365
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-01-29 19:25:33 +00:00
Brian Wilkerson 3f67ca29da Improve error message (issue 28482)
Change-Id: If8365ea99b190f1d316c0518ae84692a9dce6e57
Reviewed-on: https://dart-review.googlesource.com/37140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-27 18:37:29 +00:00
Konstantin Shcheglov 8fbcf977e5 Replace license in generated files.
R=devoncarew@google.com

Change-Id: I7511c8da329eba760698a48abc0f8db16038b9ea
Reviewed-on: https://dart-review.googlesource.com/37127
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-27 03:18:18 +00:00
Mike Fairhurst cb7e85a26d Support void as a Top type, with as few other changes as possible.
Change-Id: Ife337e28fa86f9b98cdabf48a01a4e2f608aa4b8
Reviewed-on: https://dart-review.googlesource.com/35520
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-01-26 22:42:08 +00:00
Brian Wilkerson 7a36d39962 Revert "Produce an error if there would be an exception thrown by an assert in an initializer list" (TBR)
Change-Id: Iece7d75e9245cdb9d0a72ac30f6b1031a76c0755
Reviewed-on: https://dart-review.googlesource.com/37080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-26 21:54:30 +00:00
Brian Wilkerson fb739fffe6 Produce an error if there would be an exception thrown by an assert in an initializer list (2)
Change-Id: I2f268a23c3d84dfbe4bba67730e226f5b5603570
Reviewed-on: https://dart-review.googlesource.com/32740
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-26 20:15:01 +00:00
Paul Berry d68fbb7454 Add new warning StrongModeCode.TOP_LEVEL_INSTANCE_METHOD.
This warning fires if a top level initializer depends on the type of a
method whose type is subject to type inference.  This warning is
needed because the analyzer implementation of top level type inference
doesn't guarantee that the method type will be inferred prior to the
initializer, so it's possible that type inference will produce an
incorrect result.  See #31925 for more details.

Change-Id: Iec048d2638877c16ae11a87eae0382b7352f726c
Reviewed-on: https://dart-review.googlesource.com/36841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-26 01:10:00 +00:00
Paul Berry 68fd556216 Rework _validateTopLevelInitializer to use a visitor.
The old implementation only validated a whitelisted set of use cases,
so it would often miss important subexpressions.  The new
implementation is based on a RecursiveAstVisitor so by default it
visits all subexpressions; we use overrides for the specific cases
where it's not necessary to visit all subexpressions.

Fixes #31963.

Change-Id: Icb9833f51bef26874f655cd2ba4ffc509bfffef3
Reviewed-on: https://dart-review.googlesource.com/36803
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-25 21:47:46 +00:00
Paul Berry 314b89e11d Update the analyzer to require noSuchMethod overrides to be concrete.
See 38dcb10543 for details.

Change-Id: I00608f7106e1b37cde81b8145d8d748f8cd97804
Reviewed-on: https://dart-review.googlesource.com/36520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-01-24 13:55:18 +00:00
Paul Berry d031b0aecf Remove unnecessary typeNeeded booleans from type inference engine.
Change-Id: I35039a5662e48a983b214ceb3732c3e900396db4
Reviewed-on: https://dart-review.googlesource.com/36380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-01-23 15:22:58 +00:00
Brian Wilkerson 86b27dd577 Add a hint for unused labels (issue 31930)
Change-Id: I0d2f41fdb8a7399e6664dcf57503de84991c075d
Reviewed-on: https://dart-review.googlesource.com/36181
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-22 18:34:28 +00:00
Brian Wilkerson e95486d18e Revert "Add an error when an integer literal is out of bounds"
Change-Id: I2376904a8b92382c0f33212f41c88bafd75f3a15
Reviewed-on: https://dart-review.googlesource.com/35806
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-18 22:40:14 +00:00
Brian Wilkerson cf7efddb0b Add an error when an integer literal is out of bounds
Change-Id: I8bc9e6e03d76822785f254ec346d82983ea63f2c
Reviewed-on: https://dart-review.googlesource.com/31841
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-18 17:30:54 +00:00
Jens Johansen 188cee8b1c [kernel] Rename SyntheticDefault to Synthetic
Change-Id: Ibfa23fcde73e3482c1001bb885de86a408c66e5c
Reviewed-on: https://dart-review.googlesource.com/35580
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-01-18 11:09:35 +00:00
Paul Berry 23cba1d438 Issue a warning if top-level inference depends on an implicitly typed instance getter.
If an implicitly typed top level variable or field depends on an
implicitly typed instance getter or instance field, the analyzer
implementation of type inference isn't guaranteed to infer the
depended-upon field first, therefore the type might be inferred
incorrectly.

The new front end doesn't have this problem, so the user's code will
execute correctly at runtime, but they might get confusing results
from the analyzer.  To alert users of this problem, we issue a
compile-time warning whenever an implicitly typed top level variable
or field depends on an implicitly typed instance getter or instance
field.

Change-Id: I100bcbe1a76472bcb7d493eb12e4a3e2d0605e79
Reviewed-on: https://dart-review.googlesource.com/35385
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-01-17 21:58:28 +00:00
danrubel 6f6689889c Update fasta parser to report ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR
In addition to adding missing errors, this CL inlines modifier parsing
as part of a multi step effort to parse modifiers once and provide
better error recovery for class member and top level declarations.

Change-Id: Ibea91a4a3e2073ed6079f0f44ff4bbbb4a98a614
Reviewed-on: https://dart-review.googlesource.com/35300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-01-17 18:28:48 +00:00
Leaf Petersen fff71ee60f Make USES_DYNAMIC_AS_BOTTOM (fuzzy arrows) a warning
Fixes https://github.com/dart-lang/sdk/issues/31874 .

Change-Id: I75b43f52692f5860d8c4e78acb15b9c9281754a5
Reviewed-on: https://dart-review.googlesource.com/34506
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-01-17 17:15:18 +00:00
Peter von der Ahé 4d1adf42d3 Deprecate IncrementalClassHierarchy
See https://github.com/dart-lang/sdk/issues/31842

Change-Id: I019909831a91a4e06138dc3a6bf32f766bca1ae6
Reviewed-on: https://dart-review.googlesource.com/34880
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-17 13:30:17 +00:00
Konstantin Shcheglov 3c2b4a7826 Store NullType as the callee types, we don't use them.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I01ee27c6c54cef559fd3cf8dd871d644cae832e3
Reviewed-on: https://dart-review.googlesource.com/34560
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-16 17:19:42 +00:00
Konstantin Shcheglov 59cbc09523 Infer () => null as returning Null.
Bug:
Change-Id: I5bf1f7c55825ddb6202422fc0025d983914c4823
Reviewed-on: https://dart-review.googlesource.com/34420
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-01-12 21:02:20 +00:00
Mike Fairhurst 90f9fa5664 Fix #28513 Force an order of LUB/GLB on equivalent Top types.
A fairly internal case, so I ended up guarding it semi-heavily with
asserts, which could go against convention, but seems fairly safe here.

Two tests: One that sanity checks some edge cases & exemplary values,
and another one that checks each combination programmatically. Together
they should be the best coverage; both the reliance of computers and
the simplicity of specific cases.

Should be very easy to pop in the void type here next.

Bug: 28513
Change-Id: Id20811a77b4de3f2c4ede7a77e1da5a114432e97
Reviewed-on: https://dart-review.googlesource.com/34305
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-01-12 18:33:59 +00:00
Konstantin Shcheglov f79596c0ff Switch from ForwardingStub to Procedure.forwardingStubInterfaceTarget.
Fixes #31519

R=paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/31519
Change-Id: I0e9634ba6a1413a758ff3376c69d530d4215b512
Reviewed-on: https://dart-review.googlesource.com/34261
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-01-12 17:54:30 +00:00