Require explicit extern members in extern class/object and update docs

This commit is contained in:
sergeych committed 2026-03-15 03:27:50 +03:00
1 parent e447c778ed
commit 979e6ea9b7
13 files changed
+105 -53

No files matched your search

+5
View File
@@ -18,6 +18,11 @@ In particular, it means no slow and flaky runtime lookups. Once compiled, code g
The API is fixed and will be kept with further Lyng core changes. It is now the recommended way to write Lyng extensions in Kotlin. It is much simpler and more elegant than the internal one. See [Kotlin Bridge Binding](../notes/kotlin_bridge_binding.md).
Extern declaration clarification:
- `extern class` / `extern object` are pure extern surfaces.
- Members inside them must be explicitly marked `extern`.
- Lyng method/property bodies for these declarations should be implemented as extensions instead.
### Smart types system
- **Deep inference**: The compiler analyzes types of symbols along the execution path and in many cases eliminates unnecessary casts or type specifications.