Skip to content

Feat/high order functions#3

Open
oneQAQone wants to merge 2 commits intoCopyLibs:masterfrom
oneQAQone:feat/high-order-functions
Open

Feat/high order functions#3
oneQAQone wants to merge 2 commits intoCopyLibs:masterfrom
oneQAQone:feat/high-order-functions

Conversation

@oneQAQone
Copy link
Copy Markdown
Contributor

No description provided.

oneQAQone added 2 commits May 4, 2026 22:33
…tural variance

此更新实现了类似 Kotlin 的高阶函数能力和类型安全的 DSL 模式。

实现要点:
1. 强类型函数声明:引入语法 ((Params) -> Return),支持在变量、参数及返回类型中使用。
2. 带接收者的 Lambda:实现 (Receiver.(Params) -> Return) 语法,支持 this 上下文注入,实现成员直达访问。
3. 结构化逆变与协变:支持参数逆变与返回协变,实现基于签名的逻辑匹配而无需强制转换。
4. 动态函数调用:增强名称解析逻辑,支持对函数类型变量直接进行 () 调用。
5. 函数类型数组:支持通过 new ((Signature))[length] 语法分配函数签名数组。
@oneQAQone oneQAQone marked this pull request as ready for review May 4, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant