Commit Graph

51 Commits

Author SHA1 Message Date
Ilya Chernikov
f125600af1 Restore returning of functional types from repl eval
add tests for the broken case as well for the return value representation
#KT-29490 fixed
2019-01-29 15:05:37 +01:00
Ilya Gorbunov
903976d9af Replace hashCode usages in tests where it was supposed to fail on nullable receiver
Related to #KT-25039
2018-09-10 06:41:49 +03:00
Mikhael Bogdanov
a79c2bf999 Write script descriptor type to ASM_TYPE slice
#KT-20707 Fixed
2017-10-10 17:01:23 +02:00
Alexander Udalov
cbb6269391 REPL: do not report warnings when there are errors
#KT-18349 Fixed
2017-06-08 12:28:06 +03:00
Alexander Udalov
6f22baa0f6 REPL: improve "are all errors at EOF" detection
Also ignore whitespaces and comments that appear after the last error in
a REPL line

 #KT-15172 Fixed
2017-06-08 12:26:54 +03:00
Alexander Udalov
26e3d2cf5d Use TopLevelDeclarations analysis mode in REPL
#KT-12564 Fixed
2017-06-06 14:00:45 +03:00
Mikhail Zarechenskiy
47f2386212 Generate non-local destructuring declarations as properties
#KT-5620 Fixed
 #KT-15810 Fixed
2017-05-25 16:46:05 +03:00
Alexander Udalov
18a211cb84 Add regression test for obsolete issue
#KT-17365
2017-05-18 13:29:02 +03:00
Ilya Chernikov
15ccd28e2e Switch old IDE/CLI repls to the new infrastructure
should also fix #KT-5822
2017-05-03 18:11:45 +02:00
Alexander Udalov
8ffe379c92 Use separate module analysis in CliReplAnalyzerEngine 2016-10-06 14:40:21 +03:00
Pavel V. Talanov
5d31d6d98d REPL: call 'toString()' for returned values explicitly and correctly report exceptions
#KT-12389 Fixed
2016-06-23 16:12:03 +03:00
Pavel V. Talanov
5058e9b4e6 Fix import resolution in Repl
#KT-11428 Fixed

 Refactor ReplState to be a component
2016-05-24 15:41:56 +03:00
Mikhael Bogdanov
c06b51c1d1 Allow top-level local delegated properties in scripts 2016-05-13 19:11:23 +03:00
Mikhail Glukhikh
60511f010a Build fix: evaluationErrors.repl 2016-03-31 14:34:56 +03:00
Pavel V. Talanov
a4c005fefd Update existing test data depending on diagnostic parameter rendering 2016-02-26 14:45:11 +03:00
Ilya Gorbunov
25c4453dc5 Cleanup deprecated symbol usages in testData 2016-01-22 05:54:38 +03:00
Pavel V. Talanov
ad58617753 Script refactoring, codegen tests: change test data according to semantics change
Add some new tests for uncovered cases
2015-11-19 22:57:01 +03:00
Mikhail Glukhikh
37ecf5def5 Fix: bridges are now generated for non-final functions of Kotlin built-in classes 2015-10-14 20:40:23 +03:00
Alexander Udalov
661f4efc68 Forbid callable references to members and extensions with empty LHS
This syntax is reserved to be likely used in the future as a shorthand for
"this::foo" where the resulting expression doesn't take the receiver as a
parameter but has "this" already bound to it
2015-10-03 04:37:04 +03:00
Denis Zharkov
dcb84a7d0a Make annotations-modifiers private and fix some lost usages
It's needed to prevent usages of them as real annotation/type.
But we can't remove them, because currently some modifiers
are artificially resolved as annotations of those classes.
2015-09-23 12:18:12 +03:00
Dmitry Kovanikov
ac6a9d95af [test] Fix testData for AbstractReplInterpreterTest 2015-09-21 14:41:31 +03:00
Ilya Gorbunov
e40a5457e3 Fix deprecations in testData: arrayOf usages. 2015-09-19 04:32:56 +03:00
Michael Nedzelsky
f717806138 fix tests in org.jetbrains.kotlin.repl 2015-09-08 02:04:54 +03:00
Mikhail Glukhikh
b2653ad1e9 Deprecated enum syntax removed: most compiler tests 2015-08-10 16:24:12 +03:00
Pavel V. Talanov
2896ec67ba Support synthetic java properties in REPL
Use brand new iterable injection
2015-07-16 18:05:44 +03:00
Alexander Udalov
54dfd626ab CLI: improve diagnostic message format
- render the whole line where the error/warning points to, if any, and another
  line with '^', like other compilers do
- lowercase diagnostic severity
- decapitalize the message if it doesn't start with a proper name
2015-06-15 15:42:41 +03:00
Denis Zharkov
c9f79c2d05 Adjust testData: get rid of obsolete annotations 2015-06-12 09:23:31 +03:00
Dmitry Jemerov
4bdf598bfe compiler testdata: s/trait/interface 2015-05-12 19:43:17 +02:00
Alexander Udalov
cf0842b135 Fix initialization order in REPL
#KT-6843 Fixed
2015-02-22 16:12:38 +03:00
Svetlana Isakova
9d366cb896 Prohibit local objects and enum classes
#KT-5402 Fixed
  #KT-4838 Fixed

Resolve type of object inside local object as special, not supertype('Any').
Changed visibility of constructor of anonymous object to 'internal' to be able to resolve the following:
fun box(): String {
    var foo = object {
        val bar = object {
            val baz = "ok"
        }
    }
    return foo.bar.baz
}
The containing declaration of property initializers is constructor, so 'baz' was invisible inside private constructor.
2014-09-01 12:32:52 +04:00
Alexander Udalov
9c00e1c94d Scripts: coerce result to the actual expression type
#KT-5622 Fixed
2014-08-13 17:19:53 +04:00
Alexander Udalov
844845c6e3 REPL: sanitize stack traces
Don't include our compiler's and preloader's internal code, reflection, native
methods etc. Also delete "substring" matching logic from tests
2014-08-13 15:42:10 +04:00
Alexander Udalov
6eb5567895 REPL: fix open parenthesis not triggering "incomplete"
Check if all of the syntax errors are at EOF, not that there's a single one.
In case of open parenthesis two syntax errors are reported for some reason
2014-08-13 15:13:25 +04:00
Alexander Udalov
4213ce318e REPL: don't fail on a callable reference
There should probably be a special kind of property, but at least it won't
throw an exception for now
2014-08-13 15:13:24 +04:00
Alexander Udalov
415fe7a5e6 Initial support for classes in scripts and REPL 2014-08-13 15:13:22 +04:00
Alexander Udalov
c873806b54 Refactor "incomplete line" handling in REPL tests 2014-08-13 15:13:21 +04:00
Alexander Udalov
c6dfa866cd Refactor REPL tests: use empty line instead of "null" 2014-08-13 15:13:19 +04:00
Alexander Udalov
a79398fa00 Don't load Object as a supertype for Java classes
#KT-4890 In Progress
 #KT-5002 Fixed
2014-07-25 21:19:37 +04:00
Ilya Ryzhenkov
98c54f39bb Unify script file extensions to "kts" so that IDEA, compiler and tests agree when to parse as SCRIPT.
Include kt* files into formatter test generation, to test scripting formatting
2014-03-24 18:17:50 +04:00
Alexander Udalov
f7b6457139 Replace "jet" package name with "kotlin" in testData 2014-03-02 19:55:26 +04:00
Michał Sapalski
7deec28b9c Adjusted tests to the new DescriptorRenderer behaviour 2013-04-29 15:44:07 +04:00
Stepan Koltsov
cd1211fcb3 repl: multiline 2012-06-28 19:38:44 +04:00
Stepan Koltsov
85737609b2 missing file 2012-06-14 18:49:31 +04:00
Stepan Koltsov
1c306eefd8 test for repl evaluation exception 2012-06-14 18:30:49 +04:00
Stepan Koltsov
970c2ae1f9 do not exit repl if something went wrong 2012-06-14 18:30:49 +04:00
Stepan Koltsov
1d0ef01eea REPL overload resolution ambiguity
Fix overload resolution ambiguity in REPL. Note, resolution for
functions declared in script is very different from regular programs:
in scripts function declared later wins. See
functionOverloadResolutionAnyBeatsString for example.

#KT-2272 Fixed
2012-06-14 14:06:17 +04:00
Stepan Koltsov
55ffd797a4 test imports work in the following lines of REPL 2012-06-13 22:32:36 +04:00
Stepan Koltsov
b0553ff651 properly handle empty lines in REPL 2012-06-09 23:25:41 +04:00
Stepan Koltsov
f11767319a repl: fix two anonymous functions 2012-06-09 23:25:40 +04:00
Stepan Koltsov
6946abbcea working on REPL: implemented previous lines importing 2012-06-08 04:19:24 +04:00