A float ghost crashes the verifier: "Ghost not implemented for type float"
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- java
- 领域
- testing-qa
调研方向
从 TypeChecker.java 中 Ghost 的默认处理开始,这里会抛出所报告的异常;然后比较 int 和 boolean ghost 如何获取默认值。使用提供的复现程序检查 float 情况;当 float ghost 获取到默认值,或 @Ghost 注解报告清晰的错误并列出支持的类型时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Declaring a float ghost crashes the verifier when the ghost needs its default value. The result should be either support for the type or a proper error at the @Ghost annotation.
Reproducer:
import liquidjava.specification.Ghost;
import liquidjava.specification.StateRefinement;
@Ghost("float level")
class Tank {
@StateRefinement(to = "true")
public void fill() {}
}
public class Main {
public static void main(String[] args) { Tank t = new Tank(); t.fill(); }
}
Found on main @ f7f366c (also on 1a506fe):
Exception in thread "main" java.lang.RuntimeException:
Error while checking CtConstructorImpl
on null
at (no source position: CtConstructorImpl)
with Ghost not implemented for type float
at liquidjava.processor.refinement_checker.TypeChecker.scan(TypeChecker.java:99)
...
int and boolean ghosts get defaults (0, false); double was not tried. Expected: a default for float too (or a user-facing error naming the supported ghost types).
Found while cataloguing spec forms for co-specification (probe V19 there). Low priority.
- 主要语言
- Java
- 星标
- 71
- 派生
- 37
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 57
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
liquid-java/liquidjava 的其他 Issue
-
bug real-world-finding
难度 2/5 1-3 小时 新手友好度 82/100
liquid-java/liquidjava#395 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
liquid-java/liquidjava#373 ·
维护者通常 2 天内回复
-
External specs: a @StateSet declared later in the file is not found by an interface earlier in it未关闭
难度 4/5 3-5 天 新手友好度 58/100
liquid-java/liquidjava#452 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
liquid-java/liquidjava#451 ·
维护者通常 2 天内回复
-
难度 4/5 1-2 天 新手友好度 58/100
liquid-java/liquidjava#450 ·
维护者通常 2 天内回复
查看 liquid-java/liquidjava 的全部 Issue
相似的 Issue
-
good first issue
难度 2/5 1-3 小时 新手友好度 90/100
authorjapps/zerocode#808 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
checkstyle/sonar-checkstyle#625 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
quarkusio/quarkus-agent-mcp#302 ·
维护者通常 2 天内回复
-
build
难度 1/5 1 小时以内 新手友好度 85/100
MetricsHub/metricshub-community#1472 ·
维护者通常 1 天内回复