Commit Graph

15878 Commits

Author SHA1 Message Date
Mikhail Glukhikh ac3dfd93bd More correct handling of compile time constant types #KT-13421 Fixed 2016-08-18 14:42:16 +03:00
Mikhail Glukhikh d9358d44e7 KT-13426 related : added assertion to prevent smart cast type rewriting for (expression, call) or (expression, implicit receiver) pair 2016-08-18 09:50:27 +03:00
Mikhail Glukhikh ae856e834a Store map (Call to KotlinType) for SMARTCAST slice #KT-13426 Fixed
Also EA-86848 Fixed
2016-08-17 16:09:45 +03:00
Mikhail Glukhikh dbff2be6fa Hack due to KT-678 was removed 2016-08-17 16:09:40 +03:00
Mikhail Glukhikh cbcef67d82 KT-13426: store map from ImplicitReceiver into KotlinType for implicit receiver smart casts 2016-08-17 16:09:34 +03:00
Ilya Gorbunov b69661df8f Pseudocode and CFG changed after 'let' is resolved correctly. 2016-08-17 12:40:50 +03:00
Ilya Gorbunov 58a010464a Exception typealiases rendering in test output (CFG) 2016-08-17 12:40:50 +03:00
Ilya Gorbunov 0ebfba7a1a Test data: do not use exceptions from java.lang, as they are not available in JS 2016-08-17 12:40:50 +03:00
Ilya Gorbunov d943079557 Exception typealiases rendering in test output 2016-08-17 12:40:50 +03:00
Ilya Gorbunov 403e2ab4ea Redefine configuration kinds, so that the most of test dependent on JDK_ONLY now use mock kotlin runtime:
MOCK_RUNTIME -> JDK_ONLY
JDK_ONLY -> JDK_NO_RUNTIME
2016-08-17 12:40:50 +03:00
Ilya Gorbunov cf898ae357 Exclude exceptions from java.lang package for which type aliases exist in kotlin package.
Add relevant note to the type aliases.
2016-08-17 12:40:50 +03:00
Ilya Gorbunov afe1b7eab1 Allow to exclude specific types from packages imported by default. 2016-08-17 12:40:50 +03:00
Alexey Sedunov fbd6edce92 Light Classes: Support property accessors with non-conventional names
#KT-13032 Fixed
2016-08-17 12:28:46 +03:00
Michael Bogdanov e6d96be329 Removed redundant 'addThis' flag 2016-08-17 11:26:46 +03:00
Michael Bogdanov e0d525b72a Support bound function reference inlining 2016-08-17 11:26:45 +03:00
Michael Bogdanov 439431e923 ParameterBuilder refactoring: allow to generate captured parameter between value ones 2016-08-17 11:26:45 +03:00
Valentin Kipyatkov ebdff775f3 Supported index++ pattern as non-last statement and even inside expressions 2016-08-16 17:38:13 +03:00
Valentin Kipyatkov 12b1a99a6a Initial implementation of loop-to-call-chain intention 2016-08-16 17:37:55 +03:00
Valentin Kipyatkov c50cf13611 KtExpression.analyzeInContext uses correct context when analyzing return's 2016-08-16 17:37:55 +03:00
Michael Bogdanov 7325baa06a Fix for KT-13374: CompilationException: Inline function call with anonymous object implementing an interface by delegation
#KT-13374 Fixed
2016-08-16 10:47:01 +03:00
Alexander Udalov 18887f8bec Rename CompanionObjectMapping.hasMappingToObject -> isMappedIntrinsicCompanionObject 2016-08-15 19:41:47 +03:00
Alexander Udalov 7b8ee5fba1 Add test case for obsolete issue
#KT-13172 Fixed
2016-08-15 19:41:47 +03:00
Alexander Udalov bd88b0941d Fix incorrect unsupported error on synthetic extension call on LHS of ::
#KT-13271 Fixed
2016-08-15 19:41:47 +03:00
Alexander Udalov 9dc7e90e12 Disable some reflection tests on Android 2016-08-15 19:41:47 +03:00
Alexander Udalov 4e8f88d580 Refactor comments in SpecialFiles 2016-08-15 19:41:47 +03:00
Alexander Udalov 5b1ee13db8 Make KClasses for primitives equal to KClasses for wrapper types
Both primitive int and wrapper type java.lang.Integer are represented by the
single type kotlin.Int in Kotlin, so inequality between the corresponding
KClasses was confusing here. To keep the old behavior, one may call 'k1.java ==
k2.java' instead of `k1 == k2`

 #KT-13462 Fixed
2016-08-15 19:41:47 +03:00
Alexander Udalov 3efa738bc0 Fix NPE on .companionObjectInstance for built-in classes
#KT-13370 Fixed
2016-08-15 19:41:47 +03:00
Alexander Udalov 611899e9d3 Minor, make CompanionObjectMapping a singleton 2016-08-15 19:41:47 +03:00
Stanislav Erokhin 85a951db52 Fixed exception AssertionError: Illegal resolved call to variable with invoke
#KT-13330 Fixed
#KT-13349 Fixed
2016-08-15 19:24:17 +03:00
Mikhail Glukhikh 1c5c6506ce Report of UNINITIALIZED_ENUM_COMPANION also for implicit receivers #KT-11769 Fixed 2016-08-12 15:06:43 +03:00
Mikhail Glukhikh 04f71bccf2 KT-11769 case with companion function call: error is now detected if companion receiver is stated explicitly 2016-08-12 15:06:38 +03:00
Mikhail Glukhikh 6cf90cfc4e Fix for SOE in VarianceChecker #KT-13401 Fixed 2016-08-11 13:04:58 +03:00
Ilya Chernikov 46a7c706e1 Fixes and refactorings after review 2016-08-11 09:11:11 +02:00
Ilya Chernikov 295f2fd40a Fix GeneratedClassloader creation in scripts compilation, fixes test 2016-08-11 09:11:11 +02:00
Ilya Chernikov 9f18ad606a Fix exception on incompatible resolver class - #EA-86599 2016-08-11 09:11:11 +02:00
Ilya Chernikov e99697e3a2 Fix testdata for cli help tests 2016-08-11 09:11:11 +02:00
Ilya Chernikov 324b4544c6 Generate kotlin metadata for scripts - see TODO 2016-08-11 09:11:11 +02:00
Ilya Chernikov c9441bd7b3 Update template(s) provider interface to support multiple templates, rename it appropriately 2016-08-11 09:08:40 +02:00
Ilya Chernikov 6c0b78fb01 Add script-templates option to compiler options, fix templates and definitions loading in compiler 2016-08-11 09:08:40 +02:00
Ilya Chernikov 4e18e91463 Attempt to fix EA-82064:
"java.lang.NoClassDefFoundError: Could not initialize class kotlin.Unit"
2016-08-10 14:18:03 +02:00
Mikhail Glukhikh d21061ff60 CAST_NEVER_SUCCEEDS: some type alias tests (1.1 only!) 2016-08-10 12:23:09 +03:00
Mikhail Glukhikh 687698da9a Do not report USELESS_CAST when casting null to nullable (special case) 2016-08-10 12:23:02 +03:00
Mikhail Glukhikh 8d537d294a Minor: imports removed, formatting 2016-08-10 12:22:58 +03:00
Mikhail Glukhikh 098520de64 CAST_NEVER_SUCCEEDS: do not report when casting nullable to nullable #KT-260 Fixed 2016-08-10 12:22:53 +03:00
Alexey Sedunov ab7d48a34e Light Classes: Do not compute annotations for light elements with invalid
origin (possible fix for KT-13199)
2016-08-10 11:45:40 +03:00
Alexey Sedunov 8a9a3285de Introduce Variable: Skip leading/trailing comments inside selection
#KT-13054 Fixed
2016-08-10 11:45:33 +03:00
Denis Zharkov 1df9724c0c Refine stack frames markup calculation
It fixes VerifyError with coroutines on Dalvik happening because of
variables spilling before/after suspension point

BasicInterpreter from ASM does not distinct 'int' types from other
int-like types like 'byte' or 'boolean', neither do HotSpot and JVM spec.
But it seems like Dalvik does not follow it, and spilling
boolean value into an 'int' field fails with VerifyError on Android 4,
so it's necessary to distinct int types for variables spilling

 #KT-13289 Fixed
2016-08-09 16:36:52 +03:00
Denis Zharkov d8c3cefc7c Extract backward analysis framework 2016-08-09 16:36:52 +03:00
Alexander Udalov 0d26087040 CLI, Ant: add kotlin-reflect.jar to classpath by default, support "-no-reflect"
Note that now "-no-stdlib" implies "-no-reflect".

 #KT-13237 Fixed
2016-08-09 11:24:24 +03:00
Mikhail Glukhikh 30fd22499b Test data fix (after cherry-pick from 1.0.4) 2016-08-09 10:32:15 +03:00