Commit Graph

60246 Commits

Author SHA1 Message Date
Denis Zharkov ae4397fbfb Fix bare typed smartcasts in NI
Star projections should be replaced with star projections
not for their expansions

See the test
2019-12-26 12:35:34 +03:00
Denis Zharkov abee908b94 Remove effectively dead code in AbstractTypeCheckerContext 2019-12-26 12:35:33 +03:00
Denis Zharkov 0b385cc532 NI: Approximate captured-for-star-projections to *
^KT-35602 Fixed
2019-12-26 12:35:32 +03:00
Dmitriy Novozhilov 7728102a77 Cleanup and reformart DelegatedPropertyResolver.kt 2019-12-26 10:54:07 +03:00
Dmitriy Novozhilov c8a1b876e8 [NI] Fix completion of error delegates with receiver with type parameters 2019-12-26 10:54:07 +03:00
Dmitriy Novozhilov e83941a98e [NI] Don't resolve delegates twice
#KT-31219 Fixed
#KT-31679 Fixed
#KT-32249 Fixed
2019-12-26 10:54:06 +03:00
Dmitriy Novozhilov 0c01499d98 [NI] Improve completing calls with multiple postponed arguments
#KT-27999 Fixed
#KT-30244 Fixed
#KT-31102 Fixed
2019-12-26 10:53:03 +03:00
Aleksey Kladov 0aa527347d Stubs don't break KtTypeAlias::isTopLevel
`foo ?: bar is baz` is parsed as `(foo ?: bar) is baz`. So, if stub is non-null, this always returns `False`, because `Boolean` is definitely not a `KtFile`. See https://pl.kotl.in/6DtggcImf 

This Kotlin's "most vexing parse" badly needs a diagnostics.
2019-12-26 10:36:40 +03:00
Dmitry Petrov 08454aa47e Minor: add reference to language design issue 2019-12-26 10:31:12 +03:00
Mark Punzalan 2dd8727baf [JVM IR] ForLoopsLowering: Keep IMPLICIT_NOTNULL type-casts in next()
and `componentN()` calls.

There were issues when we have iterables from Java where the element
type has "not null" type information.
2019-12-26 10:11:18 +03:00
pyos e54ef3bdb8 PSI2IR: ignore enum annotation arguments of error type
Similar to references to error type, this may happen if library A uses
an entity from library B annotated with an annotation from C, but A is
compiled without C on the classpath.
2019-12-26 10:10:29 +03:00
Vyacheslav Gerasimov a9848305a3 Build: Use tar.gz extension for linux AS distributions 2019-12-25 20:50:52 +03:00
Vyacheslav Gerasimov d8d21b0cba as40: Fix test compilation for AS 4.0 C7 2019-12-25 20:19:36 +03:00
Vyacheslav Gerasimov 89a259837f as40: Fix KotlinDslScriptModelProvider and KotlinDslScriptModelResolver for AS 4.0 C7 2019-12-25 20:19:36 +03:00
Vyacheslav Gerasimov 68f1d91e1b as40: Upgrade to AS 4.0 C7 2019-12-25 20:19:36 +03:00
Vyacheslav Gerasimov eda27ab298 Build: Add Ide.AS40 constant 2019-12-25 20:19:36 +03:00
Vyacheslav Gerasimov 19233ee120 Build: Add as40 to .bunch 2019-12-25 20:19:35 +03:00
Yan Zhulanow 5fe06ceb06 Pill: Support api/implementation configurations 2019-12-26 00:17:17 +09:00
Victor Petukhov 4309f53e11 NI: don't filter flexible types during CST calculation and force return as result the first of such types
^KT-35658 Fixed
2019-12-25 18:00:23 +03:00
Dmitriy Novozhilov 51424ec598 [NI] Add constraint K <: T from constraint K <: CapturedType(in T)
#KT-33263 Fixed
2019-12-25 16:19:19 +03:00
Dmitriy Novozhilov b54169d312 [NI] Fix substitution in completion of callable references in coroutine inference 2019-12-25 16:19:19 +03:00
Dmitriy Novozhilov 04d4366f2a [NI] Update testdata broken in NI 2019-12-25 16:19:18 +03:00
Dmitriy Novozhilov 6ca0df59c1 [FIR-TEST] Fail old FE diagnostics test if testdata doesn't exist 2019-12-25 15:29:09 +03:00
Pavel Kirpichenkov 77e4212774 [minor] unmute fixed spec tests 2019-12-25 14:59:06 +03:00
Pavel Kirpichenkov 7ee71450bc [NI] Discriminate Nothing? result type from nullability constraints
Nullability constraints should not be chosen when proper
argument constraints for variables in contravariant position present.

^KT-32106 Fixed
^KT-33166 Fixed
2019-12-25 14:59:06 +03:00
Pavel Kirpichenkov a1ad680edb [NI] Disallow full completion based on lower Nothing constraint 2019-12-25 14:59:06 +03:00
Pavel Kirpichenkov 384bd858e9 [NI] Support fixation to subtype in completion mode calculator
Allow full compltion mode for return type depending on type parameters in
contravariant position only if they have proper equality constraint.
2019-12-25 14:59:05 +03:00
Pavel Kirpichenkov e69e45e2a6 [NI] Remove direcion calculator from variable fixation
Force constraint system completer to always fix variable with unknown position.
This makes inferred type for in parameters less specific, but OI infers to
subtype in such cases, so NI won't infer to less specific types than before.
2019-12-25 14:59:05 +03:00
Pavel Kirpichenkov e9941f8c12 [NI] Implement algorithm for completion mode selection
Current selection of completion mode for call is not always correct in case of full mode,
and sometimes too conservative in case of partial mode. Updated algorithm checks constraints
wrt position of type variables in return type and in other related constraints.
Full completion happens if proper constraint requirements are satisfied for variables.
2019-12-25 14:59:05 +03:00
Pavel Kirpichenkov a9391c8dfb [NI] Remove Nothing result type restriction in most cases
Make Nothing as result type not suitable only for if, when, try and ?: special functions.
2019-12-25 14:59:05 +03:00
Mikhail Zarechenskiy ae1630f376 [NI] Don't discriminate Nothing-type from resulting ones
^KT-32106 Fixed
2019-12-25 14:59:04 +03:00
Dmitry Petrov a8e9a6a1d0 Properly reference type parameter descriptors
'descriptor -> descriptor.original' relation is often inconsistent
wrt 'containingDeclaration', parameters, and type parameters,
we have to introduce some workarounds here.
2019-12-25 14:20:47 +03:00
Igor Chevdar f8fd5092c6 [native-gradle-plugin] Disabled cache building for iOS devices 2019-12-25 16:16:55 +05:00
Nikolay Krasko 70ff3d36d0 Fix running tests in compiler plugins 2019-12-25 14:05:16 +03:00
Nikolay Krasko 5583b57ed7 Regenerate spec tests to activate muting framework for them 2019-12-25 14:05:15 +03:00
Nikolay Krasko 7a94b1d88b Mute SpringReferenceNavigationTestGenerated test 2019-12-25 14:05:15 +03:00
Nikolay Krasko 2f129ea435 Allow resolve during fixing AddSpringBeanQualifierFix action
Fix SpringQuickFixTestGenerated test
2019-12-25 14:05:15 +03:00
Nikolay Krasko bf79b660c4 Fix HighlightingWithDependentLibrariesTest in 193 by using relative path 2019-12-25 14:05:14 +03:00
Nikolay Krasko 1b9bae0cca Mute more flaky tests
JavaAgainstKotlinSourceCheckerWithoutUltraLightTestGenerated.JavaAgainstKotlin
ConfigureKotlinInTempDirTest
MavenMigrateTest
2019-12-25 14:05:14 +03:00
Nikolay Krasko d575df56e9 Minor: show method key in parse error 2019-12-25 14:05:14 +03:00
Nikolay Krasko 143cfc7030 Minor: put first actual item to the new line in tests 2019-12-25 14:05:13 +03:00
Nikolay Krasko 9b68008208 Mute JvmSmartCompletionTestGenerated (KT-32919) 2019-12-25 14:05:13 +03:00
Nikolay Krasko c372dc7f0a Fix AmbiguousCalls in >= 192 2019-12-25 14:05:13 +03:00
Nikolay Krasko 0884681662 Mute flaky stub builder tests 2019-12-25 14:05:12 +03:00
Nikolay Krasko 1e14c48742 Mute KotlinMavenInspectionTestGenerated 2019-12-25 14:05:12 +03:00
Nikolay Krasko 9206f1cfb2 Remove compatibility hack with reflection usage 2019-12-25 14:05:12 +03:00
Nikolay Krasko 1682ace428 Mute MultiPlatformHighlightingTestGenerated 2019-12-25 14:05:11 +03:00
Nikolay Krasko 3210e1d44c Fix testHighlightingWithDependentLibraries 2019-12-25 14:05:11 +03:00
Nikolay Krasko 03bd80b1ba Mute CreateActual.testWithTestDummy 2019-12-25 14:05:11 +03:00
Nikolay Krasko d2909814c2 Mute DeprecatedSymbolUsageFixSpecialTest 2019-12-25 14:05:10 +03:00