Coder Social home page Coder Social logo

Can't create arrays of Func about rock HOT 3 CLOSED

ooc-lang avatar ooc-lang commented on July 17, 2024
Can't create arrays of Func

from rock.

Comments (3)

nddrylliog avatar nddrylliog commented on July 17, 2024

The first error (No such variable Func) is because there's indeed no such type named 'Func'.

'Func' isn't a cover nor a class, it's a builtin type that is parsed as the AST node 'FuncType'. That also explains the second error, where 'Func' isn't treated as a variable access but as a type and thus is confusing the generics code.

The solution is.. maybe to declare Func: cover from Pointer in the ooc code? I'll have to try that. Or to create at run-time a dummy 'Func' typedecl, to which we can resolve accesses to Func, and make sure that, in the parser, we can have real accesses to Func, not just 'types'.

from rock.

nddrylliog avatar nddrylliog commented on July 17, 2024

Two-thirds of this is fixed by commit 90786ac : we can now do raw arrays and ooc arrays of funcs.

from rock.

nddrylliog avatar nddrylliog commented on July 17, 2024

Aand it's good. We can do ArrayList/HashMaps/whatever of Funcs now.
Hallelujah! Closed by 18fb2e8

from rock.

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.