Commit Graph

333 Commits

Author SHA1 Message Date
Alexey Tsvetkov d1156211a8 Make JS header/impl name clash checks independent of sources order
If an impl source was placed before a header in a sources list,
the JS_NAME_CLASH error would be reported.
2016-12-15 16:43:35 +03:00
Mikhael Bogdanov 268d55104c Don't generate delegation to java default methods
#KT-15226  Fixed
2016-12-14 11:20:04 +01:00
Stanislav Erokhin 653d589f98 FIx tests after renaming platform to header. 2016-12-13 23:08:47 +03:00
Mikhail Glukhikh 57da92b862 Infrastructure change: module descriptor now knows its platform kind & its sources kind 2016-12-13 18:53:55 +03:00
Stanislav Erokhin 59efedf610 Rename platform to header. 2016-12-13 18:00:00 +03:00
Alexey Andreev 9dc16f0564 JS: prohibit runtime annotations on external declarations. Warn about runtime annotation in remaining cases. See KT-13895 2016-12-13 13:58:41 +03:00
Alexey Andreev e54138b74f JS: use temporary names while translation, replace with fixed name during post-processing pass 2016-12-12 14:30:42 +03:00
Alexey Andreev 2df9daab1f JS: prohibit private inline members of external classes, since KT-14031 was postponed 2016-12-09 15:13:10 +03:00
Alexey Andreev df34e69d7d JS: prohibit inheritance of external classes from non-external (see KT-15130) 2016-12-09 15:13:09 +03:00
Alexey Andreev fff1af4ff6 JS: allow to inherit external classes with overloaded functions in case we don't override them (see KT-13910). 2016-12-09 15:13:09 +03:00
Alexey Andreev ecb498717a JS: rework diagnostics names. Prohibit external inner classes (see KT-14027) 2016-12-09 15:13:08 +03:00
Alexey Andreev cf8161507c JS: prohibit private members of external classes (see KT-14029) 2016-12-09 15:13:08 +03:00
Alexey Andreev 3882bf7564 JS: prohibit native (external) extension properties and functions. See KT-13896 2016-12-09 15:13:07 +03:00
Alexey Andreev cc819928de JS: prevent Any.equals from mangling 2016-12-09 12:04:31 +03:00
Alexey Andreev a2d45153ba JS: prohibit dynamic on RHS of in and !in operators (see KT-6579) 2016-12-09 12:03:52 +03:00
Alexey Andreev fc6eaa015f JS: prohibit using more than one argument in indexed access with dynamic receiver (see KT-6580) 2016-12-09 12:03:51 +03:00
Alexey Andreev d0ffb5bd32 JS: add restrictions to external modifier according to KT-13893 2016-12-08 15:41:42 +03:00
Alexey Andreev a7ce770cb4 Don't report error for properties and functions without body that either external by themselves or are members of external classes 2016-12-08 15:41:40 +03:00
Alexey Andreev 68412ae94f JS: replace all usages of @native annotation with external modifier, in tests, stdlib, etc 2016-12-08 15:41:39 +03:00
Alexey Andreev e0cb56b3c3 JS: use external modifier instead of @native annotation 2016-12-08 15:41:39 +03:00
Alexey Andreev df88ebb1b3 KT-12877: don't throw exception when @JsModule annotation is improperly used 2016-12-03 17:15:11 +03:00
Alexey Andreev d40e923722 KT-12877: minor fixes and cleanup 2016-12-03 17:15:10 +03:00
Alexey Andreev 31a1d6ca66 KT-12877: add diagnostics on JsModule/JsNonModule:
1) for all cases of misusing of JsModule report on JsNonModule as well
2) report about non-top-level declarations with JsModule/JsNonModule
3) report about JsModule/JsNonModule declarations inside file marked with JsModule/JsNonModule
4) report about usages of declarations not marked with both JsModule and JsNonModule from UMD module
2016-12-03 17:15:08 +03:00
Alexey Andreev 0238b182cc KT-12877: add JsNonModule with support on front-end 2016-12-03 17:15:07 +03:00
Alexey Andreev 3f2ec6871d KT-12877: add some front-end diagnostics for JsModule 2016-12-03 17:14:30 +03:00
Alexey Andreev ac703dfda6 KT-12877: serialize information about file annotations. For each top-level declaration store containing file. Use this information to properly handle file-targeted JsModule. 2016-12-03 17:14:29 +03:00
Alexey Andreev 6df40559f0 KT-12877: initial simple implementation of JsModule. Remove unnecessary ModuleDescriptor from several classes in pipeline 2016-12-03 17:14:28 +03:00
Mikhail Zarechenskiy 240d82d167 Move reified type parameter checker to additional checkers to able turn it off by demand 2016-12-01 10:06:38 +03:00
Alexander Udalov 8d3f6f1ce7 Check platform<->impl declaration compatibility
For each platform declaration, there must be at least one impl declaration in
the module with the compatible signature; similarly, for each impl declaration,
there must be at least one platform declaration with the compatible signature.

Note that currently the presence of the 'impl' modifier is not checked yet.

Also, the sad fact is that if you have platform and impl declarations which are
not compatible, you get two errors: on the platform delcaration and on the impl
declaration. This needs to be addressed as well
2016-11-25 20:50:26 +03:00
Alexander Udalov a4169416ad Support platform modifier in back-ends, add multi-platform integration test
Skip 'platform' declarations completely in back-ends
2016-11-25 20:50:22 +03:00
Alexey Andreev c581ec6dd6 JS: fixes after code review 2016-11-25 14:07:31 +03:00
Alexey Andreev 2eb54f234c JS: prohibit passing native interfaces to reified type parameters 2016-11-25 14:07:29 +03:00
Alexey Andreev acf7fcaebf JS: prohibit is checks against native interfaces. Warn about casts to native interfaces. Fix #KT-14037, fix #KT-14038 2016-11-25 14:07:29 +03:00
Ilya Gorbunov 427c6386a9 Remove java.lang from default imports in JS target platform 2016-11-21 18:22:05 +03:00
Alexey Andreev e56d735723 JS: refactor how last argument to suspend call is substituted 2016-11-16 19:29:33 +03:00
Alexey Andreev c5999e8375 JS: prototyping coroutines 2016-11-16 19:29:27 +03:00
Alexey Andreev a72ea64142 JS: fix translation of lambdas in public inline functions; fix AMD emulation for Ant test 2016-11-11 16:26:39 +03:00
Alexey Andreev 0252fe57af JS: refactor flat declaration generator. Add more tests on inter-module dependencies 2016-11-11 16:26:37 +03:00
Alexey Andreev cc38bd3146 JS: refactor code that exports local declaration from current module 2016-11-11 16:26:37 +03:00
Alexey Andreev e13d34e08d JS: rewrite stdlib to compile with new flat structure 2016-11-11 16:26:31 +03:00
Alexey Andreev f9a392fdec JS: introduce new flat JS declaration structure 2016-11-11 16:26:31 +03:00
Alexey Andreev 71ef8c4f89 JS: fix exception in JS front-end when checking JsName that was resolved with errors 2016-11-11 11:11:19 +03:00
Alexander Udalov 484b0e36fb Add KotlinBuiltIns#isBuiltIn, use it instead of other utilities 2016-10-26 16:31:05 +03:00
Alexander Udalov 4c52ce37d2 Drop TargetPlatform in utilities for module creation 2016-10-21 17:10:40 +03:00
Alexander Udalov 56e2173b3c Extract platform-independent default imports to TargetPlatform.Default.defaultImports
This is needed because SourceNavigationHelper uses default platform and it
needs default imports to be able to resolve references (otherwise
NavigateToLibrarySourceTestGenerated breaks)
2016-10-21 17:10:39 +03:00
Zalim Bashorov bdecb661e3 KJS: fix wrongAbiVersion test after abi version was increased. Make it less fragile with the hack for JS tests. 2016-10-20 13:47:50 +03:00
Zalim Bashorov a085df914f KJS: allow to use KClass::isInstance; implement isInstance in KClassImpl 2016-10-18 13:26:05 +03:00
Zalim Bashorov c21e1eb857 Report error when try to use unsupported reflection API in Kotlin JS; allow to use kotlin.Any members on reflection classes for both platforms. 2016-10-14 19:44:58 +03:00
Dmitry Petrov 8d634f6003 KT-14274: resolve type alias constructors calls in supertypes list as type alias constructors.
Support @Deprecated for type aliases, including type alias constructors.
2016-10-13 17:52:21 +03:00
Alexander Udalov 2f616bdd33 Drop ModuleParameters, inline defaultImports everywhere 2016-10-12 17:07:09 +03:00