Repository navigation
fix(check): report an inaccessible subsetted feature on a standalone specialization subset member - #1402
Merged
Conversation
…ature value A new T(…) argument is a feature of the result redefining the type's feature; one bound to a feature whose value is written with = (itself or through what it redefines) overrides that binding (KerML 8.3.4.10.2), as the redefinition form attribute :>> x = 2 already reports. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…specialization subset member The keyword-first specialization subset f :> T::g; writes the same Subsetting as the inline f :> T::g, and validateSubsettingFeaturingTypes (KerML 8.3.3.3.10) holds of it however it is spelled. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…ces they name Co-Authored-By: jason.han <hanhuijun@gmail.com>
…tor-bound-value-override Re-record the pilot rejection baseline and the documentation counts from the combined tree: 338 cases, 327 rejected by both. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ting-accessibility Re-record the pilot rejection baseline and the documentation counts from the combined tree: 339 cases, 328 rejected by both. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…tor bindings The feature-reference walker returned early on every type-taking operator, so a constructor under istype, hastype, as or @ escaped the binding-override check. Only all, meta and @@ take an element whose name may be a type's; the others keep their type in TypeRef and their operand is an expression. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…und-value-override
…dalone-subsetting-accessibility
6 tasks done
…und-value-override Re-record the pilot rejection baseline and the documentation counts from the combined tree: 339 cases, 327 rejected by both, 12 only by us. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ting-accessibility Re-record the pilot rejection baseline and the documentation counts from the combined tree: 340 cases, 328 rejected by both, 12 only by us. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…und-value-override
…dalone-subsetting-accessibility
5 of 6 tasks
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.
What and why
Stacked on #1401, which stacks on #1392. Both are absorbed here as merge commits (
c8c8897a8subject-position checks,2deb6d516constructor-argument override), so the diff againstdevelopshows their changes until they land; this PR's own change is the standalonespecialization subsetaccessibility check described below, plus the re-recorded rejection baseline from the combined tree.specialization subset fu :> A::a;besidefeature fv : Real :> A::a;drewMust be an accessible feature (use dot notation for nesting)on the inline form only; the pinned pilot reports it on both. The two spellings write the one Subsetting relationship (KerML §8.2.2 gives both notations), andvalidateSubsettingFeaturingTypesholds of every Subsetting, so the standalonespecialization subsetmember is now judged by the same rule: its subsetting end is resolved to the feature it names and the subsetted end checked from that feature's featuring context, reported at the subsetted name —7:33and8:26on the reproducer, the pilot's positions.The judgement the inline form already used is factored into
checkSubsettedFeatureAccessible, which both notations call; nothing changes for the inline form.Specification basis
KerML 1.1 Beta 2 §8.3.3.3.10
validateSubsettingFeaturingTypes(subsettingFeature.canAccess(subsettedFeature)) and §8.2.2Subsetting/SpecializationMember(the standalone notation). New row beside the existingvalidateSubsettingFeaturingTypesrow indocs/project/spec-compliance.md; the census row gains the new negative case.How it was verified
passes/w7g_subsetting_featuring_test.go: the reproducer (standalone and inline both reported atA::a); the standalone form through a reachable featuring context and against a package-level feature stays silent.semantic/k77-standalone-subsetting-inaccessible-feature.kerml— both reject; this branch stacks on the constructor-override PR (fix(check): report a constructor argument that overrides a binding feature value #1401) andpilot-reject -updatere-recorded the baseline from the combined tree (339 cases, 328 both reject, still 0 pilot-only);make docs-countsrun. The direction-conformance PR (fix(check): hold an undirected redefinition and a step's positional parameter to direction conformance #1399) stacks on this one and re-records it again.pilot-diff -checkreproduces the committed differential baseline (916 files; 366 only ours / 2445 only the pilot's — unchanged);TestTrainingExamples,TestPilotCorpora,TestSpecExamples,TestStdlibConformancepass.examples/,tests/testdata,tests/parser/testdata,internal/exec/runtime/testdatawith the develop build vs this branch: no newly flagged file.integration/phase-3:make validatepasses with this build; the probe reports the diagnostic on both lines.go build ./... && go vet ./... && gofmt -l .clean;go test ./...andmake lintin progress at push time.Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/7b54c9b0fcf9488fa8aa05694b590d65
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/7b54c9b0fcf9488fa8aa05694b590d65?variant=devin
Requested by: @HuiJun