Commit Graph

1182 Commits

Author SHA1 Message Date
Michael Bogdanov
576ead2afe Test for obsolete KT-3698: Static fields of primitive types and String must be compile-time constants
#KT-3698 Obsolete
2015-05-15 18:06:51 +03:00
Mikhail Glukhikh
147bca3d22 Enum deprecated syntax detection implemented and integrated into DeclarationsChecker.
A lot of tests was changed to refactor deprecated syntax. Six new tests were added to check deprecated syntax detection.
Diagnostic for "enum entry uses deprecated super constructor": constructor is highlighted
Diagnostic for "enum entry uses deprecated or no delimiter".
One warning removed.
2015-05-15 16:13:34 +03:00
Mikhail Glukhikh
1a312140e9 New enum syntax: Short constructor syntax introduced for entries, optional commas between entries, semicolon after entries. #KT-7605 Fixed.
Grammar changed accordingly.
Semicolons prohibited after an entry except the last one.
Only one initializer is allowed per entry.
EnumReferenceExpression AST node introduced.
Some tests fixed, a pair of new tests written. Kotlin code inside project fixed.
Formatter and intendation tests fixed accordingly.
Stub version is incremented.
2015-05-15 16:13:32 +03:00
Mikhail Glukhikh
cf741cb868 Enum parsing changed: first entries, then members. Grammar fixed accordingly.
A set of compiler tests and some plugin tests changed accordingly.
Compiler Kotlin code changed accordingly.
2015-05-15 16:13:27 +03:00
Michael Bogdanov
99cad4b43f Support default method invocation via super
#KT-5970 Fixed
2015-05-13 14:52:18 +03:00
Michael Bogdanov
3fbdf05921 Added some new test for java8 2015-05-13 14:52:18 +03:00
Dmitry Jemerov
4bdf598bfe compiler testdata: s/trait/interface 2015-05-12 19:43:17 +02:00
Dmitry Jemerov
9975bb8935 replace 'trait' keyword with 'interface' in user-visible messages and code generation tools 2015-05-12 11:49:37 +02:00
Michael Bogdanov
d6964525b2 Fix for KT-7490: Bad bytecode generated by delegates and lambdas
#KT-7490 Fixed
2015-05-12 12:06:11 +03:00
Denis Zharkov
849b8acbf8 Replace annotations with brackets in testData
Just in tests that changed after deprecation
2015-05-07 22:36:16 +03:00
Natalia Ukhorskaya
9108d87a57 Add warning for division by zero:
#KT-5529 fixed
2015-05-07 15:41:37 +03:00
Michael Bogdanov
e0aa64b8d2 Support functional expression in non-local returns 2015-05-05 12:47:56 +03:00
Denis Zharkov
44a55e5bf6 Adjust testData to new labels syntax 2015-04-29 14:03:11 +03:00
Michael Bogdanov
0854c601b4 Fix non local returns to functional expressions 2015-04-24 18:54:09 +03:00
Alexander Udalov
0dec1eaaad Refactor RuntimeTypeMapper, extract IntrinsicObjects-related behavior
Make it similar to other JavaToKotlinClassMapBuilder implementations to be able
to get rid of that inheritance
2015-04-24 02:09:04 +03:00
Alexander Udalov
07c2442405 Make $default methods non-private, avoid generating accessors for them
#KT-5786 Fixed
2015-04-23 22:09:02 +03:00
Michael Bogdanov
53b8a1d56e Fix for KT-7544: Backend fails when inlining nested calls with reified type parameter and default value parameter
#KT-7544 Fixed
2015-04-23 15:41:59 +03:00
Denis Zharkov
29bf24b7d3 Use properties of Java annotations in codegen tests
Retain obsolete versions until support for methods in Java annotations is dropped
2015-04-23 08:27:42 +03:00
Zalim Bashorov
1ef9b9db1f JS backend: add the support function expression
#KT-7242 Fixed
2015-04-22 12:48:22 +03:00
Zalim Bashorov
02071c5bdd Minor: move function expression tests to separate directory 2015-04-22 12:48:21 +03:00
Michael Bogdanov
2f88f830b8 Test for KT-5969: Codegen overrides all java 8 default methods with delegation to unexisting Timpl
#KT-5969 Fixed
2015-04-18 14:45:16 +03:00
Michael Bogdanov
115c4b78c0 Added sam test on java8 interface with default method 2015-04-18 14:45:16 +03:00
Michael Bogdanov
7e3403f602 Add java8 test module and run configuration with initial test 2015-04-18 14:45:15 +03:00
Michael Bogdanov
48aef1eb28 Fix for KT-6895: Compile error on Android (EXCEPTION FROM SIMULATION) when declaring locals in an inline function
#KT-6895 Fixed
2015-04-17 14:24:35 +03:00
Michael Bogdanov
0080ebd386 Fix for KT-7273: Bad local variable type when using non-local return
#KT-7273 Fixed
2015-04-17 14:24:34 +03:00
Denis Zharkov
b2a2e4ae92 Add bytecodeText test for annotation with default value
It checks that no value is emitted if argument is not specified
2015-04-16 10:40:20 +03:00
Denis Zharkov
f5111180c3 Load Class<?> as KClass<*> for Java annotations parameters 2015-04-16 10:40:20 +03:00
Denis Zharkov
cc17f7d82d JVM: Support using KClass as annotation parameter type 2015-04-16 10:40:19 +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
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
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
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
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
c582b1d9ce Generate linenumber if needed after inlining 2015-04-09 09:25:26 +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
a29c0ff9a3 Use default value if annotation vararg argument is empty 2015-04-07 19:31:30 +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