ssa,runtime: gc-conformant type-assertion panics and go:nointerface support#2031
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Jul 6, 2026
cpunion
force-pushed
the
codex/stage5-typeassert
branch
2 times, most recently
from
July 8, 2026 07:03
f60b3b0 to
522ddb3
Compare
cpunion
force-pushed
the
codex/stage5-typeassert
branch
2 times, most recently
from
July 9, 2026 05:31
7bb5496 to
2173cea
Compare
This was referenced Jul 12, 2026
12 tasks
…upport Re-expresses the surviving value of xgo-dev#1892 on the xgo-dev#2023 base (its other ~10k lines were an earlier draft of the funcinfo/pclntab machinery, since superseded by xgo-dev#2012/xgo-dev#2016/xgo-dev#2019): - //go:nointerface methods no longer satisfy interfaces: the pragma is recorded at import (cl/import.go -> Program.SetNoInterfaceMethod) and filtered out of abi uncommon method tables; GlobalDCE metadata takes the filtered selection list. Retires the typeparam/mdempsky/15 goroot xfails (validated go1.26 darwin, ci directive mode). - Type-assertion failure between same-named types from different scopes appends '(types from different scopes)' (gc wording). - MatchesClosure unwraps closure types on both sides, fixing assertions between closure and plain function types. - reflect.(*rtype).Method builds the method func value with the closure layout allocation (fixes reflect method-value identity). - xfail: retire fixedbugs/issue16130, fixedbugs/issue29735 (validated go1.24 + go1.26 darwin), and reword typeparam/mdempsky/16 - the panic value now implements runtime.Error; the message still lacks the source interface type and prints the command-line-arguments package path.
cpunion
force-pushed
the
codex/stage5-typeassert
branch
from
July 17, 2026 12:19
2173cea to
6e952b2
Compare
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.
Re-expresses the surviving value of #1892; its other ~10k lines were an earlier draft of the funcinfo/pclntab machinery, since superseded by the stage-5 chain.
What changes
//go:nointerfacesupport: the pragma is recorded at import time (cl/import.go->Program.SetNoInterfaceMethod) and such methods are filtered out of abi uncommon method tables, so they no longer satisfy interfaces (gc/fieldtrack semantics). GlobalDCE method metadata takes the filtered selection list.(types from different scopes), matching gc wording.MatchesClosurefix: unwraps closure types on both sides, so assertions between closure and plain function types compare the underlying func types.reflect.(*rtype).Method: builds the method func value with a closure-layout allocation (fixes reflect method-value identity).goroot conformance
typeparam/mdempsky/15.go(nointerface),fixedbugs/issue16130.go,fixedbugs/issue29735.go.typeparam/mdempsky/16.gostays xfailed with an updated reason: the panic value now implementsruntime.Error(the old failure), but the message still lacks the source interface type and prints thecommand-line-argumentspackage path instead ofmain— same naming class as the funcinfo main-name normalization, left for a follow-up.Validation
ssaandclsuites green; newtest/gocases green under bothgo testandllgo test(expect_go/expect_llgo split asserts per-toolchain behavior).llgo teston the new cases green; the four goroot cases behave as recorded above.gentests: noout.lldrift from the abi method-table change.Supersedes #1892.
🤖 Generated with Claude Code