Alexander Udalov
117d0bcf03
Fix multiple exceptions related to subtypes of function types
...
The main change is in FunctionsTypingVisitor#visitLambdaExpression, where we
incorrectly allowed subtypes of function types to be expected type during
resolution of lambdas
Also see EA-70485
#KT-9820 Fixed
2016-03-14 19:24:17 +03:00
Mikhail Glukhikh
f76efb68f2
Strictfp on a class is now a warning #KT-11109 Fixed
2016-03-12 13:17:11 +03:00
Dmitry Petrov
8660800af7
Constraint system builder shouldn't drop nullability when comparing signatures for specificity.
2016-03-03 19:23:43 +03:00
Alexander Udalov
8e77e16bbd
Remove leftovers of platformName and platformStatic in test data
...
Drop unnecessary imports, rename some tests
2016-03-02 16:47:04 +03:00
Dmitry Petrov
eb7cf92fbd
Minor. Add a test for KT-10732: no redeclaration for
...
fun <T> List<T>?.foo()
fun <T> List<T>.foo()
2016-03-01 13:54:03 +03:00
Pavel V. Talanov
a4c005fefd
Update existing test data depending on diagnostic parameter rendering
2016-02-26 14:45:11 +03:00
Michael Bogdanov
1b94904684
Prohibited @Strictfp annotation on classes (it's not supported yet), Fix for KT-11109: Strictfp annotation do nothing when applied to class
...
#KT-11109 Fixed
2016-02-25 18:07:51 +03:00
Alexander Udalov
1b8f934b54
Delete deprecated enum 'values' property
2016-02-19 22:28:44 +03:00
Mikhail Glukhikh
7da981e12c
Regression tests #KT-8168 Obsolete
2016-02-05 18:29:40 +03:00
Dmitry Petrov
e4583fd275
Do not report IMPLICIT_CAST_TO_ANY on last statement of lambda with Unit(?) in at least one branch.
2016-02-05 10:44:50 +03:00
Mikhail Glukhikh
60d56b30bf
Safe call arguments are now handled as nullable in generic resolver #KT-9985 Fixed
2016-02-03 18:34:10 +03:00
Yan Zhulanow
da7acd5e73
Check annotations on default property getter/setter
2016-02-02 13:14:56 +03:00
Ilya Gorbunov
911940d458
InlineOnly annotation suppresses NOTHING_TO_INLINE diagnostics.
2016-01-28 19:37:44 +03:00
Mikhail Glukhikh
12b100c541
Regression test #KT-9529 Obsolete
2016-01-28 12:56:12 +03:00
Alexander Udalov
04026dbe84
Make Array<T>(size, init) a constructor of Array
...
It's not marked as inline, this is why 'crossinline' was added in
jaggedArray.kt/jaggedDeep.kt. Will be fixed in the following commits
2016-01-28 03:10:37 +03:00
Dmitry Petrov
9db3440e72
Fix type inference issues for 'if' and 'when'.
...
Use 'expectedType' (when present) as an explicit type argument for a special construct call.
Unfortunately, this approach can't be used for elvis due to other elvis-related inference hacks.
Fixes KT-10807, KT-10811.
This also affects KT-6189: now we can infer proper type for 'if'.
If type inference for special call failed, and we found no type errors in sub-expressions,
report TYPE_INFERENCE_FAILED_ON_SPECIAL_CONSTRUCT error.
This (and the hack above) fixes KT-10809: code no longer compiles.
2016-01-27 17:07:20 +03:00
Mikhail Glukhikh
d94930149b
Warning for open members in objects
2016-01-26 19:04:17 +03:00
Mikhail Glukhikh
1b8f938260
Report EXPOSED_PROPERTY_TYPE on a property name only #KT-10760 Fixed
2016-01-26 19:04:13 +03:00
Stanislav Erokhin
e53e152f83
Removed hacks for code migration from ConstraintSystemImpl.
2016-01-25 21:53:09 +03:00
Stanislav Erokhin
210c9ab3db
Minor. Added regression tests for: KT-3927, KT-9522, KT-10036, KT-7440, KT-9682, KT-9808, KT-9517, KT-9810, KT-9345.
2016-01-25 19:13:32 +03:00
Denis Zharkov
6c0cd70a22
Introduce PureReifiable annotation
...
It prevents reporting unsafe substitution warning on expressions
like 'arrayOf(arrayOf(""))'
2016-01-22 19:17:22 +03:00
Denis Zharkov
4cf1393e81
Minor. Render annotations on type parameters
2016-01-22 19:17:22 +03:00
Denis Zharkov
ae6c62ddff
Minor. Report reified-related diagnostics on arguments if possible
2016-01-22 19:17:22 +03:00
Dmitry Petrov
f371e67ce8
PatternMatchingTypingVisitor:
...
rewrite type inference for 'when' using special constructs.
This fixes several type inference issues for 'when':
KT-9929, KT-9972, KT-10439, KT-10463
along with some other diagnostics-related issues.
2016-01-22 10:41:55 +03:00
Michael Bogdanov
829978a37d
Added additional parameter for default methods
2016-01-22 10:10:32 +03:00
Ilya Gorbunov
25c4453dc5
Cleanup deprecated symbol usages in testData
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
2813840769
Fix testData: diagnostics changed.
2016-01-22 05:54:38 +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
Valentin Kipyatkov
d749f85a60
Inaccessible classes from the current package to not conflict with visible classes from somewhere else
2016-01-19 19:30:18 +03:00
Mikhail Glukhikh
e4f7446bec
JvmSynthetic forbidden for delegated properties (and searched for different use-site targets)
2016-01-19 11:38:53 +03:00
Mikhail Glukhikh
a2bba7c8f1
JvmField forbidden for delegated properties
2016-01-19 11:38:49 +03:00
Mikhail Glukhikh
ec909d0775
Volatile forbidden for delegated properties (and checked for other use-site targets)
2016-01-19 11:38:45 +03:00
Mikhail Glukhikh
b78d481bb1
delegate use-site targeted annotations: parser, front-end, codegen with some tests #KT-10502 Fixed
2016-01-19 11:38:41 +03:00
Denis Zharkov
e9693e987f
Humanize type mismatch diagnostic caused by type projections
...
#KT-10581 Fixed
2016-01-19 11:05:41 +03:00
Stanislav Erokhin
b185316a6e
Create new HidesMembers annotation
2016-01-15 23:32:34 +03:00
Valentin Kipyatkov
5a079defc7
"Rename on import" hides importing of the same symbol by other imports with the original name
2016-01-14 17:05:28 +03:00
Dmitry Petrov
609ffc10a9
KT-10322, KT-10646, KT-10647:
...
- update diagnostic to (supposedly) more useful
- also report IMPLICIT_CAST_TO_ANY if expected type is DONT_CARE
(effectively "no expected type" for lambda expression).
2016-01-14 10:08:20 +03:00
Michael Bogdanov
91f27ba176
Report error on 'JvmStatic' annotation on const or @JvmField property
...
#KT-10415 Fixed
2015-12-29 17:20:07 +03:00
Michael Bogdanov
ae4ca3b5bb
Report JvmStatic diagnostic on primary constructor properties
2015-12-29 16:45:24 +03:00
Denis Zharkov
e2c02f825f
Refine member scope for types with projections
...
Instead of erasing descriptors with conflicting substitution,
use invariant CapturedType(<projection>) as replacement for type parameter
within default member scope.
After substitution leave such types 'as is' everywhere except return types,
use common approximation for them.
#KT-9294 In Progress
#KT-5411 Fixed
#KT-8647 Fixed
#KT-9462 Fixed
#KT-9893 Fixed
#KT-7581 Fixed
#KT-7296 In Progress
2015-12-28 11:13:37 +03:00
Mikhail Glukhikh
15746cbf56
Implicit callable type check refactoring, additional check for property with explicit Nothing type
2015-12-23 18:04:25 +03:00
Stanislav Erokhin
8b5a194dd6
Do not discriminate synthesized candidates.
...
#KT-9965 Fixed
2015-12-18 15:08:19 +03:00
Mikhail Glukhikh
f5989aa4f2
CallableMemberDescriptor.isOverridable / ClassDescriptor.isFinal refactoring
...
Extra JvmField and integer constants tests
2015-12-17 18:11:41 +03:00
Alexey Tsvetkov
7384d25cb3
Prohibit Array<Nothing>
2015-12-17 16:26:26 +03:00
Mikhail Glukhikh
3fb04aceb9
Check backing field availability for AnnotationTarget.FIELD #KT-10387 Fixed
...
Some duplicated checks deleted (UseSiteTargetChecker / JvmFieldApplicabilityChecker)
2015-12-17 15:06:58 +03:00
Mikhail Glukhikh
49e7417741
"as" in binary / unary expressions now checked only for original type conversion #KT-10384 Fixed
...
Also #KT-10386 Fixed
2015-12-15 12:02:33 +03:00
Mikhail Glukhikh
fdc9e9d7f5
Delegated properties never require backing field #KT-10107 Fixed
2015-12-14 12:26:37 +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
Mikhail Glukhikh
c8b50eec1e
Enum.values: deprecation (warning) --> deprecation (error)
2015-12-11 11:11:42 +03:00
Dmitry Petrov
f34f7556bc
KT-10192 got fixed due to new if/when check
...
(which doesn't depend on the expected type for expression)
#KT-10192 Fixed
2015-12-01 10:36:40 +03:00