Commit Graph

472 Commits

Author SHA1 Message Date
danrubel 4734c55882 Report error on unsupported operators
Change-Id: Iea1469e1252c89c630e8bf646caf37051d78c84c
Reviewed-on: https://dart-review.googlesource.com/67401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-07-31 18:23:10 +00:00
Konstantin Shcheglov 9fb6c09015 Store reference/type for invalid types.
This fixes 18 language_2 tests.

Small degradation in Analyzer unit tests is cause by the way we apply
Kernel type to Analyzer type annotations in DeclarationResolver. We
should shift this logic to using store type resolution instead.

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

Change-Id: I2d60201ec4f4a741bba3f86f65d8dc3b6547514c
Reviewed-on: https://dart-review.googlesource.com/67260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-30 17:49:55 +00:00
Konstantin Shcheglov 372a24cb7c Store resolution for catch with invalid parameters.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I7137eca832b83a352e130d6f3041679611c7c117
Reviewed-on: https://dart-review.googlesource.com/66721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-25 21:25:55 +00:00
Konstantin Shcheglov 54d46b801a Fix for unresolved redirecting constructor.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: If1f37ccad174c44b6b23d1dccdeefec88f888abc
Reviewed-on: https://dart-review.googlesource.com/66802
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-25 21:20:35 +00:00
Paul Berry cdeda8ecb1 Map NotAnLvalue to an analyzer error code.
Change-Id: Id10ad0a7281dfe6a02e0e2393a5c1f36ab1fd998
Reviewed-on: https://dart-review.googlesource.com/66226
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-07-23 20:25:39 +00:00
Brian Wilkerson 75deedf3f4 Fix more error code mappings
Change-Id: I01a340d9a6abac7c10c0a6431251694b04658e9d
Reviewed-on: https://dart-review.googlesource.com/65785
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-19 20:45:48 +00:00
Brian Wilkerson b04ab993d0 Map ExtendingEnum, InvalidVoid and MetadataTypeArguments to analyzer codes
Change-Id: I9fb622c74e06cbad22158b823292b08632699dfe
Reviewed-on: https://dart-review.googlesource.com/65741
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-07-19 18:39:13 +00:00
Brian Wilkerson d6726cae36 Map AbstractRedirectedClassInstantiation and ConflictsWithMemberWarning to analyzer codes
Change-Id: I052dcb9154f29e1ce7e472c6104464fbd8e5cb3d
Reviewed-on: https://dart-review.googlesource.com/65742
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-07-19 18:26:27 +00:00
Brian Wilkerson 5a1d4c95eb Replace more uses of Unspecified
Change-Id: I78aadfa055e2be90805e193abc1e3a23b5955caf
Reviewed-on: https://dart-review.googlesource.com/65574
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-18 19:59:03 +00:00
Konstantin Shcheglov 23c81964d9 Store resolution for invalid assignment to a parenthesized expression.
Change-Id: Ife2d750b91ed29bfbeedfc445c99fbf1d63a2c5c
Reviewed-on: https://dart-review.googlesource.com/65566
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-07-18 19:18:20 +00:00
Brian Wilkerson b9a73c1fc6 Use ExternalConstructorWithFieldInitializers instead of Unspecified
Change-Id: Icb38e610c6bb88d307975dca59c3ec40befef4a6
Reviewed-on: https://dart-review.googlesource.com/65567
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-18 18:25:02 +00:00
Brian Wilkerson 3657ee33eb Use ForInLoopWithConstVariable instead of Unspecified
Change-Id: I721f70fc4bfd4a723ac64917f39771b6e815702b
Reviewed-on: https://dart-review.googlesource.com/65564
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-18 17:23:20 +00:00
Brian Wilkerson df8e525655 Use InvalidUseOfNullAwareAccess and ThisOrSuperAccessInFieldInitializer rather than Unspecified
Change-Id: Ib6bb02873129740217fcf589648f12d3f0ceccc5
Reviewed-on: https://dart-review.googlesource.com/65420
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-07-18 01:00:51 +00:00
Brian Wilkerson 62ce40f287 Map AmbiguousSupertypes to an analyzer error
Change-Id: I3c9044eded49398895dac0fc973e574884fb3cc1
Reviewed-on: https://dart-review.googlesource.com/65400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-17 18:43:19 +00:00
Brian Wilkerson 9ebab91896 Use ConstConstructorInSubclassOfMixinApplication in place of Unspecified
Change-Id: I8a183ee4473249209587dd24c64cd40f5ccd7cf1
Reviewed-on: https://dart-review.googlesource.com/65384
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-17 18:19:50 +00:00
Brian Wilkerson 3dba24bda2 Use TypeVariableInConstExpression in place of Unspecified
Change-Id: Ib0f902979c33e97fa46660f0c0a4e98b092c274c
Reviewed-on: https://dart-review.googlesource.com/65240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-17 13:23:18 +00:00
Brian Wilkerson dfc2adf547 Map the error code for InheritedMembersConflict
Change-Id: I89394fcf6fe47261f196a4c7c265a172f4302060
Reviewed-on: https://dart-review.googlesource.com/64940
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-07-16 21:28:03 +00:00
Konstantin Shcheglov a473a0da2f Store resolution for invalid member references.
Change-Id: I7ce556bc4819a77e082d81bb96e54b9cedc68d78
Reviewed-on: https://dart-review.googlesource.com/65021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-16 19:15:01 +00:00
Brian Wilkerson 69a15d2006 Convert Unspecified to ConstructorNotSync
Change-Id: Iabfad9797912fdb13dc86c22de6593d2c51b6716
Reviewed-on: https://dart-review.googlesource.com/64923
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-07-16 17:29:49 +00:00
Konstantin Shcheglov ed8824f686 Resolve loadLibrary() arguments (which should not exist).
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/33689
Change-Id: I0c35aafd4a1112190c6ecbd1af6f34190a7f1081
Reviewed-on: https://dart-review.googlesource.com/64827
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-07-13 23:15:09 +00:00
Konstantin Shcheglov b3c27213eb Translate errors for conflicting members.
This fixed language_2/bad_override_test/05

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

Change-Id: I6f6b860bba40f2f6a4ce8804635d95a3828cf64f
Reviewed-on: https://dart-review.googlesource.com/64646
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-07-12 18:16:11 +00:00
Konstantin Shcheglov 6ec5801c4f Store resolution for 'throw' in constant.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iebd1122ff887b75e94daa2153c43d59e77c3359d
Reviewed-on: https://dart-review.googlesource.com/64762
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-07-12 18:11:24 +00:00
Brian Wilkerson cf30a28ca1 Map UnexpectedDollarInString to an analyzer error code
Change-Id: Iee398e4a9490be83e352c6610bfadc90ae03936e
Reviewed-on: https://dart-review.googlesource.com/64242
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-09 22:55:57 +00:00
Brian Wilkerson ed0ccc7ac9 Add more error message mappings
Change-Id: I5511ba2404ca3a430c6fda35b5e79a14eceb1188
Reviewed-on: https://dart-review.googlesource.com/63961
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-09 16:38:08 +00:00
Devon Carew 10c13e0e9e - deprecate strong-mode: options
- move those settings to the language: options settings
- ignore strong-mode: false in the analysis options file

Change-Id: I2e03002d0721e9e88c80b67b312c734da93d1a0d
Reviewed-on: https://dart-review.googlesource.com/63361
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-02 22:36:39 +00:00
Brian Wilkerson 3be6fdb219 Convert more error codes
Change-Id: I7ee8040d99f8047a1ccdd2bdf217b32f36409ba9
Reviewed-on: https://dart-review.googlesource.com/63363
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-07-02 17:43:13 +00:00
Brian Wilkerson 62ecfb03f4 Translate ImplicitCallOfNonMethod to an analyzer message
Change-Id: Iddbdc07748999feb64b5f7462ff60d1768740937
Reviewed-on: https://dart-review.googlesource.com/63269
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-06-29 22:29:59 +00:00
Konstantin Shcheglov 46167dfd88 It is OK to declare a const constructor in a class with a mixin, if it has no fields.
R=brianwilkerson@google.com

Change-Id: I76c427fe24b8f06711c3adcac8bacd45900240b1
Reviewed-on: https://dart-review.googlesource.com/62482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-27 14:23:59 +00:00
Mike Fairhurst 3640037164 Fix second half on #33343: disallow generic functions as type arguments.
There is a seeming parse error in typedefs, and an open question on the
issue (33343) about what to do when a generic function type is inferred.

Otherwise this seems ready to go.

Bug: 33343
Change-Id: I10d2ea9b6ca26ed2c6ff6b24ffe5008fc4797ef2
Reviewed-on: https://dart-review.googlesource.com/61109
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-06-25 18:02:04 +00:00
Mike Fairhurst 284b5cce55 Partial fix of #33343. Reject generic function types as bounds.
Does not handle the other half of #33343, rejecting generic function
types as type arguments.

This revealed a secondary minor issue which was easy enough to fix. Type
arguments were not resolved within bounds:

class C<T extends S Function<S>(S)> {}

this would report 'undefined class S' for the return and parameter types
`S`. I almost split this into a separate CL, but, these two CLs are tied
together inherently by the tests case. Easy to solve at once.

Bug: 33343
Change-Id: Ib34a04d90be08d8d6c6f21a9d485a452017585ba
Reviewed-on: https://dart-review.googlesource.com/61103
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-06-25 15:56:06 +00:00
Sam Rawlins cc9c8f93f5 Add HintCode for duplicate shown/hidden names
Bug: https://github.com/dart-lang/sdk/issues/33182
Change-Id: Ibb82c44357bc59044340c6d8b1904c7815d19215
Reviewed-on: https://dart-review.googlesource.com/57161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-05-30 17:22:40 +00:00
Brian Wilkerson 74db253d34 Allow metadata on enum constants
Change-Id: I2aed6df1fd5f20da865339fdc86cad3bc66f0770
Reviewed-on: https://dart-review.googlesource.com/54621
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-14 13:20:10 +00:00
Brian Wilkerson 9e9b50d19d Improve error messages for annotations involving undefined names (issue 27788)
Change-Id: Iccfcb73b7671f50353b57a81817dec013b997a53
Reviewed-on: https://dart-review.googlesource.com/52640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-25 17:48:49 +00:00
Brian Wilkerson bf1d0efde2 Revert "Improve error messages for annotations involving undefined names (issue 27788)"
Change-Id: I017592bf8982ff51bb73eb5fe892f8d9cffb9c9d
Reviewed-on: https://dart-review.googlesource.com/52400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-23 21:05:53 +00:00
Brian Wilkerson 1ffd7e529a Improve error messages for annotations involving undefined names (issue 27788)
Change-Id: Ib7af4bdd97e9f775646c90e8f49f021836125b78
Reviewed-on: https://dart-review.googlesource.com/52240
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-22 20:11:11 +00:00
Leaf Petersen c2b338f1b7 Remove fuzzy arrow support from analyzer
Fixes #31637

Change-Id: I87767b92814455187ea71cc4caca786043dbbe3d
Reviewed-on: https://dart-review.googlesource.com/51100
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-04-13 16:47:16 +00:00
Dan Rubel 374058aa79 Improve fasta parser try/catch error messages and recovery
Change-Id: I6e591fa5d03c73aa6f3e8060f2ca310f68be9a78
Reviewed-on: https://dart-review.googlesource.com/48709
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-01 02:14:52 +00:00
Konstantin Shcheglov f201ace7f3 Check for missing required libraries dart:core and dart:async.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32686
Change-Id: I337cb61911061f25b501a5615fe40c02b9749b19
Reviewed-on: https://dart-review.googlesource.com/48703
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-29 22:09:50 +00:00
Paul Berry 2993476129 Report an error if a class inconsistently implements a generic interface.
This is not allowed in Dart 2.0.

Change-Id: I6861ce298e5d5a5cf3f26a010990868b5ba9bda2
Reviewed-on: https://dart-review.googlesource.com/39601
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-05 12:13:12 +00:00
Paul Berry 593273cf51 Finish implementing mixin type inference in the analyzer.
Fixes #32146.

Change-Id: Ia46b6a54757901681858e682bdd6f809c194999c
Reviewed-on: https://dart-review.googlesource.com/43944
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-27 17:49:59 +00:00
Dan Rubel a8be36f42a Report error on dynamic with type arguments
Change-Id: Ie95e1c1b0b23cb3a3b6d4b7b7561edc2765fdebb
Reviewed-on: https://dart-review.googlesource.com/43560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-02-23 21:49:07 +00:00
Alexandre Ardhuin 3caa0f9fee more null-aware hints
This adds 2 new hints `NULL_AWARE_BEFORE_OPERATOR` and `NULL_AWARE_IN_LOGICAL_OPERATOR`.

The previous `NULL_AWARE_IN_CONDITION` hint didn't catch null-aware issues in assigments or expression statements with logical operators. `NULL_AWARE_IN_LOGICAL_OPERATOR` handles those cases.

`NULL_AWARE_BEFORE_OPERATOR` handle issue like `a?.b + c`.

Closes #32239
https://github.com/dart-lang/sdk/pull/32239

GitOrigin-RevId: 8b20ec5f7ea7901b1d0889eaf54ad0660c6e3f76
Change-Id: I36ada68c13dd0e1dd2bfd829ae25ce3ba9c8f402
Reviewed-on: https://dart-review.googlesource.com/42360
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-20 21:48:35 +00:00
Mike Fairhurst 56d59dd967 Reland https://dart-review.googlesource.com/c/sdk/+/37441 with fixes
Change-Id: If8e2ec2ca1ac4f533dcb56b0c95d55e4a13e0598
Reviewed-on: https://dart-review.googlesource.com/39881
Reviewed-by: Paul Berry <paulberry@google.com>
2018-02-08 20:46:19 +00:00
Mike Fairhurst ec58f5646a Revert "Make void a static warning to use almost everywhere."
This reverts commit 09eed74a8a.

Reason for revert: Too much SDK code is not yet compliant.

Original change's description:
> Make `void` a static warning to use almost everywhere.
> 
> Changed the hint to a StaticWarningCode, since that's the new spec'd
> error type and the hint is no longer needed.
> 
> Added a new set of methods to test the cases.
> 
> Didn't try to solve the problem generally ("all usages except ... are
> errors" means it easier, in theory, to make a ReportVoidExpressions
> style visitor that catches absolutely all types) because most of the
> work is actually about suppressing errors that are no longer needed.
> Ie, from NO_SUCH_METHOD to USAGE_OF_VOID_RESULT which means we have to
> put the void handling logic into each AST method specially anyway.
> 
> Some redundant tests removed.
> 
> Don't flag: ternaries, void -> void assignments, void returns in
> dynamic.
> 
> Change-Id: Ief8035dcfe582b36b6372180ddcf4e453d320d9c
> Reviewed-on: https://dart-review.googlesource.com/37441
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=leafp@google.com,scheglov@google.com,mfairhurst@google.com

Change-Id: I13ee4c6939468d35506779ade637a040833632f4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39848
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-02-07 22:32:51 +00:00
Mike Fairhurst 09eed74a8a Make void a static warning to use almost everywhere.
Changed the hint to a StaticWarningCode, since that's the new spec'd
error type and the hint is no longer needed.

Added a new set of methods to test the cases.

Didn't try to solve the problem generally ("all usages except ... are
errors" means it easier, in theory, to make a ReportVoidExpressions
style visitor that catches absolutely all types) because most of the
work is actually about suppressing errors that are no longer needed.
Ie, from NO_SUCH_METHOD to USAGE_OF_VOID_RESULT which means we have to
put the void handling logic into each AST method specially anyway.

Some redundant tests removed.

Don't flag: ternaries, void -> void assignments, void returns in
dynamic.

Change-Id: Ief8035dcfe582b36b6372180ddcf4e453d320d9c
Reviewed-on: https://dart-review.googlesource.com/37441
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-07 21:36:01 +00:00
Paul Berry f299f2d00f Remove error code TOP_LEVEL_TYPE_ARGUMENTS, which is no longer used
Change-Id: Ic41373617a5c96906840ac49bc13825323b486c6
Reviewed-on: https://dart-review.googlesource.com/39560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-07 14:41:42 +00:00
Paul Berry d9d2dc405b Infer mixin types in the analyzer.
This follows Leaf's simplified suggestion.  As a temporary hack it
assumes that the mixin passes its type parameters through to its
superclass constraint unchanged.

Change-Id: I091b44005d6364a91e20578f2ff6340334b1fab6
Reviewed-on: https://dart-review.googlesource.com/38040
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-02-07 10:45:39 +00:00
Brian Wilkerson b74ceb0248 Remove a warning (issue 31351)
Change-Id: Id798aa7ece345970e3bfba15b260df6482a57074
Reviewed-on: https://dart-review.googlesource.com/37861
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-31 20:42:26 +00:00
Brian Wilkerson 1d9ac49dd9 Reland "Add an error when an integer literal is out of bounds"
Change-Id: Id6ef76b47bedabc96fc372f6aea455975dfcc213
Reviewed-on: https://dart-review.googlesource.com/37840
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-01-31 16:50:55 +00:00
Paul Berry d68fbb7454 Add new warning StrongModeCode.TOP_LEVEL_INSTANCE_METHOD.
This warning fires if a top level initializer depends on the type of a
method whose type is subject to type inference.  This warning is
needed because the analyzer implementation of top level type inference
doesn't guarantee that the method type will be inferred prior to the
initializer, so it's possible that type inference will produce an
incorrect result.  See #31925 for more details.

Change-Id: Iec048d2638877c16ae11a87eae0382b7352f726c
Reviewed-on: https://dart-review.googlesource.com/36841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-26 01:10:00 +00:00