Commit Graph

3551 Commits

Author SHA1 Message Date
Mikhail Glukhikh 1544755838 Test refactoring 2015-04-14 19:11:26 +03:00
Mikhail Glukhikh 8184bccda1 Extended loop data flow analysis was implemented. #KT-6283 Fixed. #KT-6284 Fixed.
A local descendant of JetTypeInfo added to save separately current data flow info and jump point data flow info together with jump opportunity.
Now data flow analysis know about loop bodies that must be executed at least once (do...while, while(true) until the first break/continue).
A set of tests for smart casts in and after loops.
Existing DoWhile and WhileTrue resolve tests corrected in accordance.
2015-04-14 19:11:22 +03:00
Dmitry Jemerov 9434e4bee9 mark wrapper methods that pass default values of parameters as synthetic
#KT-7314 Fixed
2015-04-13 15:26:20 +02:00
Dmitry Jemerov 900a16a315 deprecate required classes for traits 2015-04-13 16:22:22 +03:00
Michael Bogdanov 7b0f6018dc Fix nameless function inlining 2015-04-13 16:11:21 +03:00
Michael Bogdanov 7025a4f933 Test framewrk update: check lambda inlining 2015-04-13 16:11:21 +03:00
Michael Bogdanov e200b97ca4 Inline callable references
#KT-6900 Fixed
2015-04-13 16:11:21 +03:00
Dmitry Jemerov 991db29731 drop covariant specialisation for supertypes 2015-04-13 15:28:50 +03:00
Evgeny Gerashchenko 508c7a58b6 KT-7377 Throwable: Empty PSI elements should not be passed to createDescriptor from UnusedReceiverParameterInspection
#KT-7377 fixed
2015-04-13 15:04:00 +03:00
Alexander Udalov 92fa107471 Delete three diagnostic tests which rendered parts of JRE
- PackageLocalClassNotImportedWithDefaultImport.kt goes to codegen multi-file
  tests. File in java.lang moved to kotlin.jvm, which seems irrelevant to the
  test, because java.lang is prohibited by the VM
- MergePackagesWithJava.kt (KT-689, Java and Kotlin in the same package) and
  kt955.kt (Unable to import from default package) are considered too obsolete
  to even test and are thus deleted

Also check that there's no more than 1000 lines in the .txt file in diagnostic
tests.
2015-04-10 20:35:18 +03:00
Alexander Udalov 5c06204658 Move ExpectLoadError from tests to testData
To avoid loading all sources under "compiler/tests" in each test. Saves about
20-25% when running LoadJavaTestGenerated
2015-04-10 20:26:33 +03:00
Michael Bogdanov 67c2f7105b Fix for KT-6863: Internal compiler error folding functions
#KT-6863 Fixed
2015-04-10 08:59:27 +03:00
Michael Bogdanov a24d845bd0 Test for KT-7009: VerifyError: Bad type on operand stack in daload
#KT-7009 Obsolete
2015-04-10 08:59:27 +03:00
Michael Bogdanov 824d1ac556 Fix for KT-7306: Implicit array conversions cause ClassCastException at runtime
#KT-7306 Fixed
2015-04-10 08:59:26 +03:00
Alexander Udalov 6182b3ff5c Prohibit Array::class, require type arguments for reified parameters 2015-04-09 19:46:47 +03:00
Alexey Sedunov 4af608ef84 Parser: Recovery for parameter with missing name 2015-04-09 13:49:17 +03:00
Michael Bogdanov 20653090d3 Test for KT-7338: Incorrect code is emitted for is-checks with array types, resulting in java.lang.VerifyError
#KT-7338 Obsolete
2015-04-09 11:10:33 +03:00
Michael Bogdanov 99496f8f52 Update some test due smap generation 2015-04-09 09:25:26 +03:00
Michael Bogdanov c582b1d9ce Generate linenumber if needed after inlining 2015-04-09 09:25:26 +03:00
Michael Bogdanov 8cd496556c Generate local var table 2015-04-09 09:25:26 +03:00
Evgeny Gerashchenko eeeb741d42 Added test for obsolete bug and removed workaround in code. 2015-04-08 15:14:16 +03:00
Alexander Udalov 47e7235e64 Add different tests on class loaders in reflection 2015-04-07 20:25:07 +03:00
Alexander Udalov 87ef4ff7c5 Fix KClassImpl#toString to render Kotlin FQ name, not JVM one 2015-04-07 20:25:06 +03:00
Alexander Udalov 715641fb0d Call getMethod/getDeclaredMethod depending on visibility 2015-04-07 20:20:40 +03:00
Alexander Udalov 0202217135 Fix JVM signatures involving multi-dimensional array types
Apparently ASM's Type#getElementType returns the type of the array even if it's
multi-dimensional, so the loop was incorrect
2015-04-07 20:06:23 +03:00
Denis Zharkov ce51327509 Refine descriptor renderer test
Now it checks:
- Whether resolveToDescriptor on secondary constructors works well
- If there is explicit primary constructor declaration
  resolveToDescriptor should return it
- Renderer itself works well with constructors
2015-04-07 19:31:31 +03:00
Denis Zharkov 1324667bc9 Prohibit use of positioned value arguments for java annotation 2015-04-07 19:31:30 +03:00
Denis Zharkov a29c0ff9a3 Use default value if annotation vararg argument is empty 2015-04-07 19:31:30 +03:00
Denis Zharkov 9b1443954f Refine loading annotation parameters from java
- Parameter named `value` is always first
- Array parameter represented as vararg iff its name is `value` and all
  other parameters have default values

 #KT-2576 Fixed
 #KT-6641 Fixed
 #KT-6220 Fixed
 #KT-6652 Fixed
2015-04-07 19:31:29 +03:00
Mikhail Glukhikh 27b1f1ddad Test and implementation for KT-6819. Now when entry condition data flow information is used for subsequent conditions. #KT-6819 Fixed 2015-04-07 19:03:34 +03:00
Mikhail Glukhikh cd206fc97b Test for KT-3711. Passes already in M11 or even earlier 2015-04-07 19:03:31 +03:00
Mikhail Glukhikh 221501c0d9 Tests for KT-2865. Passes already in M11 or even earlier 2015-04-07 19:03:29 +03:00
Mikhail Glukhikh 39e01f4df2 Tests for KT-3899. Passes already in M11 or even earlier 2015-04-07 19:03:27 +03:00
Mikhail Glukhikh f49c79f4f0 Tests for KT-3224 and KT-3244. Both pass already in M11 or even earlier 2015-04-07 19:03:24 +03:00
Michael Bogdanov 841b199d49 Optimize comparison with zero and null 2015-04-07 17:28:01 +03:00
Michael Bogdanov de11ecb9b4 Fix for KT-7288: VerifyError on accessing array element in 'is' block
#KT-7288 Fixed
2015-04-07 16:05:42 +03:00
Michael Bogdanov c7fe8e0b66 Branched value refactoring, And/Or support 2015-04-07 16:05:42 +03:00
Michael Bogdanov c63ac3e30a Test for KT-7222 Redundant boxing on toString call
#KT-7222 Fixed
2015-04-07 16:05:42 +03:00
Michael Bogdanov 0efe8890b8 Added new string tests 2015-04-07 16:05:42 +03:00
Nikolay Krasko 2946c1d6a8 KT-7271 Accessing an extension property of Char.Companion leads to ClassNotFoundException in runtime
#KT-7271 Fixed
2015-04-07 15:59:05 +03:00
Stanislav Erokhin 3de0dff575 Migrate testdata to new lambda syntax 2015-04-07 13:08:53 +03:00
Stanislav Erokhin b152211096 Added init keyword to testdata 2015-04-07 13:08:51 +03:00
Ilya Gorbunov 70cc7fbf1f Remove never intentionally used String.hashCode extension. 2015-04-07 03:14:49 +03:00
Mikhail Glukhikh 88441814b9 Test for KT-5502 (works after KT-4450 / KT-5907 fix) 2015-04-06 18:32:19 +03:00
Mikhail Glukhikh d92ccad35d Implementation and tests for KT-5840 and newly created KT-7204. Now a safe call provides not-null receiver state *inside* argument list. It works also for ?. chains. #KT-5840 Fixed.
On the other hand, argument states do not propagate to successor statements for a safe call. #KT-7204 Fixed. A few additional comments.
2015-04-06 18:29:52 +03:00
Dmitry Jemerov 252c4118eb report 'break' and 'continue' inside 'when' as errors (even if 'when' is nested in a loop) 2015-04-05 00:33:14 +03:00
Yan Zhulanow 1f16328070 Add imports for XML widget tags, support.v4 fake package files 2015-04-03 17:37:22 +03:00
Alexander Udalov 4474005183 Fix codegen tests and overloads diagnostic test 2015-04-03 01:38:31 +03:00
Alexander Udalov 6279421094 Minor, add test on Java enum with specialized entry 2015-04-02 21:57:53 +03:00
Alexander Udalov 72aa3d1465 Use mock JDK in compiler tests where full JDK is not needed
- move some of boxWithStdlib tests under fullJdk/ directory, where they will be
  compiled against the full JDK
- introduce FULL_JDK in-text directive for the reflection test as only 4 tests
  out of 654 needed the full JDK
2015-04-02 21:57:48 +03:00