Commit Graph

7394 Commits

Author SHA1 Message Date
Alexander Udalov 8425f2e668 Copy type parameters for JVM function accessors
Otherwise generic signature wasn't correctly written to accessors, resulting in
classfiles not being valid and javac failing to compile Java sources against
them
2014-02-26 21:22:57 +04:00
Andrey Breslav fbdba0f48d Test data fixed 2014-02-26 20:48:45 +04:00
Andrey Breslav a7135fee06 Report CLASS_OBJECT_NOT_ALLOWED for local classes 2014-02-26 19:42:05 +04:00
Tuomas Tynkkynen 3e451c5811 Disallow break or continue across a function boundary
Code containing breaks or continues that attempt to jump across a
function boundary weren't detected during analysis but would crash
the compiler during code generation. Add diagnostics for these kinds
of errors.

Example:

fun f() {
    while (true) {
        fun inner() {
            continue
        }
    }
}

 #KT-4334 Fixed
2014-02-26 00:14:42 +02:00
Tuomas Tynkkynen 7a2321460d Prevent expression selector from selecting just a label
Previously, extract variable could act on e.g. 'break@outerLoop' and
extract the label, leading into nonsensical 'val x = @outerLoop'.
Prevent JetRefactoringUtil.selectExpression from returning label
expressions to fix this.

 #KT-4515 Fixed
2014-02-24 22:40:14 +04:00
Alexander Udalov 4968afebf8 Don't generate bodies of built-in stub methods into interfaces 2014-02-24 21:44:42 +04:00
Zalim Bashorov fc42f3e3ab Remove unnecessary outdated code from JavaPsiFacadeKotlinHacks. 2014-02-24 20:27:19 +04:00
Zalim Bashorov 033b8289d7 Get JavaFileManager as service.
Fix tests after update to IDEA 134.1160 EAP.
2014-02-24 20:27:19 +04:00
Zalim Bashorov 62afa2c742 Update to IDEA 134.1160 EAP 2014-02-24 20:27:19 +04:00
Andrey Breslav 09ee7c5f05 Merge pull request #385 from Stebalien/fix-jetkeywordtoken-docstrings
Fix JetKeywordToken docstrings
2014-02-24 17:47:59 +03:00
Andrey Breslav b999174432 Do not pass BindingTrace into TopDownAnalyzer 2014-02-24 17:27:06 +04:00
Andrey Breslav c05d4a4837 Unneeded wrapping removed 2014-02-24 17:27:06 +04:00
Andrey Breslav 23527c927b Unused parameter removed 2014-02-24 17:27:01 +04:00
Andrey Breslav 50a160afb1 Do not pass TopDownAnalysisParameters to injectors 2014-02-24 17:26:04 +04:00
Andrey Breslav c4dbfbf1a9 Do not inject TopDownAnalysisParameters into ScriptHeaderResolver 2014-02-24 17:26:03 +04:00
Andrey Breslav 153d8c2a52 Do not inject TopDownAnalysisParameters into OverrideResolver 2014-02-24 17:26:02 +04:00
Andrey Breslav d4a6374d76 Do not inject TopDownAnalysisParameters into ControlFlowAnalyzer 2014-02-24 17:26:02 +04:00
Andrey Breslav 42c7c54ea0 Do not inject TopDownAnalysisParameters into BodyResolver 2014-02-24 17:26:02 +04:00
Andrey Breslav 442658396d BodiesResolveContext exposes TopDownAnalysisParameters 2014-02-24 17:26:01 +04:00
Andrey Breslav fb0713d1c2 Do not inject TopDownAnalysisParameters into TopDownAnalyzer 2014-02-24 16:40:05 +04:00
Andrey Breslav 4e0df6fd80 Do not create TopDownAnalysisContext in injectors 2014-02-24 15:52:57 +04:00
Andrey Breslav f5d2e1f7aa Do not inject TopDownAnalysisContext into TypeHierarchyResolver 2014-02-24 15:52:56 +04:00
Andrey Breslav 8b88cc8aec Do not inject TopDownAnalysisContext into OverrideResolver 2014-02-24 15:52:55 +04:00
Andrey Breslav 1abaa9ff20 Do not inject TopDownAnalysisContext into OverloadResolver 2014-02-24 15:52:55 +04:00
Andrey Breslav 25e533a42d Do not inject TopDownAnalysisContext into ScriptHeaderResolver 2014-02-24 15:52:55 +04:00
Andrey Breslav 7e43f2e61e Do not inject TopDownAnalysisContext into ImportsResolver 2014-02-24 15:52:54 +04:00
Andrey Breslav 72a62626df Do not inject TopDownAnalysisContext into DeclarationResolver 2014-02-24 15:52:54 +04:00
Andrey Breslav e3744cff7c Do not inject TopDownAnalysisContext into ScriptBodyResolver 2014-02-24 15:52:54 +04:00
Andrey Breslav 5976a91998 Do not inject TopDownAnalysisContext into TopDownAnalyzer 2014-02-24 15:52:53 +04:00
Andrey Breslav f32d8b1d06 Do not inject BodiesResolveContext into BodyResolver 2014-02-24 15:52:53 +04:00
Andrey Breslav 5b67cf67eb Usages of expressionTypingServices from ExpressionTypingContext are replaced with injection
The basic principle behind this change is that no context object should store components.
Components should be injected instead, and contexts only carry parameters around.

Particular changes:
- resolveCallWithGivenName() and resolveBinaryCall() moved to CallResolver
- ForLoopConventionsChecker introduced to confine checking conventions for Iterator and Iterable
- ExpressionTypingComponents introduced to deliver necessary components to ExpressionTypingVisitor's
- Some static methods became non-static to get access to injected components
- ExpressionTypingUtils and ControlStructureTypingUtils became components (got state injected) to avoid passing parameters around
2014-02-24 15:52:52 +04:00
Andrey Breslav 7b89af320c scopeForVisibility replaced with containingDeclaration which is enough 2014-02-24 15:52:52 +04:00
Andrey Breslav 9c3d13940e Typo fixed in the method name 2014-02-24 15:52:52 +04:00
Andrey Breslav db73481fac Minor: @NotNull added 2014-02-24 15:52:51 +04:00
Steven Allen 9f901d87fe Fix JetKeywordToken docstrings
They were flipped.
2014-02-23 01:37:46 -05:00
Alexander Udalov 4117d04742 Don't use FileUtil in BuiltInsSerializer
See the comment
2014-02-21 20:49:12 +04:00
Alexander Udalov 4a603f1268 Minor, specify types for clarity 2014-02-21 20:38:02 +04:00
Andrey Breslav ff762a4467 Use JDK annotations downloaded from a KAnnotator build 2014-02-21 19:23:41 +04:00
Nikolay Krasko f14ff9405d Force resolve descriptor type 2014-02-20 16:31:24 +04:00
Nikolay Krasko a2c567da93 Common injector for lazy resolve with java lazy resolve 2014-02-20 16:31:22 +04:00
Nikolay Krasko 2ef879ea3e Search classes by qualified name only in sources to prevent recursion 2014-02-20 16:31:21 +04:00
Nikolay Krasko 064612f0f3 Add cache delegating to lazy resolve session for source classes search 2014-02-20 16:31:10 +04:00
Nikolay Krasko 0448736a4c Refactoring: remove unused methods 2014-02-20 16:27:49 +04:00
Nikolay Krasko 592969bad1 Rewrite utils method for qualified names to Kotlin 2014-02-20 16:17:51 +04:00
Nikolay Krasko ac4fe93774 Add ability to filter out some particular classes from generator 2014-02-20 16:17:38 +04:00
Nikolay Krasko e13d568a34 Refactoring: Simplify subclass graph 2014-02-20 16:08:09 +04:00
Nikolay Krasko e946f1abba Refactoring: remove LightClassStubWithData, use generics for KotlinJavaFileStubProvider 2014-02-20 16:08:09 +04:00
Andrey Breslav 623b169d71 When building light classes don't resolve irrelevant declarations in the same package 2014-02-20 16:08:08 +04:00
Andrey Breslav 783258d91a Forced resolution of all contents enhanced 2014-02-20 16:08:07 +04:00
Andrey Breslav a2c66f7cc4 Using lazy resolve when building light classes 2014-02-20 16:08:06 +04:00