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
John Messerly
99b359837d
add tests to demonstrate missing generic function subtype logic
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1510653002 .
2015-12-07 14:55:30 -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
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
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
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
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
Paul Berry
c030056158
Fix erroneous restoration of task model state.
...
The test suite PoorMansIncrementalResolutionTest was turning on the
new task model during setup and turning it off during teardown; as a
result, any tests run after it were using the old task model.
The easy fix is to just stop trying to adjust the task model state in
this test suite, since the new task model is on by default now.
This should fix test breakages when run via pkg/analyzer/test_all.dart.
TBR=scheglov@google.com
Review URL: https://codereview.chromium.org/1497573002 .
2015-12-02 11:41:14 -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
Paul Berry
a8acaa48db
Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27
2015-12-02 08:15:45 -08:00
Leaf Petersen
64ab186b16
Downwards inference. This adds support to the resolver for downwards
...
type inference in strong mode. Downwards inference is removed from
the DDC checker in favor of the strong mode analyzer version.
BUG=
R=brianwilkerson@google.com , jmesserly@google.com
Review URL: https://codereview.chromium.org/1462133005 .
2015-12-01 15:40:27 -08:00
Konstantin Shcheglov
1b9c263b56
New NodeLocator which uses positions of characters, not between them.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1490933002 .
2015-12-01 13:59:11 -08:00
Konstantin Shcheglov
6f67abeaaa
Clean source maps during partition dispose.
...
This might fix the following exception:
Dart analysis server, SDK version 1.14.0-edge.e3457758ed7e2b24263bcbd9831cd764ce9fd110, server version 1.12.0, FATAL error: Failed to perform operation: Instance of 'PerformAnalysisOperation'
The null object does not have a getter 'modificationTime'.
NoSuchMethodError: method not found: 'modificationTime'
Receiver: null
Arguments: []
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1480393004 .
2015-12-01 07:55:27 -08:00
Konstantin Shcheglov
0067df716f
Issue 25030. Fix for searching variable declaration when there is no whitespace after the type.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25030
Review URL: https://codereview.chromium.org/1484713002 .
2015-11-30 08:17:39 -08:00
Paul Berry
617f9eea85
Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27
2015-11-27 08:07:24 -08:00
Leaf Petersen
77bd51c2dc
Fix propagated argument element bug. This fixes #25040 .
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1477953002 .
2015-11-25 15:50:20 -08:00
Brian Wilkerson
e94c820411
Revert "Ensure that a complete library element has constants evaluated (issue 24890)"
...
Review URL: https://codereview.chromium.org/1480603002 .
2015-11-25 07:13:08 -08:00
Brian Wilkerson
c8cec941ef
Ensure that a complete library element has constants evaluated (issue 24890)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1468293003 .
2015-11-25 06:37:45 -08:00
Paul Berry
9a08061581
Add support for assert statements with messages to the analyzer.
...
Support is disabled by default.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1480433002 .
2015-11-24 15:50:45 -08:00
Konstantin Shcheglov
cfb7d61a9c
Issue 25034. Record only the target source's errors.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25034
Review URL: https://codereview.chromium.org/1477553002 .
2015-11-24 14:00:00 -08:00
John Messerly
12c8e49364
add a failing test case to demonstrate a substitution issue
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1472183002 .
2015-11-24 13:43:57 -08:00
John Messerly
7feb6b7cb7
fix return type comment parsing for top-level generic function
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1465153005 .
2015-11-24 11:21:30 -08:00
Paul Berry
b8bbdeb745
No functional change. Sort some files in pkg/analyzer.
...
TBR=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1468973004 .
2015-11-24 11:10:28 -08:00
John Messerly
0e6f692c80
generic method type parameter inference
...
This replaces the existing hard-coded "pseudo generic" methods with actually generic ones.
This updates the mock SDK's as well. It does not update the real SDK, that will be in another change that should be landed before this one.
R=brianwilkerson@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1442883003 .
2015-11-24 09:34:47 -08:00
Konstantin Shcheglov
aa9668b264
Propagate types for import/export closure before resolving.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1465303002 .
2015-11-23 12:52:03 -08:00
Konstantin Shcheglov
1fab9b0ecc
Skip local variable dependepcies.
...
This should help with exceptions on bots.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1467363002 .
2015-11-23 10:10:16 -08:00
Konstantin Shcheglov
ac24bd115c
Don't run 'pub list-package-dirs' if there is no pubpsec.lock file.
...
This should help on DAS startup - if we don't have to run Pub, this saves as much as 400ms for each pubspec.yaml file.
Without pubspec.yaml we won't get any results anyway.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1470793002 .
2015-11-23 09:19:10 -08:00
Paul Berry
ce7625a22c
Buildbot fixes after 8c324a5b8d
...
- Regenerate tasks.dot
- Mark a test as passing that previously failed
(fail_finalPropertyInducingVariable_classMember_instance_unprefixed)
Note that there are three other tests that I would have expected to
start passing as well (see
fail_finalPropertyInducingVariable_classMember_instance_*), but they
still fail.
TBR=scheglov@google.com
Review URL: https://codereview.chromium.org/1469093002 .
2015-11-23 09:04:43 -08:00
Konstantin Shcheglov
8c324a5b8d
Propagate types of final/const top-level variables and fields.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23001
Review URL: https://codereview.chromium.org/1460213005 .
2015-11-21 09:40:37 -08:00
Paul Berry
84c3cdb048
Add a unit index to prelinked type references in summaries.
...
In order to avoid having to reconstitute the entire element model when
deserializing a library summary, we'll need to be able to create element
handles for any elements referenced by the library. Since element
handles operate using a "location", and the "location" records
information about the compilation unit containing the element, this
means that the library summary needs to track which unit each referenced
element lives in (even though this information would otherwise not be
semantically relevant).
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1468583002 .
2015-11-20 14:10:42 -08:00
Brian Wilkerson
4ae8540383
Revert "Clean-up the registration of plugins"
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1465983004 .
2015-11-20 14:04:53 -08:00
Brian Wilkerson
b2728c15a6
Revert "Fix test failures on the bots"
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1468623002 .
2015-11-20 14:04:11 -08:00
Konstantin Shcheglov
0f477023a4
Don't update incrementally invalid results.
...
Invalid results don't have correct dependencies, so if we make them valid,
they will never get invalidated later.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1463833003 .
2015-11-20 12:29:20 -08:00
Brian Wilkerson
6b45d6544c
Fix test failures on the bots
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1467623002 .
2015-11-20 11:48:35 -08:00
Brian Wilkerson
1367d2d47d
Clean-up the registration of plugins
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1460123002 .
2015-11-20 08:14:14 -08:00