Skip to content
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

feat(type_inference): added NumericDefaultInt cons #3252

Closed
wants to merge 1 commit into from

Conversation

Bolladeen
Copy link
Contributor

@Bolladeen Bolladeen commented Oct 12, 2020

  • Added NumericDefaultInt constraint
  • Updated IntegerLit semantic node to have monotype value
  • Updated semantic analysis to convert all NumericDefaultInt to int in final pass

Done checklist

  • docs/SPEC.md updated
  • Test cases written

@Bolladeen Bolladeen changed the title feat(type_inference) added NumericDefaultInt cons feat(type_inference): added NumericDefaultInt cons Oct 12, 2020
@Bolladeen Bolladeen force-pushed the AJ-create_poly_lit_constraints branch from 2cabd0a to dc891ec Compare October 13, 2020 16:22
libflux/src/core/semantic/nodes.rs Outdated Show resolved Hide resolved
docs/SPEC.md Outdated Show resolved Hide resolved
libflux/src/core/semantic/convert.rs Outdated Show resolved Hide resolved
@Bolladeen Bolladeen force-pushed the AJ-create_poly_lit_constraints branch 4 times, most recently from e29153c to 8aa3972 Compare October 13, 2020 21:50
@Bolladeen Bolladeen force-pushed the AJ-create_poly_lit_constraints branch from 14680e9 to bbfcaa4 Compare October 22, 2020 02:01
Copy link
Contributor

@jpacik jpacik left a comment

Choose a reason for hiding this comment

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

Just some tiny suggestions but overall this looks very good.

stdlib/experimental/array/from.go Outdated Show resolved Hide resolved
stdlib/experimental/array/from.go Show resolved Hide resolved
semantic/flatbuffers_test.go Show resolved Hide resolved
semantic/flatbuffers_test.go Show resolved Hide resolved
semantic/ast.go Outdated Show resolved Hide resolved
semantic/analyze.go Outdated Show resolved Hide resolved
runtime/runtime_test.go Outdated Show resolved Hide resolved
libflux/src/core/semantic/convert.rs Outdated Show resolved Hide resolved
libflux/src/core/semantic/tests.rs Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Nov 11, 2020

Codecov Report

Merging #3252 (dd51a9c) into master (2e0f9dd) will decrease coverage by 0.09%.
The diff coverage is 23.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3252      +/-   ##
==========================================
- Coverage   49.35%   49.26%   -0.10%     
==========================================
  Files         351      351              
  Lines       36393    36496     +103     
==========================================
+ Hits        17962    17978      +16     
- Misses      15908    15990      +82     
- Partials     2523     2528       +5     
Impacted Files Coverage Δ
values/binary.go 80.75% <0.00%> (-10.51%) ⬇️
semantic/graph.go 4.88% <10.00%> (-0.13%) ⬇️
semantic/flatbuffers_deserialize.go 35.80% <40.00%> (+0.10%) ⬆️
semantic/walk.go 67.61% <50.00%> (-1.12%) ⬇️
semantic/flatbuffers.go 63.49% <71.42%> (+0.12%) ⬆️
compiler/compiler.go 61.62% <100.00%> (-0.55%) ⬇️
interpreter/interpreter.go 44.12% <100.00%> (-0.84%) ⬇️
semantic/analyze.go 69.60% <100.00%> (+0.06%) ⬆️
semantic/ast.go 90.44% <100.00%> (ø)
semantic/format.go 71.18% <100.00%> (-3.82%) ⬇️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e0f9dd...dd51a9c. Read the comment docs.

@Bolladeen Bolladeen force-pushed the AJ-create_poly_lit_constraints branch 4 times, most recently from d0a49c0 to 3b67afd Compare November 11, 2020 23:39
@Bolladeen Bolladeen force-pushed the AJ-create_poly_lit_constraints branch from 3b67afd to dd51a9c Compare November 12, 2020 00:28
 - Added NumericDefaultInt constraint in TypeInferencer
 - Added PolyNumericLiteral semantic node to SemanticGraph
 - Added ability to operate on binary expressions of float and int types
@Bolladeen Bolladeen force-pushed the AJ-create_poly_lit_constraints branch from dd51a9c to d82ebf0 Compare November 12, 2020 16:04
@Bolladeen Bolladeen marked this pull request as ready for review November 12, 2020 16:26
@Marwes Marwes mentioned this pull request Oct 8, 2021
@jacobmarble jacobmarble deleted the AJ-create_poly_lit_constraints branch January 4, 2024 16:48
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.

Allow numeric literal to be safely coerced to concrete numeric types
4 participants