Commit Graph

1691 Commits

Author SHA1 Message Date
Stanislav Erokhin fc9aa87a05 Report diagnostic on import with explicit import class if class was imported earlier. 2015-09-24 14:07:43 +03:00
Stanislav Erokhin 85895bec62 Improved error reporting, when we trying import invisible descriptor. 2015-09-24 13:53:56 +03:00
Stanislav Erokhin 1360f3cd43 Fix visibility checker for import. 2015-09-24 13:53:55 +03:00
Mikhail Glukhikh c4fb6d48c5 Object literals are now classes and expressions simultaneously for the purposes of annotation target checking 2015-09-23 16:47:07 +03:00
Mikhail Glukhikh dd4601fd08 Function literal is now expression and function simultaneously for purposes of annotation target checking 2015-09-23 16:47:04 +03:00
Mikhail Glukhikh 997e9a7dd7 Multi declaration is now a separate target in KotlinTarget 2015-09-23 16:46:44 +03:00
Mikhail Glukhikh 789f351f6f data modifier is now inapplicable to enum classes, annotations, objects and interfaces #KT-8302 Fixed 2015-09-23 16:33:11 +03:00
Mikhail Glukhikh 315a304c8e New modifier checking strategy: only one error but any number of warnings, a warning can never shadow an error 2015-09-23 16:33:08 +03:00
Mikhail Glukhikh 55c7df8b8d Deprecations: data class should now have at least one primary constructor parameter, parameters should be val / var and not vararg. 2015-09-23 16:33:05 +03:00
Mikhail Glukhikh 3d6253c27f abstract + data and sealed + data are also deprecated 2015-09-23 16:33:02 +03:00
Mikhail Glukhikh 038d955c23 Data classes cannot have class supertypes, a new test, relevant test fixes 2015-09-23 16:33:00 +03:00
Mikhail Glukhikh 58110cd0d1 open + data and inner + data are deprecated, a new test, relevant test fixes 2015-09-23 16:32:57 +03:00
Mikhail Glukhikh 731fdecf06 private / protected / internal modifiers are deprecated in interfaces, relevant tests changed 2015-09-23 16:32:54 +03:00
Denis Zharkov 098f5462eb Drop inlineOptions and fix forgotten usages 2015-09-23 12:18:12 +03:00
Denis Zharkov afd4e644a3 Report warning on usages of non-const vals in places where constants expected 2015-09-23 08:20:57 +03:00
Denis Zharkov 8d13f08271 Load static final fields of appropriate types from Java as const 2015-09-23 08:20:57 +03:00
Denis Zharkov b2b76d16d0 Add checks for const modifier applicability
1. Must be initialized in-place
2. Can not be open/abstract
3. Can not be an override
4. Can not be delegated
5. Initializer must be a compile-time constant
6. No getters
7. `const` is not applicable to vars or locals
8. `const val` should be whether top-level property or object member
2015-09-23 08:20:56 +03:00
Dmitry Jemerov 4ca434da54 remove support for 'trait' keyword 2015-09-22 15:00:24 +02:00
Mikhail Glukhikh ad302fcfba "field": control of accessor parameter name shadowing, test 2015-09-21 15:48:08 +03:00
Mikhail Glukhikh c24156ae84 "field": backing field usage deprecated warning, relevant diagnostics tests changed 2015-09-21 15:48:03 +03:00
Mikhail Glukhikh a1e3471d92 "field": deprecated warnings introduced, compiler tests migrated to the new syntax 2015-09-21 15:48:00 +03:00
Mikhail Glukhikh 9939f96c09 "field" reassignment: fix and test 2015-09-21 15:47:52 +03:00
Mikhail Glukhikh 9f640b00d9 "field": synthetic variable creation in accessors, codegen changed accordingly, a set of tests, relevant code fix (j2k) 2015-09-21 15:47:49 +03:00
Dmitry Petrov da026f1480 Report errors for annotations with BINARY or RUNTIME retention on file classes. 2015-09-21 12:11:53 +03:00
Dmitry Petrov 7f4ae52517 Generate annotations for single-file classes. 2015-09-21 12:10:40 +03:00
Stanislav Erokhin 1614de86d2 Support package directive for types 2015-09-18 21:00:21 +03:00
Stanislav Erokhin 69cb3f818d Use NewQualifiedExpressionResolver for resolve types 2015-09-18 21:00:20 +03:00
Stanislav Erokhin 8efbf4fc32 Fixed testdata -- removed package import 2015-09-18 21:00:20 +03:00
Stanislav Erokhin 3f2e2deea1 Minor. Improver import resolve, when some error happened 2015-09-18 21:00:19 +03:00
Stanislav Erokhin f8a018ae27 Introduced NewQualifiedExpressionResolver 2015-09-18 21:00:18 +03:00
Stanislav Erokhin 286d39b866 Import names from singleton but show CANNOT_IMPORT_ON_DEMAND_FROM_SINGLETON error 2015-09-18 21:00:17 +03:00
Zalim Bashorov f7e2c127b7 Switch to use FakeCallResolver in DelegatedPropertyResolver 2015-09-18 18:31:18 +03:00
Denis Zharkov 4850fd10f0 Regenerate test data containing rendered descriptors
Introduced '@' after each annotation
2015-09-18 10:14:39 +03:00
Denis Zharkov bae3320d52 Get rid of deprecated annotations in testData 2015-09-18 10:14:32 +03:00
Denis Zharkov 38bafaa35c Drop annotations deprecation related things: diagnostics, quickfixes 2015-09-18 09:34:25 +03:00
Alexander Udalov 57c81e9cbe Disallow arrays as upper bounds of type parameters
#KT-9189 Fixed
2015-09-17 21:15:20 +03:00
Mikhail Glukhikh 7dbd5b75cc Expected return type is in use now during function literal analysis #KT-9134 Fixed 2015-09-16 17:12:41 +03:00
Mikhail Glukhikh 1667f18d7c Receiver of a safe call is not null inside the call also for extension functions + a pair of tests #KT-9033 Fixed 2015-09-16 15:04:41 +03:00
Mikhail Glukhikh 22229af930 Annotation / modifier checking for setter parameters / for variables / multi declarations, tests, relevant test changes #KT-9145 Fixed 2015-09-16 09:51:37 +03:00
Alexander Udalov b4470de713 Improve inline diagnostics, report "nothing to inline" on the modifier 2015-09-15 13:11:16 +03:00
Alexander Udalov a946f787bc Fix exception from data class codegen for light classes
EA-66827
2015-09-15 13:11:16 +03:00
Yan Zhulanow 01b2d02196 Remove @get: @set:, reorder remaining annotation targets 2015-09-11 22:32:23 +03:00
Mikhail Glukhikh d4d633ea26 Combined identifier info for things like '(x + y).z' is no longer treated as 'z' identifier info + a pair of tests + code fix #KT-9126 Fixed 2015-09-11 21:06:09 +03:00
Alexander Udalov 085fc3bf87 Transform anonymous types even for public symbols
This became necessary when we removed the requirement to specify types for
public members, because otherwise everything fails not being able to locate the
anonymous class from another module

 #KT-9072 Fixed
 EA-72801
2015-09-11 19:51:42 +03:00
Mikhail Glukhikh 3770e7f49f Introduction of AnnotationTarget.CLASS as a replacement for CLASSIFIER (first step) 2015-09-11 17:59:40 +03:00
Alexander Udalov 3e5c8d1b79 Fix NPE on empty JVM name
#KT-9113 Fixed
2015-09-10 21:44:18 +03:00
Denis Zharkov df97496a16 Deprecate 'kotlin.throws' in favor of 'kotlin.jvm.Throws' 2015-09-10 20:39:05 +03:00
Mikhail Glukhikh 9b11b5300c Elvis DFA: now only left part is taken into account #KT-9100 Fixed
I had to fix a few incorrect tests using something like x!! in Elvis right part, and also one bug in our code
2015-09-10 17:50:57 +03:00
Denis Zharkov 7b3303c152 Report special diagnostic on inlineUsage with LOCAL_CONTINUE_AND_BREAK
Such usages should be removed by quckfixes
2015-09-10 10:04:59 +03:00
Denis Zharkov 04483eb826 Report custom diagnostic instead of symbol deprecation
For annotations that should be replaced with modifiers
2015-09-10 10:04:59 +03:00