Commit Graph

1107 Commits

Author SHA1 Message Date
Svetlana Isakova 7a5124215a Updated test data for Array<out T> vararg type 2014-12-12 23:08:28 +03:00
Svetlana Isakova 5b4f10e698 Made vararg parameters have Array<out T> type
instead of simply Array<T>
  #KT-1638 Fixed
  #KT-2163 Fixed
  #KT-3213 Fixed
  #KT-4172 Fixed
  #KT-5534 Fixed
2014-12-12 23:08:28 +03:00
Svetlana Isakova a3e949674f Preserve nullability while substituting captured types 2014-12-12 23:08:28 +03:00
Svetlana Isakova f9d4a68c6e KT-6320 AssertionError in ConstraintSystem(The constraint shouldn't contain different type variables on both sides: Y <: X)
#KT-6320 Fixed
2014-12-12 23:08:27 +03:00
Svetlana Isakova 1fb713342b Capture types only on the top level 2014-12-12 23:08:27 +03:00
Svetlana Isakova cd359a046c Added captured types and approximation
CapturedType captures type projection while solving the constraint system.
During the substitution type containing captured types is approximated
to get rid of captured types and (for simple cases) replace them with corresponding type projections.

Note that Array<Array< CapturedType(out Int) >> is (over)approximated by Array<out<Array<out Int>>

See 'Mixed-site variance' by Ross Tate for details.

 #KT-2570 Fixed
 #KT-2872 Fixed
 #KT-3213 Fixed
2014-12-12 23:08:27 +03:00
Denis Zharkov 654411a0b0 Refactored tests using Array constructor:
Some moved to tests with stdlib
Some changed to use arrayOfNulls
2014-12-11 16:04:03 +03:00
Andrey Breslav d17edacb65 Discriminate calls with implicit dynamic receivers 2014-12-10 16:18:38 +03:00
Denis Zharkov 010af19fe9 Delegated Properties: allowing type parameters for get/set methods
#KT-6253 Fixed
2014-12-08 21:30:54 +03:00
Stanislav Erokhin f9afdf7540 Use Visibilities.isVisible with ReceiverValue. 2014-12-08 18:24:30 +03:00
Stanislav Erokhin fc8cec9509 Create PRIVATE_TO_THIS visibility 2014-12-08 18:24:30 +03:00
Stanislav Erokhin d59031fdcc Skip check variance for irrelevant classes 2014-12-08 18:24:30 +03:00
Stanislav Erokhin fced4756bb Add variance test for nullable and function types. 2014-12-08 18:24:30 +03:00
Evgeny Gerashchenko a3fdce8131 Highlighting "as Foo" for useless casts in gray.
#KT-6070 fixed
2014-12-08 17:30:47 +03:00
Nikolay Krasko 75c887048e Drop AbstractLazyResolveRecursiveComparingTest test
Test data from compiler/testData/lazyResolve/ was moved to diagnostics tests
2014-12-03 14:08:23 +03:00
Stanislav Erokhin d997a6cb35 Fix protected visibility in class object. 2014-12-02 14:30:16 +03:00
Stanislav Erokhin fc70c416ed Fix blinking test 2014-12-02 14:30:16 +03:00
Stanislav Erokhin aa97bb8cfc Added Variance tests 2014-12-02 14:30:15 +03:00
Stanislav Erokhin db457a612c Add test (recursive resolve in property declaration) to JetPsiChecker 2014-12-02 14:30:15 +03:00
Andrey Breslav c9c16696f1 Do not fail when delegating to an (unsupported) dynamic type on the JVM 2014-12-01 20:43:46 +03:00
Andrey Breslav e10d29a10b JS-specific tests moved to a separate directory 2014-12-01 20:43:46 +03:00
Andrey Breslav 6187a0e9e0 Fix for UNSUPPORTED diagnostic for dynamic types in local classes 2014-12-01 20:43:46 +03:00
Andrey Breslav b7dd63465b Allow invoke-convention on dynamic expressions 2014-12-01 20:43:45 +03:00
Andrey Breslav 53bbf20b0d Allow augmented assignments on dynamic receivers 2014-12-01 20:43:45 +03:00
Andrey Breslav 300f484535 Support operator conventions for dynamic types
TODO:
- invoke
- += etc
2014-12-01 20:43:45 +03:00
Andrey Breslav 4adf74b46f Do not allow compareTo() to return Int? 2014-12-01 20:43:44 +03:00
Andrey Breslav 304d22553c Prohibit using dynamic as an argument for reified type parameters 2014-12-01 20:43:44 +03:00
Andrey Breslav d5fdfcb797 Resolve dynamic.extensionForDynamic() statically 2014-12-01 20:43:44 +03:00
Andrey Breslav 8ee00b70ee Tests for extensions properties on dynamic types 2014-12-01 20:43:43 +03:00
Andrey Breslav 1afe6fca5b Test for vararg parameter of dynamic type 2014-12-01 20:43:43 +03:00
Andrey Breslav 8cf6d24ffe Test for using dynamic types in conditions 2014-12-01 20:43:43 +03:00
Andrey Breslav ea36024893 Report an error on dynamic types used as supertypes or upper bounds 2014-12-01 20:43:43 +03:00
Andrey Breslav 65164e95b5 Test for overrides involving dynamic types 2014-12-01 20:43:42 +03:00
Andrey Breslav e09b624f05 dynamic is not a keyword on the left-hand side of callable references 2014-12-01 20:43:42 +03:00
Andrey Breslav 1f66c64ee0 dynamic receiver admits nullable values 2014-12-01 20:43:42 +03:00
Andrey Breslav 71b2e8bcf1 Test for substitutions with dynamic types 2014-12-01 20:43:41 +03:00
Andrey Breslav a1c1d25575 Test for using dynamic types with smart casts 2014-12-01 20:43:41 +03:00
Andrey Breslav 712f776545 Test for using dynamic types with smart casts 2014-12-01 20:43:41 +03:00
Andrey Breslav cdecb9d8c4 Test for using dynamic types in type inference 2014-12-01 20:43:41 +03:00
Andrey Breslav 52f1e037c1 Dynamic calls have priority over extensions 2014-12-01 20:43:40 +03:00
Andrey Breslav f58b30706e Parsing dynamic in extension receiver position 2014-12-01 20:43:40 +03:00
Andrey Breslav 4f3158abb3 Mark dynamic calls in tests 2014-12-01 20:43:40 +03:00
Andrey Breslav c8029307fa Forbid dynamic on the RHS of is and as 2014-12-01 20:43:40 +03:00
Andrey Breslav 645d931a9e Support for named arguments in dynamic calls 2014-12-01 20:43:39 +03:00
Andrey Breslav 0ebc478d50 Test for dynamic calls with lambdas 2014-12-01 20:43:39 +03:00
Andrey Breslav d2e6767c07 Delegation and nullability turned into capabilities
Otherwise they did not sustain substitutions
2014-12-01 20:43:39 +03:00
Andrey Breslav 845f30975d Basic support for dynamic calls 2014-12-01 20:43:39 +03:00
Andrey Breslav d5932e1a33 Nullability of dynamic types 2014-12-01 20:43:38 +03:00
Andrey Breslav e0bd881c1e Rendering for dynamic types 2014-12-01 20:43:38 +03:00
Andrey Breslav 65794183e7 Specificity supported for dynamic types 2014-12-01 20:43:38 +03:00