已开启
fix: fold is_subtype #612
fix: fold is_subtype #612
已开启
yanjs创建于 3 天前
yanjs
yanjs仓颉Developer
3 天前

Change Details (Required)

问题出现在目前我们在去虚化pass消除isSubType的时候,通过extensiondef 判断两个interface的继承关系。

当出现where语句的时候,例如issue中用例:

interface I1 {}

interface I2 {}

interface I3 {}

interface I4 {}

interface I5 {}

open class CBase {}

class CA <: CBase & I1 {}

extend CA <: I5 where T <: I4 {}

extend CA <: I4 {}

extend CA <: I2 {}

extend CBase <: I3 where T <: I3 {}

extend Float64 <: I3 {}

extend Bool <: I4 {}

func test() {
if (CA() is I5) {
println("CA is I5")
}
}

main() {
let x: CA = CA()
if (x is I5) {
println("x is I5")
}
0
}

会生成extension def,但是实际是否继承需要去判断extension def中的where condition。

Change Type (Required)

Please describe the type of changes in this Pull Request (reason). Simply save and click the checkbox, or when editing, change [ ] to [x] for the relevant item.

Self-Check of Changes (Required)

Please do not modify or delete the following options. Simply save and click the checkbox, or when editing, change [ ] to [x] for the relevant item.

Local Compilation Verification Results:

image.png

Local Test Case Verification Results:

image.png

https://gitcode.com/Cangjie/cangjie_compiler/issues/459

likedislike
CLA协议签署
当前Pull Request的提交暂无外部代码贡献者
合并受阻
yanjsyanjs仓颉Developer
3 天前 关联了issue:[Bug]: cjc 在不同优化等级下编译复杂类型体操结果不一致
yanjsyanjs仓颉Developer
3 天前 添加了label:sync
cangjie-ci成员
3 天前 评论:

PR创建成功通知 | 感谢您的贡献 🎉

您好!系统已检测到您成功创建 Pull Request(PR),感谢您对项目的支持与参与!以下几点需要您着重关注:

一、PR必须关联Issue ❗️

触发门禁检查的必要步骤:在PR描述框输入Issue完整链接,完成Issue关联

请注意,一个 Issue 不能同时关联同一 base 仓库内同一个分支的多个开启状态的 PR

二、门禁触发规则 🔧

  1. 门禁类型判定:由Issue关联的PR所属代码仓数量决定
    • 关联多个代码仓PR:触发「多仓联合门禁」
    • 关联单个代码仓PR:触发「单仓门禁」
  2. 启动指令与检查范围:需主动回复指令:
    • 回复 "start build":执行Cangjie的主要基础检查,包含commit格式检查、静态告警分析、OAT开源声明检查、多平台构建、单元/集成测试等
    • 关联同一issue的多个PR,仅需在任意一个PR里回复触发一次门禁,该PR门禁通过后,所有PR都会添加Label和测试人
    • 每个pr只能同时运行一条CI流水线,如需重新启动,请先关闭运行中的,再评论触发门禁
    • Markdown修改仅触发文档类构建测试门禁,不会触发Cangjie的编译测试门禁
    • commit 信息格式请遵循:Conventional Commits 规范
    • 请保证每一条 commit 都已添加 Signed-Off-By 信息
    • 回复 "start build cov":执行覆盖率构建工程,生成该提交的增量代码覆盖率报告

三、合入条件 ⚠️

  • 满足最低评审人数,且评审问题需全部解决;
  • 禁止合入本人创建的PR,需由其他协作者操作;
  • 合并前确保关联流水线任务运行成功(build-test-passed);
  • 需求类覆盖率门禁:当关联的 Issue 标题以 [feature]: 开头(需求类 Issue)时,联合提交中属于 cangjie_compilercangjie_runtimecangjie_stdxcangjie_toolsllvm-project 仓库的 PR,必须先回复 "start build cov" 触发增量覆盖率流水线并通过,使 PR 获得 cov-test-passed 标签后方可合入。

四、合并PR ✅

回复 "start merge",CI流水线会自动检查所有关联PR的状态、版本号标签、检视意见密度、兼容性、需求类覆盖率门禁,若所有PR都满足合并条件,则将会同时合并所有PR。若存在不满足合并条件的PR,则不会合并任何PR。

如果希望不进行兼容性相关的检测,请任一合法审查人复制以下内容,在 start merge 前提交评论:

本 pr 不需要兼容性相关检测,对于引发的任何兼容性问题(即由于本 pr 合入将导致用户需适配代码的话),由本人承担。

If you wish to avoid compatibility-related checks, please have any approver copy the following content and submit it as a comment before sending start merge:

This PR does not require compatibility-related checks. For any compatibility issues caused by this PR (i.e., if the integration of this PR will require users to adapt their code), I will take full responsibility.

五、补充说明 📢

likedislike
Ccangjie-ci维护者
3 天前 添加了label:1.0.6waiting-start-build
Ccangjie-ci维护者
3 天前 重置了测试状态
yanjs
yanjs成员
3 天前 评论:

start build

likedislike
Ccangjie-ci维护者
3 天前 删除了label:waiting-start-build
Ccangjie-ci维护者
3 天前 添加了label:CI-running
cangjie-ci成员
3 天前 评论:

🔨 构建/测试门禁流水线

已启动,正在后台运行中,您可以点击构建/测试门禁详情查看运行状态。

构建/测试门禁执行流程:

graph LR
    A[PR检测] --> B[联合构建]
    B[联合构建] --> C[测试运行]

检查内容包括

  • commitlint检查
  • 构建任务
    • linux x64、mac aarch64、windows x64
  • 测试任务
    • UT、HLT、LLT

构建/测试门禁产物归档路径: obs://cangjie103/CangjieDaily/pub/ci/gate/release/1.0/llvm-project/612

likedislike
Ccangjie-ci维护者
3 天前 添加了label:commitlint-passedsign-off-passed
cangjie-ci成员3 天前进行代码检视1
llvm/lib/Transforms/Scalar/CJDevirtualOpt.cpp
cangjie-ci3 天前评论:

PR&issue 合规检查结果 / PR & Issue Compliance Check Results

Item Target Result Notes
PR template Cangjie/llvm-project#612 FAIL 缺少编译/测试截图 / missing screenshots
Issue template Cangjie/cangjie_compiler#459 PASS 必填字段齐全 / required fields filled
PR-Issue consistency Cangjie/llvm-project#612 SKIP 模板无关联issue章节 / no issue section in template

检查结论 / Conclusion: FAIL

likedislike
Ccangjie-ci维护者
3 天前 添加了label:OAT-passed
Ccangjie-ci维护者
3 天前 添加了label:codecheck-passed
Ccangjie-ci维护者
3 天前 通过测试
cangjie-ci成员
3 天前 评论:

🔨 构建/测试门禁

构建/测试门禁已通过

您提交的 PR 已顺利通过全部门禁检查流程,当前状态符合合入标准。具体检查结果如下:

  • Commit 检查:代码提交信息规范性、完整性、Signed Off信息验证通过,无格式或逻辑问题✓;
  • 代码构建:编译过程无报错,依赖项加载正常,构建产物完整性达标🔧;
  • 测试验证:单元测试、集成测试等各类用例执行完毕,全部通过验证🧪。

目前该 PR 已完全具备合入条件,可按项目流程推进后续合入操作。感谢您的严谨开发与协作,期待代码顺利合入🎉!

likedislike
Ccangjie-ci维护者
3 天前 删除了label:CI-running
此处折叠了8条事件消息 查看更多
liujiajieliujiajie仓颉Committer
2 天前 重置了审查状态