Thanks to visit codestin.com
Credit goes to github.com

Skip to content

attrdef with any invalid name causes compiler assert #2128

@Book-reader

Description

@Book-reader
attrdef @FOO = @test;
attrdef 1 = @test;
attrdef @foo = @test;
attrdef foo = @test;
attrdef $foo = @test;
attrdef #foo = @test;
attrdef "foo" = @test;
attrdef 'f' = @test;

any of these lines will cause the compiler to assert with the message:

⚠️ The compiler encountered an unexpected error: "Violated assert: context->tok == token_type".

- Function: advance_and_verify(...)
- Source file: /build/3k5w91avcbags2mxvfwlv5gmw2z39nl9-source/src/compiler/compiler_internal.h:2914

🙏 Please consider taking the time to file an issue on GitHub, so that we can get it fixed:

https://github.com/c3lang/c3c/issues/new so that we can get it fixed.
C3 Compiler Version:       0.7.2 (Pre-release, Jan  1 1980 00:00:00)
Installed directory:       /nix/store/2nvbz1b1nba9jl7cxkk8wf11avzl6x7p-c3c-0.7.2/bin/
Git Hash:                  unknown
Backends:                  LLVM
LLVM version:              19.1.7
LLVM default target:       x86_64-unknown-linux-gnu

c3c commit hash is fc5c70a6283dae1e659ba2fe87dca69c00160510

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingFixed needs testingNeeds verification / testing that it now works

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions