Commit Graph

193 Commits

Author SHA1 Message Date
Andrey Breslav
d22f4eb144 Rename getOutType() -> getType() 2012-02-24 18:50:40 +04:00
Andrey Breslav
1f4f4e5c24 Remove the annoying misconcetion in the naming. 2012-02-24 18:39:35 +04:00
Stepan Koltsov
e0fae55ee4 read kotlin class objects from binary classes 2012-02-22 22:11:08 +04:00
Stepan Koltsov
b9bc882bf9 useless constructor modality parameter 2012-02-22 22:10:58 +04:00
Stepan Koltsov
16f76982d1 assert JetLightClass is not parsed as regular PsiClass 2012-02-22 22:10:54 +04:00
Stepan Koltsov
62ddef4734 fix tests after javabean properties parsing 2012-02-22 00:38:14 +04:00
Stepan Koltsov
f83c5e0d83 read java bean properties as kotlin properties 2012-02-21 23:15:36 +04:00
Alex Tkachman
cc8d263f9e preliminary support for intrinsics in std lib. javaClass<T> 2012-02-21 20:37:38 +02:00
Stepan Koltsov
2796c914c4 remove unused code in JavaDescriptorResolver 2012-02-21 21:30:02 +04:00
Stepan Koltsov
b59970a610 JDR: work with names, not with PsiSomething
This should fix (or hide) problems like
http://ea.jetbrains.com/browser/ea_problems/33857
2012-02-21 21:10:25 +04:00
Stepan Koltsov
66e7945f29 minor JDR refactoring
* function descriptor cache is no longer needed in JDR
* fixed incorrect assertion
* removed unused parameter
* better exception message

Related to http://ea.jetbrains.com/browser/ea_problems/33872
2012-02-21 20:44:56 +04:00
Stepan Koltsov
aacf63ff6f reading annotations from bytecode
(without fields yet)
2012-02-21 20:16:11 +04:00
Alex Tkachman
fb8fa8bf9e intrinsic renamed to Intrinsic 2012-02-21 15:31:05 +02:00
Alex Tkachman
5e7de3f5ab getting rid of JetObject.getOuterObject 2012-02-21 15:13:16 +02:00
Alex Tkachman
8b622f97f4 getting rid of TypeInfo 2012-02-21 14:54:00 +02:00
Stepan Koltsov
a1d88a0877 recognize @NotNull
http://youtrack.jetbrains.com/issue/KT-129
2012-02-20 22:37:06 +04:00
Stepan Koltsov
5eb483b7a7 better error reporting on incomplete hierarchy in JDR 2012-02-20 21:28:10 +04:00
Stepan Koltsov
e4658efbd1 fix copy-paste in JDR 2012-02-20 21:27:58 +04:00
Svetlana Isakova
046c13a264 KT-1041 Add check that thrown/catched expression is of Throwable type 2012-02-20 14:03:39 +04:00
Stepan Koltsov
b49c7f332c unused code in JavaDescriptorResolver 2012-02-19 22:31:05 +04:00
Stepan Koltsov
1172e49f8a cleanup after refactoring
merge property- and named-function- related code in OverrideResolver
2012-02-19 22:02:40 +04:00
Stepan Koltsov
ca8cf6cb49 missing error report on incompatible declaration
===
open class Aaaa() {
    fun bb() = 1
}

class Bbbb() : Aaaa() {
    fun <T> bb() = 1
}
===
2012-02-19 22:02:33 +04:00
Stepan Koltsov
da0db20ed5 JavaDescriptorResolver: initialize outer class first
Outer class must be initialized before inner class because inner class
because inner class needs a reference to outer class.

Fixes http://youtrack.jetbrains.com/issue/KT-1324
2012-02-18 00:08:58 +04:00
Stepan Koltsov
d2a137d944 fix reading of jet signature with type parameter referencing self
===
class Something<A : Comparable<A>>
===

reported by Max

Also merge copy-paste in JavaDescriptorResolver
2012-02-17 22:32:11 +04:00
Stepan Koltsov
cbdeb23935 cleanup in JavaDescriptorResolver 2012-02-15 00:34:28 +04:00
Stepan Koltsov
274406b72b cleanup in JavaDescriptorResolver 2012-02-15 00:22:02 +04:00
Stepan Koltsov
81cf9b36ff cleanup in JavaDescriptorResovler 2012-02-15 00:13:33 +04:00
Stepan Koltsov
b67bb356bd fix inner classes in JavaDescriptorResolver, kill type variable by psi resolver 2012-02-15 00:02:06 +04:00
Stepan Koltsov
9248cf9659 Important JavaDescriptorResolver refactoring
This patch implement own member filling with supertype scope. Before this patch JDR relied on
Idea hierarchy resolver.

This patch does two things:

* copies FunctionDescriptors from supertype scopes
* rewrites containingDeclaration similary to how it is done in previous patch

Patch is incomplete, in particular properties are not yet initialized properly, code needs cleanup,
however the most important part of refactoring is done, and tests pass.
2012-02-15 00:02:03 +04:00
Stepan Koltsov
9a41ab3dd6 properly create JavaNamespaceDescriptor for java.lang 2012-02-14 23:40:03 +04:00
Stepan Koltsov
5979cd774c minor diag in JavaDescriptorResolver 2012-02-14 23:39:31 +04:00
Maxim Shafirov
a03922d467 Copyrights set to Apache, reflecting it's now open source 2012-02-14 19:25:06 +04:00
Stepan Koltsov
4b94eb5e2b rewrite owner when copying FunctionDescriptor from supertype scope
that fixes invocation:

>>> StringBuilder.length()

that was compiled to

>>> invokevirtual CharSequence.length()

and now compiles to

>>> invokevirtual StringBuilder.length()

Essentially patch rewrites FunctionDescriptor.containingDeclaration
when FunctionDescriptor is copied to subclass scope.

FunctionDescriptor now has kind field that can be
* DECLARATION (for "real" function, maybe abstract)
* DELEGATION
* FAKE_OVERRIDE (created for functions from supertypes)

All tests pass although some parts of code are buggy and ugly.

Random comments about this patch:

* FunctionDescriptor.overrides point to function descriptors of supertype scopes

* Filling of memberScope with supertypes is moved to OverrideResolver

* ExpressionCodegen.intermediateValueForProperty must be rewritten

* Patch adds not nice REDECLARATION reports (see compiler/testData/diagnostics/tests/*).
  Will be fixed later.
2012-02-10 20:36:40 +04:00
Nikolay Krasko
21394c8486 - KT-1232 Do not place import with default imports in scope after completion
- Don't activate not-in-scope completion on typing by default
2012-02-10 16:27:05 +04:00
Nikolay Krasko
f1a2866f0c KT-1223 Code completion for imported from jars extension functions - don't mute ProcessCanceledException in hack 2012-02-10 14:10:52 +04:00
Nikolay Krasko
3c1758c041 Very temp commit for getting top level function descriptions from java package 2012-02-09 21:05:03 +04:00
Stepan Koltsov
d69739a3d2 temp hack against KT-1214 2012-02-09 16:34:30 +04:00
Maxim Shafirov
f91fa19ea1 memoize psiClass() 2012-02-06 22:09:28 +04:00
Nikolay Krasko
38817014d5 KT-1051 Java interoperability completion (class and subpackages completion) 2012-02-02 14:28:32 +04:00
Stepan Koltsov
0739332d97 Sometimes PsiClass'es are loaded twice for same class
This patch is workaround to fix tests.
2012-02-01 21:54:20 +04:00
Stepan Koltsov
a9dedab481 better diag in JavaDescriptorResolver 2012-02-01 17:24:25 +04:00
Stepan Koltsov
e075bec4c0 JavaDescriptorResolver refactoring
* kill JavaDescriptorResolver.typeParameterDescriptorCache
* use ClassOrNamespaceDescriptor instead of DeclarationDescriptor

Code is a bit ugly now, but simpler than before.
2012-01-31 22:48:55 +04:00
Maxim Shafirov
f3f725c94f Code moved to IDEA core 2012-01-31 21:31:51 +04:00
Maxim Shafirov
59c6bd184d Proper alt class -> sources navigation“ 2012-01-31 18:57:01 +04:00
Maxim Shafirov
379e066dac Correct finder implementation for inner classes 2012-01-31 15:50:59 +04:00
Andrey Breslav
b9ab6d1af2 Fix resolve tests: now the results are checked against alt-headers 2012-01-31 15:43:56 +04:00
Andrey Breslav
1bca00ea96 A stub workaround for exception thrown when something is annotated with @Retention(RetentionPolicy.RUNITME) or something like this 2012-01-31 14:50:00 +04:00
Nikolay Krasko
2826db7d9a KT-1103 Public outer function from different package and source file is not visible in completion:
- Stubs elements are enabled
- Changed method for selecting indexing policy for plugin and compiler
- Quick fix for import unresolved top-level function added
2012-01-31 14:10:08 +04:00
Maxim Shafirov
dbbd4c6902 Make sure alt-headers actually work in "core" environment 2012-01-31 13:37:40 +04:00
svtk
1d71e820bb KT-1185 Support full enumeration check for 'when' 2012-01-30 13:39:44 +04:00