Commit Graph

3034 Commits

Author SHA1 Message Date
Konstantin Shcheglov 77ba5fd087 Issue 27300. Report HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE.
There are no positives in analyzer/server, dev_compiler or dart2js.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27300

Review URL: https://codereview.chromium.org/2364733002 .
2016-09-22 14:27:47 -07:00
Brian Wilkerson fd7bb76a4b Add some errors related to nnbd
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2362873002 .
2016-09-22 13:43:37 -07:00
Konstantin Shcheglov 65d2a2ce82 Issue 27392. Fix for invoking objects with function-bounds type parameter types.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27392

Review URL: https://codereview.chromium.org/2360303003 .
2016-09-22 11:50:24 -07:00
Brian Wilkerson 454289dbe3 (TBR) Fix test failure
Review URL: https://codereview.chromium.org/2357303002 .
2016-09-21 09:10:40 -07:00
Brian Wilkerson d947a7ba89 Async is no longer optional
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2361433002 .
2016-09-21 08:29:34 -07:00
Brian Wilkerson 6062d5d6bd Fix mustCallSuper to ignore methods from interfaces
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2348383006 .
2016-09-21 08:03:09 -07:00
Brian Wilkerson d0245ea2b9 Finish removing MethodTrampoline
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2356653003 .
2016-09-20 08:20:56 -07:00
Brian Wilkerson 57f1193c01 First steps toward removing MethodTrampoline
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2348353002 .
2016-09-19 08:24:29 -07:00
Brian Wilkerson 772c93ccf2 Rename libraryUri
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2347213002 .
2016-09-16 10:54:25 -07:00
Brian Wilkerson 7eb7573dc4 Initial support for the NNBD proposal
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342383002 .
2016-09-16 10:51:19 -07:00
Brian Wilkerson ab9ba20c04 Fix recently introduced strong-mode errors
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2344933002 .
2016-09-15 14:37:37 -07:00
Brian Wilkerson ecc84b26a4 Break up another large file
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
John Messerly 79a9409f75 fix #27151, list and map literals infer using up and down info
R=leafp@google.com

Review URL: https://codereview.chromium.org/2343713002 .
2016-09-14 16:35:26 -07:00
Brian Wilkerson a5ee525e14 Add support for accessing field formal parameters in the initializer list of constructors
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2335693002 .
2016-09-12 09:48:34 -07:00
Konstantin Shcheglov 9494b2e394 Remove Scope.errorListener.
There are no references to ".errorListener" internally.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2329313002 .
2016-09-11 20:18:39 -07:00
Konstantin Shcheglov 663a3e810c Reapply abc5051854: Remove 'Element.docRange'.
I also marked the corresponding information in summaries as @deprecated
and made a small tweak to the generator so that it knows that the ids
of deprecated fields are still used.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2330813002 .
2016-09-11 09:41:53 -07:00
Konstantin Shcheglov e832ab5248 Remove deprecated ChangeSet.deletedSources.
It is not used internally.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2331753002 .
2016-09-11 09:37:07 -07:00
Konstantin Shcheglov f658a7de42 Remove IncrementalScanner and IncrementalParser.
This code has never been used AFAIK.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2330803002 .
2016-09-11 09:32:13 -07:00
Brian Wilkerson 6c448b6938 Move exception support to its own library
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2328043002 .
2016-09-10 11:04:19 -07:00
Brian Wilkerson 6abd185f93 Remove unused instance field
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2329463003 .
2016-09-09 09:17:19 -07:00
Konstantin Shcheglov 8c11f5ec0b Remove JavaPatternMatcher from java_core.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2329463002 .
2016-09-09 08:59:48 -07:00
Konstantin Shcheglov 9cf47ce04c Remove parseUriWithException() and URISyntaxException.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2321263003 .
2016-09-09 08:30:01 -07:00
Brian Wilkerson fe02411930 Remove several references to JavaFile
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2323173002 .
2016-09-09 07:45:40 -07:00
Konstantin Shcheglov e976e692be Replace and remove JavaException(s).
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2326813002 .
2016-09-08 15:56:33 -07:00
Konstantin Shcheglov e187e33923 Remove StringUtils from java_core.
It is used almost only in analyzer and analysis_server.
There are two places where it is used internally - I'm fixing them.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2317113005 .
2016-09-08 13:26:56 -07:00
Brian Wilkerson 771d296a6c Remove final references to PackageUriResolver
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2320733003 .
2016-09-07 13:03:19 -07:00
Konstantin Shcheglov 114fcdb839 Issue 26874. Don't report CAN_BE_NULL_AFTER_NULL_AWARE for members of the Null class.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26874

Review URL: https://codereview.chromium.org/2320573003 .
2016-09-07 09:01:44 -07:00
Konstantin Shcheglov 7442a85cbb Issue 27130. Fix applying changes to .analysis_options on save.
This fix partially reverts changes made in https://github.com/dart-lang/sdk/commit/de6925a23ebf29cd587dd5f4e214cb277a7397e4
It is correct that we should ignore applyChanges() for sources with
content overridden in the content cache. But we cannot know what else
happened with results in the analysis cache at this point. So, we
should just let Analysis Server to always run analysis, so that
Driver and WorkManager(s) will decide if there is anything to do.

I believe that the original motivation for the change was to avoid
sending extr 'analysis.implemented' notifications. It does not happen
anymore, probably because we set other shortcuts using source content.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27130

Review URL: https://codereview.chromium.org/2314933003 .
2016-09-06 13:41:48 -07:00
Brian Wilkerson ef42c94e2b Remove the final error being generated in a scope
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2314963002 .
2016-09-06 13:10:18 -07:00
Brian Wilkerson 04d3701fbe Move more error detection out of Scope
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2306223002 .
2016-09-03 10:13:04 -07:00
Konstantin Shcheglov 2e1c75d809 Issue 27221. Report UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER for staticField.method() in subclasses.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27221

Review URL: https://codereview.chromium.org/2304293002 .
2016-09-02 12:48:32 -07:00
Konstantin Shcheglov 75d1ff092e [linter] Issue 295. Skip comment tokens with GitHub code blocks (in ```).
R=brianwilkerson@google.com, pquitslund@google.com
BUG= https://github.com/dart-lang/linter/issues/295

Review URL: https://codereview.chromium.org/2302003003 .
2016-09-01 14:22:25 -07:00
Konstantin Shcheglov f096f7b985 Flush results when contexts are made idle.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2297343002 .
2016-08-31 14:03:25 -07:00
Konstantin Shcheglov cc6beaf56d Pull in test_reflective_loader 0.0.4 and switch analyzer to it.
There are following changes:

1. DEPS to pull in test_reflective_loader 0.0.4
2. Rename runReflectiveTests() to defineReflectiveTests().
3. Remove analyzer's pkg/analyzer/test/reflective_tests.dart
4. Replace reflective_tests.dart imports with package:test_reflective_loader/test_reflective_loader.dart imports.
5. Sort/format and organize imports in the files with imports changes.
6. Fix for a couple of bugs in analysis_server exposed by the new loader.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2298913003 .
2016-08-31 13:46:39 -07:00
John Messerly 63046da4be fix #25740 again, making sure we have the substituted bound in inference
The first fix only addressed part of the problem. Unfortunately we go back and forth between .element and .type, assuming they always return the other one, which was not the case for TypeParameterMember.

R=leafp@google.com

Review URL: https://codereview.chromium.org/2291103004 .
2016-08-31 11:10:33 -07:00
pq b7f0ce083b Revert "Remove 'Element.docRange'."
This reverts commit abc5051854.

Background: required to keep `analyzer` version-compatible with `test`.

BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2293143003 .
2016-08-30 13:10:15 -07:00
Brian Wilkerson 3e58ee5799 Move error checking from scope creation to error reporter (take 2)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2290373003 .
2016-08-30 11:22:38 -07:00
Brian Wilkerson f7f1f40a94 Revert "Move error checking from scope creation to error reporter" (TBD)
Review URL: https://codereview.chromium.org/2296773002 .
2016-08-30 08:00:55 -07:00
Brian Wilkerson ca206a29e7 Move error checking from scope creation to error reporter
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2288983002 .
2016-08-30 06:13:47 -07:00
Konstantin Shcheglov 09b851c97f Don't perform final fields and top-level variables type propagation.
A similar feature is now implemented in strong mode, and users who
need it, should switch to strong mode.

When we are ready to drop propagated types altogethoer, we could
deprecate or remove UnlinkedVariable.propagatedTypeSlot in IDL.

R=brianwilkerson@google.com, paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/26794

Review URL: https://codereview.chromium.org/2288223003 .
2016-08-29 15:18:12 -07:00
Brian Wilkerson 6ccbef94fc Convert analysis server over to use ContextBuilder
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2286923002 .
2016-08-29 08:11:53 -07:00
Brian Wilkerson 4a75d78325 Add support for parsing, but not capturing, assers in constructor initializer lists
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2282233002 .
2016-08-29 07:58:57 -07:00
Paul Berry 30223ae807 In URI resolution tests, don't access the local filesystem.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2273423002 .
2016-08-25 14:08:35 -07:00
Konstantin Shcheglov abc5051854 Remove 'Element.docRange'.
I also marked the corresponding information in summaries as @deprecated
and made a small tweak to the generator so that it knows that the ids
of deprecated fields are still used.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2270903002 .
2016-08-24 09:40:23 -07:00
Brian Wilkerson d7d2460130 Remove more references to FileBasedSource
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2269683002 .
2016-08-22 13:33:00 -07:00
Brian Wilkerson 2797cf5367 Code clean-up
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2265793002 .
2016-08-21 15:48:44 -07:00
Brian Wilkerson 79f190cf69 Supress deprecation warnings in a deprecated library
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2261053002 .
2016-08-21 15:47:38 -07:00
John Messerly a7a9fc1b37 remove duplicate checking for overrides
We were checking for override errors in two places: strong/checker.dart and error_verifier.dart, so this removes one of them.

I went for skipping the ErrorVerifier errors in strong mode. That path produces better error messages, but it's not expressed in terms of the subtype relation directly, but rather encodes information about how function subtyping works. This makes it difficult to keep in sync with our typing logic. So for now it seems pragmatic to prefer the checker implementation.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2246293002 .
2016-08-19 12:27:21 -07:00
Leaf Petersen 1c81fe7126 Fix calling object methods and properties on function types
Fixes https://github.com/dart-lang/sdk/issues/27097 .
BUG=
R=brianwilkerson@google.com, jmesserly@google.com

Review URL: https://codereview.chromium.org/2252183002 .
2016-08-17 15:24:05 -07:00
John Messerly b3a38bd245 fix #27088, future then upwards inference
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2253923002 .
2016-08-17 09:29:13 -07:00