This appears to cut out about 1/3 of the strong mode errors reported
in angular2. The actual cases removed that I looked at seem fine - e.g., we may inject an implicit cast, but it'll work fine at runtime.
Fixes#302R=leafp@google.com
Review URL: https://codereview.chromium.org/1310053005 .
Failures generate a StrongModeError. Fixes#236. Partially addresses #238.
Some issues to do:
- We're too eager to throw a StrongModeError. E.g., <int>[] is List<String> will throw.
- We don't differentiate between implicit and explicit casts.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1298893003 .
we weren't running a bunch of tests on the bots :|
amazingly, none were broken yet
this also fixes karma.conf log level, and disables some spammy prints from one of the tests
R=vsm@google.com
Review URL: https://codereview.chromium.org/1257233008 .
Main goal here was to get rid of the enter/exit compilation unit tracking, to allow further Compiler/Server refactoring. We can get the Uri/LineInfo/contents off Source, which AnalysisError already has
SummaryReporter is now fairly generic.
TODOs for the future:
* figure out what to do about ErrorCodes, in particular dev_compiler prefix feels off.
* skip the intermediate StaticInfo types? They're really just builders now for AnalysisError.
* don't classify all existing messages as "AnalyzerError" ... just print them ...
* skip logger. For our command line program, stdout is part of its "API", IMO it shouldn't use logging for those messages. Consider Pub, which uses stdout/err for its messages, and uses logging for more detailed troubleshooting.
R=pquitslund@google.com, vsm@google.com
Review URL: https://codereview.chromium.org/1230903002.
we already have to review them, so running a diff and failing the rest of the test pass seems unhelpful. Instead operate like our generated SDK does, and update in place
R=vsm@google.com
Review URL: https://codereview.chromium.org/1188173003.
The dart runtime files are roughly split around functional boundaries. Comments at the top of each file describe the function of the library. I'm not sure that these are 100% right yet, but they're closer. We may want to iterate on the organization.
The main dart runtime file just re-exports various symbols from the sub-libraries. It has hard dependencies on the other runtime files, some of which have soft (lazy) dependencies on SDK files. The generated code now depends on dart and dartx as a imported libraries, rather than as top level symbols.
This CL also includes some new code to make type representations a bit better. This is mostly in the new types.js file, which makes all of the non-instance types (dynamic, bottom, void, function types) subtypes of a common representation type. Among other things, they now have the correct runtime type (core.Type). Some of the type code has been rationalized around this a bit, but there is more left to do here. The setSignature code in classes.js now also places the correct runtime type on nominal (instance) types. There are new tests in the runtime_tests.js file to test for this.
The static object method code that implements the Object methods has not yet been updated to dispatch on type representations. I will do that in a separate CL.
BUG=
R=jmesserly@google.com, vsm@google.com
Review URL: https://codereview.chromium.org/1182653002
presubmit.sh still runs all of them in the same order
often I'd like to iterate on analyze or rerun format without running all of the tests, and find myself copying analyze or format lines from test.sh
R=leafp@google.com
Review URL: https://codereview.chromium.org/1167233002
fixes#138, extension methods for Iterable/List injected as needed, regardless of how the methods started
fixes#142, extension methods and dynamic dispatch
small change that fixes#139, recognize that '.length' doesn't need an extension method
Also restores JSArray, moved the methods out of List, which is back to just being an interface.
NOTE: this removes the capability of types that mix native JS members and some Dart extension members, instead it now *hides* all JS members for these native types. We'll want to bring that feature back to support dart:html, so it's just a simplification for now. Should be easy to add that capability when we pull in dart:html for reals.
R=leafp@google.com, vsm@google.com
Review URL: https://codereview.chromium.org/1153003003