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

Checker errors depending on declaration locations (single threaded) #3627

Open
terickson001 opened this issue May 24, 2024 · 0 comments
Open

Comments

@terickson001
Copy link
Contributor

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Operating System & Odin Version:
    Odin: dev-2024-05:c091b0d06
    OS: Windows 11 Home Basic (version: 23H2), build 22631.3447
    CPU: AMD Ryzen 9 3950X 16-Core Processor
    RAM: 32681 MiB
    Backend: LLVM 17.0.1

Expected Behavior

Location of declarations should not affect the type checker

Current Behavior

The type checker consistently gives Error: Invalid type usage 'CharMap' in when the relevant types are in certain positions in my example code below, but when reordered, or the types are laid out next to each other in the file, the error does not occur.

This error still occurs with odin check -no-threaded-checker and odin check -thread-count:1

The relevant types are:
Face, FaceRec_, CharMap, CharMapRec_

Steps to Reproduce

This is a gist of the file that caused the error, it's 1KLOC, but I could not reduce it without altering the behavior
https://gist.github.com/terickson001/b74b3001e29e2663ccd6dac4122b7a3f

running odin check on the directory containing this file reliably reproduces the error on my machine.

Failure Logs

E:/Projects/Odin/bind/out/freetype.odin(1:2) Error: Undefined entry point procedure 'main'

         ^
E:/Projects/Odin/bind/out/freetype.odin(619:24) Error: Invalid type usage 'CharMap'
        charmaps:            ^CharMap,
@terickson001 terickson001 changed the title Checker errors depending on declaration order (single threaded) Checker errors depending on declaration locations (single threaded) May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants