Repository navigation
#3038, #3039, #3041, #3042, #2958: five spec-gap fixes from the #2987 audit - #3045
Merged
Merged
Conversation
Contributor
Author
|
Seed-driven battery GREEN on |
ehartford
marked this pull request as ready for review
November 5, 2026 23:55
This was referenced Nov 6, 2026
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.
Closes #3038
Closes #3039
Closes #3041
Closes #3042
Closes #2958
Five compiler and stdlib gaps uncovered during the #2987 specification example audit:
src/Codegen.w,src/CodegenDispatch.w): pairasync_block_rbufwithasync_block_fn(self.current_function == self.async_block_fnatTK_RETURNemission) and save/clear acrossgen_function_mir_monoandgen_async_block, fixing the LLVM IR verification failure (Referring to an argument in another function! store ... ptr %1) when monomorphizing a generic function inside anasync:block. Fixture:test/behavior/behav_3038_async_block_mono_call.w.lib/std/sync.w,src/Sema.w,src/SemaCheck.w): addMutex.lock(),RwLock.read(),RwLock.write(),RwLock.set(value),Scoped[&T]onMutexGuardMut[T]andRwWriteGuard[T],RwLockReadGuard[T]/RwLockWriteGuard[T]generic type aliases (expanding parameterizedTY_ALIASdeclarations inresolve_generic_typeandresolve_generic_type_frozen), andmay_suspend+ view-store checks inSemaCheck. Fixture:test/behavior/behav_3039_sync_lock_read_write.w.src/ComptimeEval.w,docs/spec/017_metaprogramming.md): supportstr as []u8(CV_BYTES),CV_BYTESiteration,Iter[T]struct iteration (eval_struct_iter_to_extras, including implicitSomereturns), and unit variants of payload enums (None) ineval_disc_variant_sym, sostr.bytes()andstr.as_bytes()evaluate incomptimeforloops and comprehensions (§17.6; wrapping*%/+%in the DJB2 example). Fixture:test/behavior/behav_3041_comptime_str_bytes.w.src/SemaCheck.w): propagate an enclosingOption[List[U]]orResult[List[U], E]demand onList.traverseas the closure's expected return typeOption[U]/Result[U, E](§10.7, D165). Fixture:test/behavior/behav_3042_traverse_expected_demand.w.pubstd function from a program says "undefined variable" instead of naming the visibility rule #2958 (src/Sema.w): walkdisplaced_fn_index(and unimportedstdmodules when nopubstd declaration shares the name) inprivate_symbol_path_from_currentso calling a non-pubstd function reports the §18.3 package-privacy error naming the declaring module rather than"undefined variable". Fixture:test/compile_errors/err_2958_private_std_fn_visibility.w.