Skip to content

feat: improvements for type checker (current limitations) #40

Description

@leonidas1712
  • Programs like let x = {}; , let x = { 2; } where assigned to blk with no last expr, should either be rejected or accepted but runtime must change to allow this (assignment to unit is allowed in Rust)
  • Currently if blk decls have any errors, those are thrown first without checking last expr because last expr might depend on decls.
    e.g
let x : int = true;
let y = 20;
{
    let y : bool = 20;
}
x + false

x+false is the last expr, add is not allowed for bool but type checker won't throw this until prev errors are fixed.

  • Need more advanced control flow analysis to see what the last expr depends on (probably after 4215 over)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions