Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.
This repository was archived by the owner on Jun 16, 2021. It is now read-only.

Importing enum doesn't import enum values #41

@Maykeye

Description

@Maykeye

Package b:

enum Em{
    Em1
}

Package c:

  import b{Em}

  func main() : int {
      em : Em = Em1;
      return 0;
  }

Running:

 ~/src/bitwise/ion$ git pull && gcc main.c
 Already up-to-date.

 ~/src/bitwise/ion$ IONHOME=. ./a.out c
 /mnt/tera1/devel/src/bitwise/ion/system_packages/builtin/types_win32.ion(4): warning: Unknown declaration #directive 'static_assert'
 /mnt/tera1/devel/src/bitwise/ion/system_packages/builtin/types_win32.ion(5): warning: Unknown declaration #directive 'static_assert'
 /mnt/tera1/devel/src/bitwise/ion/c/c.ion(4): error: Unresolved name 'Em1'

Using import b{...} makes everything compiling fine, but importing enum should probably import values as well, as otherwise it's not very useful, but pretty surprising

(Also I'm on linux, I thought _win32.ions are not parsed)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions