Skip to content

Add type restrictions to benchmark directory#15688

Merged
straight-shoota merged 2 commits intocrystal-lang:masterfrom
Vici37:add-type-restrictions-to-benchmark
Aug 7, 2025
Merged

Add type restrictions to benchmark directory#15688
straight-shoota merged 2 commits intocrystal-lang:masterfrom
Vici37:add-type-restrictions-to-benchmark

Conversation

@Vici37
Copy link
Contributor

@Vici37 Vici37 commented Apr 20, 2025

This is the output of compiling cr-source-typer and running it with the below incantation:

CRYSTAL_PATH="./src" ./typer spec/std_spec.cr --error-trace --exclude src/crystal/ --stats --progress --union-size-threshold 2 --ignore-private-defs src/benchmark

This is related to #15682 .


# Reports a single benchmark unit.
def report(label = " ", &block)
def report(label : String = " ", &block) : Nil
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: We could also add a restriction to the block parameter.

Suggested change
def report(label : String = " ", &block) : Nil
def report(label : String = " ", &block : ->) : Nil

@straight-shoota straight-shoota added this to the 1.18.0 milestone Aug 5, 2025
@straight-shoota straight-shoota changed the title Add missing type restrictions to benchmark directory Add type restrictions to benchmark directory Aug 7, 2025
@straight-shoota straight-shoota merged commit 9c7e8d9 into crystal-lang:master Aug 7, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants