Commit Graph

15019 Commits

Author SHA1 Message Date
Valentin Kipyatkov df299655a7 Smart completion: one more working test and one more test to fix later 2014-04-17 14:39:31 +04:00
Valentin Kipyatkov 164fb84cbe Smart completion: ExpectedTypeInfo renamed to ExpectedInfo 2014-04-17 14:39:31 +04:00
Valentin Kipyatkov 9609a9fff1 Smart completion: refactored one big class into a set of smaller ones 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov c53da996c4 Smart completion: refactored static members processing 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov ad791d0480 Smart completion: some code improvements 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov f682dc36e0 Smart completion: lambda items 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov 1ba4c656a5 Smart completion: bugfix - no function reference after dot 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov 5bff98c164 Smart completion: minor code refactoring 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov 73329af7b1 Smart completion: refactored all code into a class to avoid passing the same data into many functions 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov 06b1f1ec2f Smart completion: code improvements and refactorings after code review 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov 6b1ecc3fb0 Smart completion: "::functionName" items when value of function type is expected 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov 7d5b86e000 Smart completion: no duplicates among static members 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov 4b5d175aa7 Smart completion: no more duplicates among type instantiation items 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov 5d8c5cfa31 Smart completion inserts closing parenthesis as well 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov f984dbc5b6 Smart completion to insert comma when in argument list 2014-04-17 14:39:28 +04:00
Zalim Bashorov 7b8f2fe396 Updated to IDEA 135.689 (13.1.2 EAP) 2014-04-17 13:28:03 +04:00
Alexander Udalov 3b7c743acc Minor fix in assert<->if+throw intention description 2014-04-17 03:20:14 +04:00
Zalim Bashorov 23922c1387 Fixed line separators for fix maven build on Windows. 2014-04-16 20:33:42 +04:00
Zalim Bashorov 361c81bbe5 IDEA plugin: fixed using SimplifyNegatedBinaryExpressionIntention and dependent tests.
+ minor reformat.
2014-04-16 18:14:11 +04:00
Tal Man 9cff3ba049 Intention to convert assert to an if with throw 2014-04-15 19:26:39 -04:00
Alexey Sedunov db38f420f3 Move Refactoring: Do not replace references to local declaration with qualified names. Update and fix test data
#KT-4851 Fixed
2014-04-15 16:19:28 +04:00
Svetlana Isakova 58b8eab620 Merge pull request #406 from wutalman/explicit_type_arguments
KT-4583 Intention for removing explicit type arguments at function calls
2014-04-15 12:09:15 +04:00
Andrey Breslav d28ca5bdfa Empty parameter list should go before '->' in a lambda
Example:

  val x = { -> foo() }
2014-04-14 19:15:08 +04:00
Tal Man b9e248b006 Intention for removing explicit type arguments at function calls 2014-04-14 11:14:09 -04:00
Alexander Udalov 4a60c59f39 Minor, fix KotlinSignature of DFS methods 2014-04-14 16:02:10 +04:00
Alexander Udalov 79e7ee91e4 Generate bridges for trait implementations properly
The intent was to keep the bridge codegen model as simple as possible: we
should be able to figure out all necessary bridges only by a minimal interface
that FunctionHandle provides (isAbstract, isDeclaration, getOverridden)

Add different tests for bridges

 #KT-318 Obsolete
2014-04-11 21:57:47 +04:00
Alexander Udalov 4a12ea9bda Don't generate bridges in light classes mode 2014-04-11 21:57:46 +04:00
Alexander Udalov b0db6a4526 Rewrite bridge generation to Kotlin, make it abstract 2014-04-11 21:57:46 +04:00
Alexander Udalov fc838dbb53 Refactor ImplementationBodyCodegen.getTraitImplementations()
Make it static, extract a method which finds an implementation in a trait for a
fake override
2014-04-11 21:57:46 +04:00
Alexander Udalov 5967befa6a Minor, catch all exceptions in asm verification in tests
E.g. ClassFormatError
2014-04-11 21:57:45 +04:00
Alexander Udalov 28940256e3 Minor, add bytecode text test on bridges for fake overrides 2014-04-11 21:57:45 +04:00
Alexander Udalov 478766815d Consider all real functions, not only declarations in bridge codegen
There should be bridges to all of the functions present in bytecode
2014-04-11 21:57:45 +04:00
Alexander Udalov 04c237cc22 Generate bridges for fake overrides when needed
#KT-3985 Fixed
 #KT-4145 Fixed
2014-04-11 21:57:44 +04:00
Alexander Udalov 2c2c918447 Refactor bridges algorithm in codegen
- fix a typo (which apparently didn't matter)
- queue now always contains originals, no need to invoke getOriginal()
- no need to add current descriptor's original anymore, this was a hack working
  around a problem with trait-impl which was fixed by another change
- a small optimization: don't do anything for constructors
2014-04-11 21:57:44 +04:00
Alexander Udalov 320a17739d Minor, move and rename getExceptions
Should only be used in FunctionCodegen from now on, because every method
generation should go through FunctionCodegen
2014-04-11 21:57:43 +04:00
Alexander Udalov 11386c0f7a Simplify codegen for trait methods with implementations
- use existing framework (FunctionCodegen.generateMethod) which will take care
  of all subtleties of method generation (bridges, annotations, thrown
  exceptions, etc)
- call to "generateThisOrOuter" was not needed, since when we're generating
  delegation to TImpl, "this" is always "ALOAD 0"
2014-04-11 21:57:43 +04:00
Alexander Udalov 089cba5791 Warn about unwrapFakeOverride in a comment 2014-04-11 21:39:56 +04:00
Evgeny Gerashchenko b9ddc107ba Merge pull request #443 from Stebalien/fix-eqeqeq
Accepted, thank you
2014-04-11 21:06:42 +04:00
Steven Allen 6de114366f Correctly unparse EQEQEQ and EXCLEQEQEQ into === and !== (instead of == and !=).
Reported by Pradyoth Kukkapalli on the kotlin-students mailing list.
2014-04-11 12:46:26 -04:00
Natalia Ukhorskaya ed7a156553 Merge remote-tracking branch 'origin/pr/435'
Conflicts:
	idea/src/META-INF/plugin.xml
	idea/tests/org/jetbrains/jet/plugin/codeInsight/JetInspectionTestGenerated.java
2014-04-11 12:11:44 +04:00
Natalia Ukhorskaya f6a4cce3ae Merge pull request #434 from zgrannan/if_then_to_elvis_inspection
KT-4555 Inspection to detect if's that are foldable to elvis operator
2014-04-11 11:59:42 +04:00
Zack Grannan 867925d5a1 Added ifThenToSafeAccessInspection 2014-04-10 15:44:59 -07:00
Zack Grannan 328607a3ab Added ifThenToElvisInspection
Conflicts:
	idea/src/META-INF/plugin.xml
2014-04-10 14:43:18 -07:00
Tal Man cfc16b410e Intention for adding explicit type arguments at function calls 2014-04-10 16:28:42 +04:00
Natalia Ukhorskaya f8db722011 Merge pull request #392 from wutalman/simplify_booleans
KT-4569: Intention to simplify boolean expressions with constants #KT-4569 Fixed
2014-04-10 11:00:16 +04:00
Tal Man 0feb0d35e6 Intention to simplify boolean expressions that have expressions in them that can be simplified to constants 2014-04-09 14:47:13 -04:00
Tal Man aeb5bae556 Refactoring of CompileTimeConstant, introduce flag to represent a constant being referenced by a variable 2014-04-09 14:47:05 -04:00
Pavel Talanov 32651ec05f Merge pull request #431 from gavinkeusch/split_if_new
KT-4794: Added functionality to KT-4574: Split If. Intention is now offered inside IF keyword
2014-04-09 09:10:50 -07:00
gavinkeusch 216ea4940d KT-4794: Added functionality to KT-4574: Split If. Intention is now offered inside IF keyword 2014-04-08 11:29:30 -07:00
Evgeny Gerashchenko c32bb67365 Updated to IDEA 135.667 (13.1.2 EAP) 2014-04-08 19:29:44 +04:00