mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
fix sets of scoped imported enums (#13666)
This commit is contained in:
3
tests/cpp/enum.hpp
Normal file
3
tests/cpp/enum.hpp
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace namespaced {
|
||||
enum Enum { A, B, C };
|
||||
}
|
||||
9
tests/cpp/tenum_set.nim
Normal file
9
tests/cpp/tenum_set.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
discard """
|
||||
targets: "cpp"
|
||||
output: "{A, B, C}"
|
||||
"""
|
||||
|
||||
type Enum {.importcpp: "namespaced::Enum", header: "enum.hpp".} = enum A, B, C
|
||||
|
||||
var vals = {low(Enum) .. high(Enum)}
|
||||
echo vals
|
||||
Reference in New Issue
Block a user