Code Monkey home page Code Monkey logo

Comments (7)

zuiderkwast avatar zuiderkwast commented on August 29, 2024 1

Hi! I have added two commits for binaries/bitstrings (70a42c2 subtype relation and 37399e4 type checking bit expressions and patterns). Perhaps this helps a bit? It is not really well-tested yet...

from gradualizer.

josefs avatar josefs commented on August 29, 2024

The gradualizer currently doesn't know anything about Elixir. But it would be really nice to support it! Patches are welcome.
@tim2CF do you have any thoughts on this?

from gradualizer.

tim2CF avatar tim2CF commented on August 29, 2024

Hello!
I'll take a look on this week :)

from gradualizer.

gomoripeti avatar gomoripeti commented on August 29, 2024

hello, I think this warning is caused by Gradualizer not yet supporting binaries (and binary patterns). If you replace String.t() with binary() you will still get a similar warning.

from gradualizer.

josefs avatar josefs commented on August 29, 2024

@mbuhot, I believe we've added the support needed for your program to go through Gradualizer. Can you confirm?

from gradualizer.

mbuhot avatar mbuhot commented on August 29, 2024

@josefs I still getting a type error, but now it is consistent whether the function is typed as String.t or binary.

iex(7)> :gradualizer.type_check_module(Foo)
The pattern "#" on line 0 doesn't have the type integer()
:nok

Looks like there is a comment in the tests (https://github.com/josefs/Gradualizer/blob/master/test/should_pass/bitstring.erl#L5-L9) indicating that binary patterns don't type check against binary type specs.

Feel free to close this issue if you'd rather track binary pattern support (independent of Elixir) separately.

from gradualizer.

josefs avatar josefs commented on August 29, 2024

@mbuhot, thanks for your quick feedback! The error message that you get now is rather puzzling to me but we don't have anyone working on Elixir support so I'm afraid it won't be investigated any time soon. So I'll close this ticket then.

The comment that you pointed to turned out to be outdated and I've updated the test case to reflect that.

from gradualizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.