Brian Slesinsky
f0eb582d49
A class that's only used as a field type should be considered used
...
BUG=https://github.com/dart-lang/sdk/issues/25184
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1512833007 .
2015-12-10 13:52:41 -08:00
Konstantin Shcheglov
e94ec76865
Parse HTML files with keeping original attributes case.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1516073002 .
2015-12-10 13:51:48 -08:00
pq
62656833d4
Wraps up the server-side of the 'Allow a user to configure which hints are "fatal"' ask ( #24452 ).
...
* migrates error filtering from a predicate to a process that can customize severities.
* moves filtering/processing from the `dart` task into the `getErrors` request and the errors notification.
See: https://github.com/dart-lang/sdk/issues/24452
(Pending a thumbs-up, support for CLI to follow.)
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1517723002 .
2015-12-10 13:35:11 -08:00
Konstantin Shcheglov
eb6da55838
Paths where '..' is not right between separators are normalized.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1512363002 .
2015-12-10 10:39:53 -08:00
Konstantin Shcheglov
0f95992770
Issue 25218. The reference type of 'A' in 'A..foo' is 'Type'.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25218
Review URL: https://codereview.chromium.org/1519583002 .
2015-12-10 10:20:40 -08:00
Brian Wilkerson
1a5a9a7247
Clean up syntax in generic method comments
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1515533004 .
2015-12-10 10:19:15 -08:00
Brian Wilkerson
f0d249e269
Clean up package imports and library names
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1513643009 .
2015-12-10 08:11:56 -08:00
John Messerly
0e09465f0c
fix #25183 , add support to ErrorVerifier for generic methods
...
R=brianwilkerson@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1514683002 .
2015-12-09 15:16:00 -08:00
Konstantin Shcheglov
e48f962af1
Validate that root paths are absolute and normalized.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25203
Review URL: https://codereview.chromium.org/1511833004 .
2015-12-09 15:05:22 -08:00
John Messerly
7de1d190b9
fix #25182 , downwards inference for calls to fields/getters/vars/params/locals
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1513603002 .
2015-12-08 16:17:06 -08:00
Leaf Petersen
9ea88b3e55
Generic method subtyping.
...
Fixes #25176 .
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1509263002 .
2015-12-08 14:56:47 -08:00
John Messerly
c985c599ed
fixes #25094 , type params in static methods shouldn't always be an error
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1508183002 .
2015-12-08 14:08:24 -08:00
John Messerly
e90e905978
fixes #25174 , downward inference on list and map initializers with explicit type args
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1507883003 .
2015-12-08 14:02:56 -08:00
Brian Wilkerson
9b474c4fde
Remove informational message
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1507353003 .
2015-12-08 11:39:25 -08:00
Konstantin Shcheglov
1b0a5c313f
Issue 24648. Report HintCode.UNNECESSARY_NO_SUCH_METHOD.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24648
Review URL: https://codereview.chromium.org/1506903005 .
2015-12-08 10:28:38 -08:00
Paul Berry
4c28eb6f67
Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27
2015-12-08 10:16:29 -08:00
John Messerly
5e11857451
Refactor strong mode to remove duplicate TypeRules
...
Most of this code is already in StrongTypeSystemImpl. A few helpers move there, with some moving into CodeChecker. This does not rename "rules" parameters/variables yet, but let me know if we should do that.
This just moves code around. One subtle thing: TypeRules.isAssignableTo was only used in one place, in override checking, and that method just forwarded to TypeRules.isSubTypeOf. By contrast, StrongTypeSystemImpl does *not* just forward. So OverrideChecker now uses isSubtypeOf, preserving its old behavior.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1507933002 .
2015-12-07 17:19:13 -08:00
pq
1e4cea355f
Embedded option processing fixes ( #25115 ).
...
* Updates error filter and linter configuration to play nice with embedded options.
* Fixes embedded lint config (#25115 ).
* Improves support for (and tests of) options file deletions.
* Pulls in linter with untyped options support (needed for processing merged options).
Unblocks: https://github.com/flutter/flutter/issues/624 .
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1503353002 .
2015-12-07 16:18:47 -08:00
Leaf Petersen
67306ae655
Handle property accesses in generic method invocation
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1506003002 .
2015-12-07 16:01:02 -08:00
Konstantin Shcheglov
dad4baa782
Issue 25108. Add ExecutableElement(s) into the 'invalid override' messages.
...
It uses the fact that ExecutableElement.toString() produces the full signature, with types and parameter names.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25108
Review URL: https://codereview.chromium.org/1509693002 .
2015-12-07 13:58:55 -08:00
Brian Wilkerson
c5f82b8376
Additional clean-up after moving to the new task model; a breaking change needed to allow a bug to be fixed
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1503203002 .
2015-12-07 12:02:42 -08:00
pq
032c829246
ErrorCode hashing for faster lookup in validation.
...
* Stores error codes in a laziliy initialized `HashSet` for speedy lookup.
(Follow-up to John's comment here: https://codereview.chromium.org/1501633003/ )
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1505623002 .
2015-12-07 11:30:30 -08:00
pq
ee310b6aff
Options processing API update ( #25126 ).
...
Updates processing API to accept untyped options maps.
Required to support processing options merged from embedders and local analysis options.
See: https://github.com/dart-lang/sdk/issues/25126
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1506963002 .
2015-12-07 11:27:17 -08:00
Brian Wilkerson
ea3ba0e31f
Remove deprecated code
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1502213002 .
2015-12-07 10:24:36 -08:00
Brian Wilkerson
1101a1e0e7
Add more (incomplete) diagnostic support to the status pages
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1503893002 .
2015-12-07 09:50:37 -08:00
John Messerly
095310bb36
Allow explicitly passing generic function type args
...
Also supports implicit dynamic correctly and ensures we have a sensible element, which fixes #25100
R=leafp@google.com
Review URL: https://codereview.chromium.org/1504483002 .
2015-12-07 09:46:38 -08:00
Paul Berry
de3a1b22c8
Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27
2015-12-07 07:04:07 -08:00
pq
109ccdaf97
Strong-mode error code validation "enum" ( #25117 ).
...
Adds an enum of valid strong-mode error code names a la `ErrorCode.values`.
This gets used in error code validation when processing `.analysis_options`.
See: https://github.com/dart-lang/sdk/issues/25117
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1501633003 .
2015-12-06 09:10:12 -08:00
Paul Berry
4f654473ff
Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27
2015-12-06 08:41:24 -08:00
pq
b4fd7532ff
Comment cleanup.
...
Follow-up from: https://codereview.chromium.org/1497253002/
BUG=
R=leafp@google.com
Review URL: https://codereview.chromium.org/1501573004 .
2015-12-04 16:34:49 -08:00
Bob Nystrom
af4d7319fe
Remove show clauses for types that moved to other libraries.
...
ConstantEvaluationTarget is now imported from dart.dart and
AnalysisException is in java_engine.dart.
Review URL: https://codereview.chromium.org/1501803002 .
2015-12-04 15:50:30 -08:00
pq
eacbee4616
Align strong-mode error codes with analyzer conv.
...
This canonicalization will allow suppression by code name to "just work" unblocking https://github.com/flutter/flutter/issues/624 .
R=jmesserly@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1497253002 .
2015-12-04 15:49:22 -08:00
Leaf Petersen
7f43d10eeb
Allow return of Future in async function.
...
Fixes dart-lang/dev_compiler#316
Fixes #24540
Fixes flutter/flutter#607
Fixes #25042
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1495263003 .
2015-12-04 15:33:28 -08:00
Leaf Petersen
26bc5d6b2d
Downwards inference on non-generic constructor parameters ( fixes #25106 )
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1499813002 .
2015-12-04 10:26:26 -08:00
Paul Berry
cd03a05caf
Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27
2015-12-04 09:06:41 -08:00
John Messerly
6cababc94c
Fixes incorrect generic function type capture
...
This improves how generic function types are modeled. In particular, we can now handle types like <T>T -> T, in printing, equality, and the type parameter is correctly removed when it is instantiated.
This preserves the existing lazy "substitute" operation, and makes the "instantiate" operation interact with it correctly. Given a type like:
{T/T}<S>T -> S
we can substitute S/T to get:
{S/T}<S>T -> S
then if we instantiate as <int> we'll get the correct:
{S/T, int/S}T -> S, which == S -> int
This also converts typedefs over to the new system, as this seemed like the most natural thing. (However this does *not* change how the type name is evaluated, in particular given the type name "F", where "F" is a typedef `<T>T -> T`, will result in the function type `{dynamic/T}T->T` exactly as it did before. If we want to write the type `<T>T->T` we will need a different mechanism.)
R=brianwilkerson@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1488383004 .
2015-12-03 15:03:03 -08:00
Paul Berry
7d3c4743db
Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27
2015-12-03 14:22:24 -08:00
Brian Wilkerson
18f5782620
Fix warnings
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1496873004 .
2015-12-03 14:07:09 -08:00
Leaf Petersen
f5b28b7cf3
Checker is defensive against unresolved redirecting constructor
...
Fixes #25071
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1500793002 .
2015-12-03 13:42:52 -08:00
Leaf Petersen
2d61ed26b7
Check for void in rules subtyping ( fixes #25069 )
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1497803003 .
2015-12-03 13:41:28 -08:00
Konstantin Shcheglov
072aaaefb6
Issue 25101. Flush TOKEN_STREAM after computing PARSED_UNIT.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25101
Review URL: https://codereview.chromium.org/1495783005 .
2015-12-03 12:52:58 -08:00
Brian Wilkerson
b9644af695
Remove the old task model
...
Review URL: https://codereview.chromium.org/1490233007 .
2015-12-03 10:14:06 -08:00
Konstantin Shcheglov
dc13ac659f
Fix for DeclarationResolver and invalid getters/setters.
...
This fixes the following exception:
Caused by The null object does not have a getter 'variable'.
NoSuchMethodError: method not found: 'variable'
Receiver: null
Arguments: []
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1492373002 .
2015-12-03 09:59:00 -08:00
Leaf Petersen
e155b03b26
Fix JS inline regression. We were exiting early instead of moving on to look for JS calls.
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1497673002 .
2015-12-03 09:57:57 -08:00
Leaf Petersen
500efa1e7d
Fix some inference corner case crashes. Running the DDC language tests against the bleeding edge analyzer exposed a few small issues, this fixes the crashers.
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1499533002 .
2015-12-02 21:43:06 -08:00
Brian Wilkerson
600fc17de1
Clean-up the registration of plugins
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1487953002 .
2015-12-02 13:25:28 -08:00
Leaf Petersen
daf5f6d258
Hide inference hints. Fixes #24563 .
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1498573002 .
2015-12-02 13:07:46 -08:00
Paul Berry
5528327504
Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27
2015-12-02 11:45:10 -08:00
Konstantin Shcheglov
f12da4d00c
Issue 25050. Fix for NPE in ConstantEvaluationEngine when duplicate fields.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25050
Review URL: https://codereview.chromium.org/1493833003 .
2015-12-02 11:29:36 -08:00
Brian Wilkerson
4e3a1a468a
Lexical support for configurable imports (DEP 40)
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1406253004 .
2015-12-02 11:20:07 -08:00