Commit Graph

28401 Commits

Author SHA1 Message Date
Alexander Udalov 877129340f Revert "Rename Extension annotation to ExtensionFunctionType"
This reverts commit 460dad135c.

The old compiler will not see the new runtime correctly. Postponing this until
1.0
2015-11-30 19:24:58 +03:00
Alexander Udalov 745809c666 Rename TestlibTest -> StdlibTest 2015-11-30 19:19:20 +03:00
Mikhail Glukhikh fe04cc513b Original type is taken into account when intersecting possible types in resolve #KT-10232 Fixed 2015-11-30 19:09:44 +03:00
Alexander Udalov db2521ee67 Rework TestlibTest, use JUnit console runner instead of manual suite
The problem with the manually created suite was that it was created in setUp()
and so a lot of the hard work (compilation, test case lookup) was happening in
setUp(). If any exception is thrown in setUp(), tearDown() is not called,
leaving the application (~9000+ subsequent tests) in the inconsistent state.

Support JUnit 4 tests via JUnit4TestAdapter. Previously only a small number of
test classes were actually run because this test was looking only for JUnit 3
testcases.

Delete FilesTest#relativePath because it was testing a deprecated function
and was failing if run from the project root
2015-11-30 18:58:00 +03:00
Natalia Ukhorskaya 74b6f70c80 JDIEval: do not disable collection when invoke method using reflection 2015-11-30 18:46:40 +03:00
Michael Bogdanov df1641ff9b Fix for KT-10047: java.lang.VerifyError: Bad return type
#KT-10047 Fixed
2015-11-30 18:44:13 +03:00
Pavel V. Talanov 54addb4b1e Script run configuration: Set working directory to a directory containing script file by default 2015-11-30 18:21:06 +03:00
Pavel V. Talanov 5a55ee332e FileBasedDeclarationProviderFactory: stable order of files
Fixes DiagnosticsTestGenerated#testScriptAndClassConflict
2015-11-30 18:21:06 +03:00
Pavel V. Talanov 4a1c3f02fd Add basic tests for KotlinStandaloneScriptRunConfiguration 2015-11-30 18:21:05 +03:00
Pavel V. Talanov 7577a375ae Minor: use script name generating code to generate names for script run configurations 2015-11-30 18:21:04 +03:00
Pavel V. Talanov d6c7029c77 Compiler, Scripts: strip stacktrace when reporting exception on script execution 2015-11-30 18:21:04 +03:00
Pavel V. Talanov 567f946cb0 K2JVMCompiler: Do not report perf in script mode 2015-11-30 18:21:03 +03:00
Pavel V. Talanov 34793e63c7 Allow to run kts files as scripts from ide
Introduce KotlinStandaloneScriptRunConfiguration: configuration, type, producer, settings editor
2015-11-30 18:21:03 +03:00
Pavel V. Talanov 337701670c Refactor script registering in frontend and jvm backend 2015-11-30 18:21:02 +03:00
Pavel V. Talanov 6520e9aed6 Refactor: AnalyzerScriptParameter -> ScriptParameter 2015-11-30 18:21:02 +03:00
Pavel V. Talanov 0d10f0fcf9 Minor: Remove direct usages of ScriptNameUtil 2015-11-30 18:21:01 +03:00
Pavel V. Talanov 7956ebe46c Move script related stuff into a separate package 2015-11-30 18:21:00 +03:00
Pavel V. Talanov 89081d487f J2K KotlinScriptDefinition and simplify 2015-11-30 18:21:00 +03:00
Alexey Sedunov 15b7eca665 Move: Detect extension declaration by PSI instead of descriptor as extension descriptor maybe wrapper for Java method
#KT-10203 Fixed
2015-11-30 16:27:23 +03:00
Michael Bogdanov 1bf521c645 Don't generate accessors for @JvmField properties in primary constructor 2015-11-30 16:24:05 +03:00
Mikhail Glukhikh de37cb8f40 Generic types may not extend kotlin.Throwable #KT-9816 Fixed 2015-11-30 15:24:32 +03:00
Mikhail Glukhikh c6be69a483 No more reified types for catch parameter #KT-9742 Fixed 2015-11-30 15:24:24 +03:00
Dmitry Petrov f0e467e474 Rewrite mixed multiple- and single-condition 'when' properly.
#KT-10229 Fixed
2015-11-30 14:43:03 +03:00
Ilya Gorbunov f7a780f32c Extension contains for ranges: rename parameter item to value. 2015-11-30 14:12:11 +03:00
Ilya Gorbunov b4256f0c89 Replace increment with step in For Loop codegen for progressions 2015-11-30 14:12:10 +03:00
Ilya Gorbunov 661e288362 Introduce 'step' property in progressions instead of 'increment' 2015-11-30 14:12:05 +03:00
Natalia Ukhorskaya b8d0685b71 Do not analyze imports in codeFragments
EA-76222 - assert: GetModuleInfoKt$getModuleInfo$.invoke Fixed
2015-11-30 12:38:15 +03:00
Natalia Ukhorskaya d0355a793b Write lineNumbers for constructors 2015-11-30 12:25:51 +03:00
Natalia Ukhorskaya 3ec383dfca Debugger: find context element in file copy using UserData 2015-11-30 12:25:50 +03:00
Natalia Ukhorskaya 0d984ce8e2 Refactor AbstractLineNumberTest using assertEqualsToFile 2015-11-30 12:25:50 +03:00
Natalia Ukhorskaya 076e9c8dd1 Use debugProcess scope in KotlinPositionManager 2015-11-30 12:25:49 +03:00
Natalia Ukhorskaya 028016412e Convert DebuggerUtils to kotlin 2015-11-30 12:25:48 +03:00
Natalia Ukhorskaya 1136c5f54b Rename DebuggerUtils.kt 2015-11-30 12:25:48 +03:00
Natalia Ukhorskaya e3e5fce3eb Minor: fix warnings in SmartStepIntoHandler 2015-11-30 12:25:47 +03:00
Natalia Ukhorskaya 9bcc9e4b1d Smart step into for constructors 2015-11-30 12:25:46 +03:00
Natalia Ukhorskaya 062b27995c Debugger: do not change package name for debug function 2015-11-30 12:25:45 +03:00
Natalia Ukhorskaya 002aaaa908 Debugger: fix imports if context element is inside inline lambda 2015-11-30 12:25:45 +03:00
Natalia Ukhorskaya d2ef7b0ae0 Minor: get line start without whitespaces in KotlinExtraVariablesProvider
#KT-10183 Fxied
2015-11-30 12:25:44 +03:00
Natalia Ukhorskaya 0d486e1cfc Minor: fix warnings 2015-11-30 12:25:43 +03:00
Michael Nedzelsky 9a0520b30e fix EA-76198 (assert: KtElementImplStub.getContainingKtFile) 2015-11-30 10:49:03 +03:00
Alexander Udalov 460dad135c Rename Extension annotation to ExtensionFunctionType 2015-11-30 02:51:04 +03:00
Ilya Gorbunov 0a47d1cac2 Restore deprecated InputStream.iterator() with a replacement. 2015-11-29 04:38:28 +03:00
Ilya Gorbunov 941167e241 Revert "Drop deprecated toGenerator and toLinkedList." until RC 2015-11-29 04:37:45 +03:00
Ilya Gorbunov f8fe3e6c1d Restore dropped hidden declarations for binary compatibility until RC. 2015-11-29 04:37:35 +03:00
Nikolay Krasko 9e0e3aaebb Don't insert {} after 'else' and 'try' in infinished statements 2015-11-28 20:22:28 +03:00
Ilya Gorbunov 5301f3eb46 Fix contains usages in compiler. 2015-11-28 07:21:39 +03:00
Ilya Gorbunov 54b415593a Replacement upcasts parameter to the most specific supertype in case of contains, indexOf, lastIndexOf, remove, get, containsKey, containsValue. 2015-11-28 07:21:38 +03:00
Ilya Gorbunov de86e90103 Generate indexOf and lastIndexOf extensions for List. 2015-11-28 07:20:27 +03:00
Ilya Gorbunov c7d08ea599 Remove *Raw method usages from tests 2015-11-28 07:20:25 +03:00
Ilya Gorbunov a25f23a286 Apply @OnlyInputTypes on type parameter for contains, indexOf, lastIndexOf extensions for Iterables, Sequences and Arrays instead of @NoInfer on element parameter.
Provide covariant extensions annotated with @OnlyInputTypes:
 - Collection<T>: containsAll(Collection<T>),
 - MutableCollection<out T>: remove(T), removeAll, retainAll (Collection<T>),
 - List<T>: indexOf(T), lastIndexOf(T)
 - Map<out K, V>: get(K), containsKey(K), contains(K)
 - Map<K, V>: containsValue(V)
 - MutableMap<out K, V>: remove(K)
All *Raw extensions are deprecated.
2015-11-28 07:20:24 +03:00