Repository navigation
D186, D188, D189: skip(n), Duration over i64 nanoseconds, no tuple-await arity cap - #2971
Merged
Merged
Conversation
added 2 commits
November 2, 2026 12:05
…ait arity cap D186: the iterator adapter that skips the first n elements is skip(n) and its predicate form skip_while; drop(value) stays the prelude's release form (Sema stage symbols, BuiltinSigs, std.traits iter_skip*, the List adapter types, the two tests that spelled drop). D188: std.time.Duration is a value type over i64 nanoseconds on every target (D114), with nanos/micros/millis/secs/minutes/hours constructors, the same as extensions on isize/i64/i32 so 50.millis() reads as §14 writes it, arithmetic and comparison, as_* accessors, Instant.now() with elapsed(), sleep(Duration) and timeout(Duration). The lexer follows §30 FLOAT_LIT: a dot after digits is part of the number only when a digit follows, so 50.millis() is a member access; behav_float's 10.-3.5 becomes 10.0-3.5. Tests that passed a bare integer to sleep now pass a Duration. D189: tuple .await has no arity limit; the two Sema checks that stopped at 12 stop only below 2. Spec v7.35 (#2970) rules all three; §4 and §7 examples use Duration.secs.
An .await inside a std body made every program importing std.time a concurrent one in Sema's eyes, and stage2 failed with E0921 data-race diagnostics on the compiler's own globals. The evidence rule is filed; timeout meanwhile sleeps the way sleep does.
…t library sleeps a Duration (D188)
Contributor
Author
|
Battery GREEN in ~/.local/with-staging/stack1 at 4f8…/HEAD (skip, Duration, arity; timeout without an await; the arity fixture retired, the temporary-exit library sleeps a Duration): |
ehartford
marked this pull request as ready for review
November 2, 2026 18:07
This was referenced Nov 2, 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.
Implements three of the 2026-11-02 rulings (spec v7.35, #2970): D186 skip(n)/skip_while (#2961), D188 Duration as a value type over i64 ns with integer extensions, Instant, timeout and the §30-conformant lexer (#2957), D189 no tuple-await arity limit (#2963). New tests behav_d186_skip_adapter, behav_d188_duration, behav_d189_tuple_await_any_arity; sleep callers updated. Stage1 green on the targeted tests and test/lexer. Battery on the stack top.