Skip to content

fix: report a range for illegal stable patterns#5977

Draft
christoph-dfinity wants to merge 1 commit intomasterfrom
christoph/fix-stability-error
Draft

fix: report a range for illegal stable patterns#5977
christoph-dfinity wants to merge 1 commit intomasterfrom
christoph/fix-stability-error

Conversation

@christoph-dfinity
Copy link
Copy Markdown
Contributor

@christoph-dfinity christoph-dfinity commented Apr 7, 2026

Does so by annotating the default stability with the range of the full declaration in the parser.

@christoph-dfinity
Copy link
Copy Markdown
Contributor Author

Wow this is cursed. The current warnings for "implicit transient" rely on the parser desugared Flexible annotations on functions being non-no-region, and the parser desugared Stable on let and var being no-region.

I'll come back to this at some point. Making it a draft for now.

@christoph-dfinity christoph-dfinity marked this pull request as draft April 7, 2026 10:08
@christoph-dfinity christoph-dfinity removed the request for review from a team April 7, 2026 10:08
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

Comparing from 5df40b5 to a25b71e:
The produced WebAssembly code seems to be completely unchanged.
In terms of gas, no changes are observed in 5 tests.
In terms of size, no changes are observed in 5 tests.

@crusso
Copy link
Copy Markdown
Contributor

crusso commented Apr 7, 2026

Wow this is cursed. The current warnings for "implicit transient" rely on the parser desugared Flexible annotations on functions being non-no-region, and the parser desugared Stable on let and var being no-region.

I'll come back to this at some point. Making it a draft for now.

Right, I was about to say we rely on no_region to tell it was default. I guess one could add a bool somewhere...

@christoph-dfinity
Copy link
Copy Markdown
Contributor Author

Right, I was about to say we rely on no_region to tell it was default. I guess one could add a bool somewhere...

This'll go away when we properly remove transient by default actors, right? I'd rather wait for/do that.

Base automatically changed from christoph/human-error-no-region to master April 7, 2026 15:43
@christoph-dfinity christoph-dfinity force-pushed the christoph/fix-stability-error branch 2 times, most recently from 35aca72 to 8b0e80f Compare April 7, 2026 15:54
Does so by annotating the default stability with the range of the full
declaration in the parser.
@christoph-dfinity christoph-dfinity force-pushed the christoph/fix-stability-error branch from 8b0e80f to a25b71e Compare April 7, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants