Just creating an Error object is sufficient on FF,
Chrome, Safari, and Edge. Note that captureStackTrace
was not supported by other browsers so those browsers
were going down the even slower path of throwing an
exception.
BUG=
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2668503002 .
This implements FutureOr<T> in strong mode, otherwise it's ignored (treated as `dynamic`.
Also fixes strong mode's inference subtype function incorrectly treating `void` as a malformed type. This had the consequence of allowing `void` to be inferred as a type argument.
R=leafp@google.com, paulberry@google.com
Review-Url: https://codereview.chromium.org/2647833002 .
Fix extending a JS class and add a test to ensure it
continues to work from DDC. Note this behavior will never
be supported in Dartium and is not yet supported by Dart2JS.
BUG=
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2654583002 .
This ensures the runtime type is of the tear-off expression's static
type, even when accessed through a superclass.
I also moved the two tests into a subdirectory so they are easier to
find. (It is inscrutable to me why we would have a single directory
with 1,868 test files in it.) That involved enabling recursive
directory listing in codegen_test, which exposed a couple of things.
Fix#27484.
R=leafp@google.com
Review-Url: https://codereview.chromium.org/2641543003 .
Improvement on #28286 - this is still not quite right as we'll throw a
TypeError instead of a NSM in certain cases depending on the order.
The spec will only throw a TypeError if NSM doesn't apply.
R=leafp@google.com
Review-Url: https://codereview.chromium.org/2636313002 .
EventStreamSubscription.listen does a cast which is only working in
DDC because we're ignoring the failure. This wraps the listener to
check the argument rather than casting the function. Also picks up a
few misc changes to the main SDK that hadn't been merged into DDC.
BUG=
R=jacobr@google.com
Review-Url: https://codereview.chromium.org/2609633002 .
Adding a TypeProvider instance to TypeSystem to avoid needing to
thread it through the various APIs, and to avoid having to change
the API every time a method which previously did not need to
access the TypeSystem suddenly does.
BUG=
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/2590883004 .
for example: `var item; for (item in list) { ... }`
this happens anytime ResolutionCopier is used on these, because it drops the staticElement reference for `item` in the above example.
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2612983002 .
This updates DDC options processing to support:
* --options /path/to/analysis/options/file.yaml
* --enable-strict-call-checks
* --supermixin
* --no-implicit-casts
* --no-implicit-dynamic
As well as general refactoring and cleanup of DDC options processing
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2598593003 .
This CL creates top level accessor functions which may be used to map from AST data structures to their corresponding elements and types, and begins using those accessor functions throughout the SDK. It also adds empty interfaces ResolutionTarget and ResolutionType, which are implemented by Element and DartType respectively.
In a future CL, I will change the types stored in the AST to ResolutionTarget and ResolutionType, rather than specific element types; this will decouple the ASTs from the element model. The presence of the accessor functions will allow clients to continue accessing elements and types in a type-safe way.
R=asgerf@google.com, brianwilkerson@google.com, scheglov@google.com, vsm@google.com
Review URL: https://codereview.chromium.org/2551023005 .