Commit Graph

58 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy 191fb02bf6 [NI] Consider intersection type with number type as Nothing
Currently, only for "in": In<in Int & A> == In<in Nothing> == In<*>

 #KT-37302 Fixed
2020-03-23 16:39:21 +03:00
Mikhail Zarechenskiy 4542f3b720 [NI] Finish analysis for coerced last lambda expressions if needed 2020-02-17 10:29:45 +03:00
Mikhail Zarechenskiy c2fc633ad6 [NI-MIGRATE] Update test about signature enhancements
It's required as now there are no synthetic candidates
2020-02-13 11:15:59 +03:00
Mikhail Zarechenskiy 687c96060f [NI-MIGRATE] Update test data for resolve tests after enabling NI 2020-02-13 11:15:58 +03:00
Mikhail Zarechenskiy 7a9e1b2b1d Improve diagnostic on overload resolution ambiguity
Report type mismatch on argument when a nullable argument is passed to non-null parameter.

 Note that this affects only functions with simple types without generics

 #KT-2007 Fixed
 #KT-9282 Fixed
2017-06-22 13:41:31 +03:00
Stanislav Erokhin 3600b51d90 Minor. fix test data. 2016-12-14 23:59:38 +03:00
Ilya Gorbunov 459c5fed8c Tweak checks and type parameter heuristics in LazyJavaClassDescriptor.getPurelyImplementedSupertype to support cases of UnaryOperator and BinaryOperator enhancements. 2016-12-08 20:34:55 +03:00
Ilya Gorbunov c66b3b8ef9 Nullability for java.lang.ref.Reference.get 2016-12-08 20:22:17 +03:00
Ilya Gorbunov 84a7e3c032 Add tests for enhanced java signatures based on AbstractResolvedCallsTest.
Refactor AbstractResolvedCallsTest to support multiple carets (multiple methods being tested  for resolve) in testdata file.
2016-12-08 20:22:17 +03:00
Stanislav Erokhin 1d9ca06b96 Remake KotlinTypes. 2016-06-09 12:57:59 +03:00
Ilya Gorbunov f4822cd757 Fix testData in compiler: add collections and ranges package to fq-names. 2016-01-22 05:54:38 +03:00
Alexander Udalov 7449ad2763 Rename Extension annotation to ExtensionFunctionType
The old one is kept temporarily and will be removed later
2015-12-21 20:33:32 +03:00
Alexander Udalov 239502368a Update test data for tower resolution algorithm
- locals win
- unary calls to plus/minus are not supported in favor of unaryPlus/unaryMinus
- unqualified nested classes are temporarily reported as unresolved
- function without receiver win against extension function
- explicit import win against star import
2015-12-11 17:01:02 +03:00
Alexander Udalov 877129340f Revert "Rename Extension annotation to ExtensionFunctionType"
This reverts commit 460dad135c.

The old compiler will not see the new runtime correctly. Postponing this until
1.0
2015-11-30 19:24:58 +03:00
Alexander Udalov 460dad135c Rename Extension annotation to ExtensionFunctionType 2015-11-30 02:51:04 +03:00
Yan Zhulanow 9d1af5a17e Fix tests: "infix modifier required" and "operator modifier required" errors 2015-11-27 15:51:11 +03:00
Valentin Kipyatkov 2e2dfcb4a0 "invoke" from function types do not have any meaningful parameter names 2015-11-16 18:24:37 +03:00
Zalim Bashorov 2944e998f7 Minor: don't trim file content in KotlinTestUtils#doLoadFile 2015-11-12 13:43:18 +03:00
Stanislav Erokhin 7d7d37719b Forbidden old invokeExtension convention. 2015-10-17 14:45:53 +03:00
Valentin Kipyatkov 090ea37a32 Fixed test data to use only annotation syntax with @ 2015-10-15 19:20:08 +03:00
Pavel V. Talanov bc8449a70c Test data adjustment: Resolved calls and constraint system test 2015-10-01 17:53:18 +03:00
Yan Zhulanow 6db9344659 Fix compiler tests 2015-09-25 19:20:20 +03:00
Denis Zharkov 73799e2c3c Replace deprecated lambda syntax in testData
It's done with similar constructions where possible trying to preserve
intended behavior.
Some usages are removed because they test exactly the feature that
we are going to drop soon.
2015-09-25 08:29:25 +03:00
Yan Zhulanow bc727a170b Add 'operator' keyword 2015-09-23 21:25:51 +03:00
Ilya Gorbunov e40a5457e3 Fix deprecations in testData: arrayOf usages. 2015-09-19 04:32:56 +03:00
Denis Zharkov 4850fd10f0 Regenerate test data containing rendered descriptors
Introduced '@' after each annotation
2015-09-18 10:14:39 +03:00
Denis Zharkov bae3320d52 Get rid of deprecated annotations in testData 2015-09-18 10:14:32 +03:00
Denis Zharkov eebe66e041 Minor. Fix test with obsolete enum syntax 2015-09-18 10:14:31 +03:00
Denis Zharkov 11fed1674e Deprecate extension annotation in favor of Extension 2015-09-04 17:23:25 +03:00
Alexander Udalov 9882e86ecb Don't render contents of enum entry classes in .txt tests, regenerate tests
They are irrelevant because cannot be accessed from the outside anyway
2015-08-28 21:11:06 +03:00
Mikhail Glukhikh b2653ad1e9 Deprecated enum syntax removed: most compiler tests 2015-08-10 16:24:12 +03:00
Svetlana Isakova 9a5abf368f Constraint incorporation
In a constraint system a new bound is incorporated:
all new constrains that can be derived from it
(and from existing ones) are added
2015-07-10 15:05:04 +03:00
Alexander Udalov 49004a8b8e Conform functions to extension functions and vice versa
#KT-5989 Fixed
2015-05-26 15:04:56 +03:00
Dmitry Jemerov 4bdf598bfe compiler testdata: s/trait/interface 2015-05-12 19:43:17 +02:00
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Denis Zharkov b2cecf1dd0 Secondary constructors resolve 2015-03-11 17:45:23 +03:00
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Pavel V. Talanov 75f55dd99a Update test data that mentioned old <class-object-for-..> name 2015-02-16 15:38:35 +03:00
Ilya Ryzhenkov 31fb24d390 Sort collections/map APIs, improve empty implementations. 2014-12-16 17:33:21 +03:00
Zalim Bashorov 4dff9cf5fc Frontend: fixed explicit receiver kind for dynamic call with implicit dispatch receiver.
Additionally added tests for other cases.
2014-12-15 18:12:04 +03:00
Alexander Udalov 3a8ad45dec Append newline to EOF for .txt test data files
Reverts and fixes 102f0d3
2014-10-21 03:18:27 +04:00
Alexander Udalov 102f0d3470 Regenerate .txt testData
Add newline to EOF, trim trailing spaces
2014-10-21 00:16:08 +04:00
Svetlana Isakova 20f3403c80 Rename: this object, receiver argument -> dispatch receiver, extension receiver 2014-10-01 18:52:51 +04:00
Svetlana Isakova 67aad53db7 Render 'defined in' in resolved call tests 2014-09-01 12:32:52 +04:00
Svetlana Isakova 6f4c152f53 Record reference to class object directly
not to containing class descriptor
2014-09-01 12:32:50 +04:00
Svetlana Isakova 6c63492355 KT-5308 Wrong ExplicitReceiverKind when access to IntRange.EMPTY
#KT-5308 Fixed
2014-09-01 12:32:49 +04:00
Svetlana Isakova e7c285e0e0 Launch ResolvedCallsTest with kotlin library 2014-09-01 12:32:48 +04:00
Svetlana Isakova e4e09d6c70 Resolve invoke on class objects and enum entries
Added FakeCallableDescriptorForObject to make a resolved call
with object as variable in 'variable as function call'

 #KT-4321 Fixed
 #KT-4863 Fixed
2014-09-01 12:32:48 +04:00
Svetlana Isakova fb4c256d08 Added tests for choosing 'most specific' resolution candidate
Fixed test (while resolve with library on android): 'run' resolves to library function
2014-07-30 17:07:10 +04:00
Svetlana Isakova eca2c7beea Added tests on resolved calls
for annotation entry, delegator to super call, array access
2014-07-30 17:07:10 +04:00