Coder Social home page Coder Social logo

Comments (2)

zaskar9 avatar zaskar9 commented on August 27, 2024

This is a known issue. I mentioned the problem when talking about the COPY procedures. The current implementation copies the entire array struct and thus "updates" the length of the array as well. In your example, this happens when the array is passed as a non-variable parameter. In this point, the compiler generates a copy and passes a pointer to that copy to the Capacity procedure.

As I mentioned elsewhere, I am not entirely happy with the current internal representation of arrays and plan to change it (again). This issue is precisely one of the reasons why I am not happy with it. Therefore, I propose that your example becomes a unit test that will help verify whether the planned refactoring will solve this issue down the line.

from oberon-lang.

zaskar9 avatar zaskar9 commented on August 27, 2024

This has been fixed in the latest version of oberon-lang. Array and string assignment is now handled much more elaborately (and, hopefully, correctly) by CodeGen.

from oberon-lang.

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.