Feat/high order functions#3
Open
oneQAQone wants to merge 2 commits intoCopyLibs:masterfrom
Open
Conversation
…tural variance 此更新实现了类似 Kotlin 的高阶函数能力和类型安全的 DSL 模式。 实现要点: 1. 强类型函数声明:引入语法 ((Params) -> Return),支持在变量、参数及返回类型中使用。 2. 带接收者的 Lambda:实现 (Receiver.(Params) -> Return) 语法,支持 this 上下文注入,实现成员直达访问。 3. 结构化逆变与协变:支持参数逆变与返回协变,实现基于签名的逻辑匹配而无需强制转换。 4. 动态函数调用:增强名称解析逻辑,支持对函数类型变量直接进行 () 调用。 5. 函数类型数组:支持通过 new ((Signature))[length] 语法分配函数签名数组。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.