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

Skip to content

Confusing casting error #2604

@cbuttner

Description

@cbuttner
typedef Foo = char[<4>];

fn void main(String[] args) {
  int[<4>] a;
  Foo f = (Foo)a;
}
 5: fn void main(String[] args) {
 6:   int[<4>] a;
 7:   Foo f = (Foo)a;
              ^^^^^^
(/tmp/test/src/main.c3:7:11) Error: Implicitly casting 'char[<4>]' to 'Foo' is not permitted, but you may do an explicit cast by placing '(Foo)' before the expression.

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