{"id":47795264,"url":"https://github.com/morpho-org/forge-lint-bug-repro","last_synced_at":"2026-04-03T16:14:52.820Z","repository":{"id":346738529,"uuid":"1190918534","full_name":"morpho-org/forge-lint-bug-repro","owner":"morpho-org","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-25T07:20:41.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"repro","last_synced_at":"2026-03-26T11:50:08.933Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/morpho-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-24T18:41:20.000Z","updated_at":"2026-03-25T07:20:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/morpho-org/forge-lint-bug-repro","commit_stats":null,"previous_names":["morpho-org/forge-lint-bug-repro"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/morpho-org/forge-lint-bug-repro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morpho-org%2Fforge-lint-bug-repro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morpho-org%2Fforge-lint-bug-repro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morpho-org%2Fforge-lint-bug-repro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morpho-org%2Fforge-lint-bug-repro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morpho-org","download_url":"https://codeload.github.com/morpho-org/forge-lint-bug-repro/tar.gz/refs/heads/repro","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morpho-org%2Fforge-lint-bug-repro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31362716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T15:19:21.178Z","status":"ssl_error","status_checked_at":"2026-04-03T15:19:20.670Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T16:14:52.315Z","updated_at":"2026-04-03T16:14:52.812Z","avatar_url":"https://github.com/morpho-org.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# forge lint `unsafe-typecast` false negative\n\n`forge lint` catches `uint128(x)` when `x` is a local variable, but silently\nmisses the exact same narrowing cast when the argument is a function return value.\n\n**forge 1.5.1-stable** (b0a9dd9ced 2025-12-22)\n\n## Reproduce\n\n```\nforge lint --only-lint unsafe-typecast\n```\n\n**Expected:** 2 warnings (lines 7 and 17).\n**Actual:** 1 warning (line 7 only). The cast at line 17 is silently skipped.\n\n## Root cause\n\n`infer_source_types` in `crates/lint/src/sol/med/unsafe_typecast.rs` only\nresolves types for `Ident`, `Lit`, cast-`Call`, `Unary`, and `Binary`\nexpressions. Any other `ExprKind` (including non-cast function calls, member\naccess, index, ternary, globals) falls through `_ =\u003e None`, making the\nsource-type vec empty and the cast appear safe.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorpho-org%2Fforge-lint-bug-repro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorpho-org%2Fforge-lint-bug-repro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorpho-org%2Fforge-lint-bug-repro/lists"}