-
Notifications
You must be signed in to change notification settings - Fork 381
feat(frontend)!: Explicit numeric generics and type kinds #5155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
101 commits
Select commit
Hold shift + click to select a range
b0a0bc9
initial work on explicit numeric generics and initial working tests
vezenovm 6a6081f
error for bad numeric generic type
vezenovm 49362cf
merge w/ master and working explicit numeric generics
vezenovm c9e84e4
fmt and clippy
vezenovm cef55da
fully working explciit num generics in resolver elaborator still has …
vezenovm 84f4b2c
working numeric_generics test with elaborator
vezenovm 0e56748
little cleanup
vezenovm 3de41d6
error for numeric generic used as type
vezenovm 8c2860a
fmt and clippy
vezenovm 8809853
merge w/ master
vezenovm 11655d5
add span method ot UnresolvedGeneric
vezenovm 2a098bf
remove dbgs
vezenovm 883dfa4
accurate checks against numeric generic used as a type
vezenovm fe28f92
remove bad errros
vezenovm e7dcd2b
improve err for numeric generic used in let type annotation
vezenovm 214ed01
merge master
vezenovm 6fff4c8
fix frontend/tests
vezenovm b7feb20
use type::error for bad numeric generic type
vezenovm 8159a54
use numeric generic in for_loop_over_array test
vezenovm 2154016
make separate numeric_generics_explicit test and ignored non elaborat…
vezenovm fe8f2ca
merge conflicts w/ master
vezenovm e5bfaea
cleanup with no numeric generics in the old resovler
vezenovm e98df52
cleanup
vezenovm 6dc164a
add TypeKind for Numeric generics and also get them working with impl…
vezenovm 265e385
fixed remaining errors in stdlib with elaborator and got warning for …
vezenovm c22732e
merge w/ master
vezenovm 03d8c4d
clippy and fmt
vezenovm 316cc47
cleanup and fix resolver add-generics from merge
vezenovm 45cec2d
a little more comments and cleanup
vezenovm 5f9536b
use push and pop scope
vezenovm 6f387cb
fix panic in numeric_generic_binary_operation_type_mismatch
vezenovm 3165bc7
use actual typ even if incorrect for accurate type checking when addi…
vezenovm b6f6813
Merge branch 'master' into mv/explicit-numeric-generics
vezenovm cf6e9a8
merge conflicts w/ master
vezenovm c880850
update comment
vezenovm 89f51f3
additional comment
vezenovm 901c970
resolved merge conflicts w/ master
vezenovm fe97064
more robust numeric generic parsing
vezenovm 65aae29
update comments with issue referencing elaborator
vezenovm 6d328cb
merge conflicts w/ master
vezenovm e5b12d5
Update compiler/noirc_frontend/src/hir_def/types.rs
vezenovm 7b31c30
switch TypeKind -> Kind and Kind rather than bool in ResolvedGeneric
vezenovm 63302d0
remove resolve_numeric_type as it is unused in favor of passing in th…
vezenovm 1554149
Update compiler/noirc_frontend/src/parser/parser/function.rs
vezenovm 8c5fd98
Update tooling/nargo_cli/build.rs
vezenovm aa53a05
Update tooling/nargo_fmt/tests/input/fn.nr
vezenovm 09bcfe0
shorten numeric_generics_explicit test
vezenovm 3db59b8
correctness of nuric generics test
vezenovm 6fa665e
remove at_least(1) for generics
vezenovm 759b7ec
Update compiler/noirc_frontend/src/parser/parser/structs.rs
vezenovm eff5960
remove unnecessary unwrap_or_default
vezenovm 752e7f0
rename generic_variable -> generic_type in parser
vezenovm c0fb7ef
still destructure named generic in resolve_type_inner
vezenovm 123256b
Update compiler/noirc_frontend/src/elaborator/mod.rs
vezenovm a021370
ident and into_ident instead of from
vezenovm 1d05612
break in inner loop for finding implicit num generics in struct
vezenovm 43cb4d0
remove generic_idents and switch collection of generics into dc_mod …
vezenovm 6146793
merge conflicts w/ master
vezenovm 0879ffa
clippy
vezenovm 57e5bd5
get definition typ accurate and add a type to the numeric kind
vezenovm f14de96
resolve build.rs
vezenovm 4a1f899
fix up frontend tests
vezenovm 0bec263
merge conflicts w/ master
vezenovm 31e79df
update fmt to handle more complex generics
vezenovm 7ddae3e
ignore stdlib warnings for now until I update the stdlib
vezenovm bcaff2b
merge conflicts w/ master
vezenovm c58b7a6
fix NamedGeneric signature in is_valid_for_unconstrained_boundary
vezenovm 4a7a994
fixup trailing in fmt item and build for nargo_cli
vezenovm 36be839
expand comment in numeric_generic_in_trait_impl_with_extra_impl_gener…
vezenovm 5a290d9
use resolve_generics inside of HirContext
vezenovm ebc38cb
fmt fix in resolve_trait-bound
vezenovm 3ef133e
mvoe nested slice check
vezenovm 818667e
remove ResolvedGeneric::dummy
vezenovm 4001dfd
update GenericTypeVars comment
vezenovm 154782d
check generic args for resolve_trait_as_type
vezenovm e3cf451
last cleanup in frontend tests and setting of implicit numeric struct…
vezenovm 5ebd02d
Update compiler/noirc_frontend/src/elaborator/mod.rs
vezenovm 12d44cd
merge w master
vezenovm d6ccab1
make resolve_numeric_kind_type inside of UnresolvedGeneric kind()
vezenovm 25d640a
return result on kind() method of UnresolvedGeneric
vezenovm c0a375c
don't return generics from add_existing_generics now that they are re…
vezenovm 05befe5
missed dbg
vezenovm 1d8d65f
Merge branch 'master' into mv/explicit-numeric-generics
vezenovm 13fad23
Update compiler/noirc_frontend/src/hir/def_collector/errors.rs
vezenovm 9da3de6
Update compiler/noirc_frontend/src/elaborator/traits.rs
vezenovm 98fd197
remove cmmented out struct generics update
vezenovm a6ec927
add back struct_numeric_generic_in_function test
vezenovm f87bc32
fix bad return type from context.resolve_generics
vezenovm 8ba4cec
return DefCollectorErrorKind directly in resolve_numeric_kind_type
vezenovm 2f7315a
cleanup kind method and error for kinds
vezenovm 5dcd517
fix resolution of constant in turbofish:
vezenovm d3f36e7
fixup some tests
vezenovm 1e5effa
use explicit num generics in regression_4124
vezenovm a46ba67
comment out resolved_type.kind() != kind check
vezenovm 9bc16a4
clippy
vezenovm 4ee9bc4
fixup test
vezenovm 122c38b
merge conflicts w/ master
vezenovm af7e2f1
merge conflicts err
vezenovm dfc6345
fixup bad merge
vezenovm 18cde4b
check type variable bindings and named generics in find_numeric_type_…
vezenovm f360c7d
Cargo fmt
vezenovm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.