1.5 KiB
1.5 KiB
AI State (for session restart)
Project: /home/sergeych/dev/lyng Module focus: :lynglib
Current focus
- Enforce compile-time name/member resolution only; no runtime scope lookup or fallback.
- Closures capture frame slots directly; materialize
Scopeonly for Kotlin interop or explicit dynamic helpers. - Object members are allowed on unknown types; other members require a statically known receiver type or explicit cast.
- Type system is Kotlin-style:
Tnon-null,T?nullable,!!asserts non-null;voidis a singleton of classVoid. - Type expressions: unions/intersections with bounds, declaration-site variance (
in/out), and structural equality.
Key recent changes
- Updated AI helper docs to reflect static typing, type expressions, and compile-time-only name resolution.
- Added stdlib random API:
Randomand deterministicSeededRandomwithnextInt,nextFloat, and genericnext(range). - Generalized primitive list optimization for compiler-generated
List.fill:List.fill(size) { intExpr }andList.fill(size, capacity) { intExpr }now both have bytecode fast paths.- Added
LIST_NEW_INT_CAP/LIST_FILL_INT_CAPfor the 3-arg capacity-preserving form.
- Fixed
ObjList.add(...)to preserve primitive-int backing storage instead of forcing boxing through.list. OptTest.testAddToArray2no longer shows the old 10x anomaly forList.fill(n, n + 10)or append-to-extended-list.
Known failing tests
- None in :lynglib:jvmTest after Random/SeededRandom integration.
Last test run
./gradlew :lynglib:jvmTest(PASS).