Skip to content

Add the comptime keyword (with no effect yet)#343

Draft
mbenke wants to merge 6 commits intomainfrom
comptime-keyword
Draft

Add the comptime keyword (with no effect yet)#343
mbenke wants to merge 6 commits intomainfrom
comptime-keyword

Conversation

@mbenke
Copy link
Copy Markdown
Collaborator

@mbenke mbenke commented Mar 25, 2026

This PR introduces syntax - just syntax - for annotating parameters with comptime keyword, e.g.

contract ComptimeSyntax {

  function f(comptime x : word) -> comptime word {
    return x;
  }

  function g() -> word {
    let y : comptime word = f(42);
    return y;
  }

  function main() {
    return g();
  }
}

@mbenke mbenke requested a review from rodrigogribeiro March 25, 2026 14:40
@mbenke mbenke mentioned this pull request Apr 9, 2026
Copy link
Copy Markdown
Collaborator

@rodrigogribeiro rodrigogribeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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