Mikhail Glukhikh
46290798ca
Refactoring (same logic in ControlFlowInformationProvider / DataFlowValueFactory)
2016-03-23 15:04:13 +03:00
Mikhail Glukhikh
32e7f9e58f
Correct handling of local class / anonymous object cases for KT-10445 / KT-10042
2016-03-23 15:04:09 +03:00
Mikhail Glukhikh
b975b7d26e
More accurate CFG for local class constructors (now they are not considered unconditionally executed) #KT-10042 Fixed
2016-03-23 15:04:05 +03:00
Mikhail Glukhikh
8756cba2f5
Minor: test renamed
2016-03-23 15:04:01 +03:00
Mikhail Glukhikh
bc4ec97043
Captured value initialization is no more allowed #KT-10445 Fixed
2016-03-23 15:03:50 +03:00
Anton Sukhonosenko
e8b665f600
#KT-10883 Fixed
2016-03-22 17:23:16 +01:00
Alexander Udalov
348125acb3
Fix visibility of protected classes in bytecode
...
Protected should be translated to public as in Java so that everything would
work at runtime. The real visibility is still saved to an InnerClasses
attribute
#KT-8269 Fixed
#KT-9246 Fixed
#KT-10143 Fixed
2016-03-22 18:42:34 +03:00
Valentin Kipyatkov
28c5dde875
KT-7715 Highlight var's that can be replaced by val's
...
#KT-7715 Fixed
2016-03-22 18:01:52 +03:00
Ilya Chernikov
e5b5a8db42
Rollback partially a commit that dropped removePerfOutput functionality, fixes CompilerDaemonTest.testHelloApp
...
The commit was done by @yole in assumption that the function only affects PARF lines generated by compiler, but similar lines generated
by daemon infrastructure were affected as well, the mentioned test was failing since. CliBaseTest class was refactored, I place the removePerfOutput
function into AbstractCliTest class.
2016-03-22 11:15:38 +01:00
Michael Bogdanov
00cb2705da
Add a test verifying anonymous object transform is performed correctly with ClassBuilder.
2016-03-21 18:37:28 +03:00
Ilya Gorbunov
1ae0040ca3
Minor: make variables initialized in defineClass lateinit instead of nullable.
2016-03-21 18:37:27 +03:00
Ilya Gorbunov
d9329456b5
ClassBuilder-to-ClassVisitor adapters should invoke methods of adapted ClassBuilder.
...
Call classBuilder.defineClass instead of ClassVisitor.visit.
Call classBuilder.newField instead of ClassVisitor.visitField.
2016-03-21 18:37:27 +03:00
Kirill Rakhman
146dca2cd6
Formatter: Remove spaces between expression and parentheses
...
#KT-11476 Fixed
2016-03-21 17:56:04 +03:00
Denis Zharkov
56477f0af8
Fix loading container type from Java
...
Load immutable flexible upper bound for 'Iterable<? super T>'
We load 'Collection<? super CharSequence>' as 'MutableCollection<in CharSequence>'
instead of 'MutableCollection<in CharSequence>..Collection<*>'
because it's obviously not typesafe to use any 'Collection<*>'
as argument for such type.
But there'se nothing bad with loading 'Iterable<? super CharSequence>'
as 'MutableIterable<*>..Collection<*>'. Same for other declarations that have
covariant mutable representation (currently Iterator, ListIterator).
Also there are useful use-cases when it's neccessary to use 'Iterable<*>'
as an argument for parameter with type 'Iterable<? super T>' (see matchers.kt test).
NB: Star-projections appear in examples because types like 'Collection<in CharSequence>'
with conflicting use-site projections are invalid in Kotlin, but they are valid in Java.
2016-03-21 16:46:46 +03:00
Denis Zharkov
c3e44ec199
Fix loading Java type arguments
...
Type arguments with use variance in java contradicting to Kotlin declaration-site variance should be loaded as star-projections
#KT-11492 Fixed
2016-03-18 19:07:27 +03:00
Denis Zharkov
838fcf9a57
Load contavariantly projected collections in Java as mutable
...
#KT-3068 Fixed
2016-03-18 19:07:27 +03:00
Denis Zharkov
e54b25a35a
Fix StackOverflowError while mapping recursive intersection-type
...
#KT-10972 Fixed
2016-03-18 19:07:27 +03:00
Denis Zharkov
67b59fa72f
Prohibit nested intersection types in return position
...
#KT-11490 Fixed
2016-03-18 19:07:27 +03:00
Mikhail Glukhikh
90b5d3b9f5
Minor if-to-when refactoring
2016-03-18 18:54:01 +03:00
Mikhail Glukhikh
fa069214fd
if to when intention now detects effectively else branches in subsequent code + performs more accurate comment handling #KT-10750 Fixed
...
Also #KT-11424 Fixed
2016-03-18 18:47:32 +03:00
Michael Bogdanov
c3d450f050
Fix for KT-11479: 1.0.2 Snapshot: CompilationException: Back-end (JVM) Internal error: Couldn't inline method call
...
#KT-11479 Fixed
2016-03-18 15:43:18 +01:00
Natalia Ukhorskaya
dde11b7f50
Report more info for errors from jdi
2016-03-18 15:19:03 +03:00
Natalia Ukhorskaya
6b4ea1ff19
Debugger: do not report errors from context file
...
#KT-11455 Fixed
2016-03-18 15:19:03 +03:00
Natalia Ukhorskaya
6752d0f180
Descriptors from library source should be visible from descriptors from libraries class files
2016-03-18 15:19:03 +03:00
Natalia Ukhorskaya
5b489d1986
Debugger: use StackFrameProxy from IDEA instead of StackFrame from JDI to show error message when debug info in corrupted
...
#EA-76187 - IE: FrameVisitor.findLocalVariable Fixed
2016-03-18 15:19:03 +03:00
Natalia Ukhorskaya
589d7007fc
Skip additional visibility check for java classes in debug mode
2016-03-18 15:19:03 +03:00
Natalia Ukhorskaya
b79aa13242
Complete private members from libraries in Evaluate Expression dialog
2016-03-18 15:19:03 +03:00
Natalia Ukhorskaya
26c153639a
Skip visibility check when resolving class in debug mode
...
#KT-11326 Fixed
2016-03-18 15:19:03 +03:00
Alexander Udalov
0fd8bec2ef
Convert Java model to Kotlin, put in several files
...
Also move JavaPropertyInitializerEvaluator to ../components/
2016-03-18 14:48:58 +03:00
Alexander Udalov
0d74fc2290
Minor cleanup in Java model: fix warnings, remove unused
2016-03-18 14:48:57 +03:00
Alexander Udalov
0a54464420
Minor, JavaClass#getOriginKind -> isKotlinLightClass
2016-03-18 14:48:56 +03:00
Alexander Udalov
0ba0e2b10d
Delete JavaTypeSubstitutorImpl, use PsiSubstitutor in JavaClassImpl
...
Also delete related tests
2016-03-18 14:48:56 +03:00
Alexander Udalov
291c713d8b
Cleanup JavaElement model from methods used only in substitutor
...
Downcast everything used in JavaTypeSubstitutorImpl to *Impl, remove methods
from interfaces, inline/move some of them
2016-03-18 14:48:55 +03:00
Alexander Udalov
26bf0dca13
Remove interface JavaTypeSubstitutor, use implementation
...
After 151e55b JavaTypeSubstitutor is only used from inside PSI-based
implementation of Java structure
2016-03-18 14:48:55 +03:00
Alexander Udalov
e42cb2af40
Render 'annotation class not found' for error types in tests
...
After 13ae3d9 it became unclear whether an annotation mentioned in test data is
resolved or not, this change fixes that
2016-03-18 14:48:54 +03:00
Alexander Udalov
70dd79d7e4
Minor, rename TypeConstructorImpl -> ClassTypeConstructorImpl
2016-03-18 14:20:43 +03:00
Alexander Udalov
13ae3d96ab
Simplify TypeConstructorImpl, extend it from AbstractClassTypeConstructor
2016-03-18 14:20:43 +03:00
Michael Bogdanov
b95e27fd87
Fix for KT-11478: "Couldn't inline method call" error
...
#KT-11478 Fixed
2016-03-18 11:07:47 +01:00
Denis Zharkov
ce8add2802
Fix common supertype calculation
...
Use star-projections instead of 'out Any?' in corner cases
#KT-11468 Fixed
2016-03-18 10:12:00 +03:00
Mikhail Glukhikh
bace881463
Quick fix to make var with private setter final #KT-10859 Fixed
2016-03-17 18:18:07 +03:00
Mikhail Glukhikh
efdf6b9569
Minor
2016-03-17 17:47:10 +03:00
Alexey Tsvetkov
d1a8c0d09b
Enable default incremental compilation by default in IDEA
...
#KT-11360 fixed
2016-03-17 15:47:51 +03:00
Denis Zharkov
fecb64560b
Minor. Decrease method visibility
2016-03-16 20:23:42 +03:00
Denis Zharkov
d9a6d15fe4
Add tests for obsolete issues
...
#KT-4628 Obsolete
#KT-3897 Obsolete
#KT-3898 Obsolete
#KT-7523 Obsolete
2016-03-16 20:23:36 +03:00
Denis Zharkov
bfa0b69ba9
Simplify SamCodegenUtil.getOriginalIfSamAdapter
...
At the monent adapters are either:
- synthetic extensions (no overrides)
- static members:
fake override always has one overridden from super class,
that should be created as a result of SamAdapterDescriptor.createSubsitutedCopy(),
hence should be instance of SamAdapterDescriptor
2016-03-16 20:23:01 +03:00
Denis Zharkov
1d0c37ff20
Cache read classes and method nodes for inline
...
It decrease GENERATE phase nearly for 10%
2016-03-16 20:23:01 +03:00
Denis Zharkov
26081bf817
Support loading Java annotations with TYPE_PARAMETER target
2016-03-16 20:23:01 +03:00
Denis Zharkov
04eb5ff4f7
Move test loading Java TYPE_USE annotation to Java8 module
...
#KT-11454 Fixed
2016-03-16 20:23:00 +03:00
Denis Zharkov
85329e59ca
Remove nullability annotations attached to TYPE_USE position in tests
...
They do not work anyway by many reasons:
- 'org.jetbrains.annotations.*' are not TYPE_USE targeted
- raw type with annotated arguments is something very weird and should be
investigated
2016-03-16 20:23:00 +03:00
Denis Zharkov
e96024017f
Move and fix tests on typeEnhancement with TYPE_USE annotations
2016-03-16 20:22:59 +03:00