fix: Added missing enum tuple variant check and error

This commit is contained in:
2025-09-16 23:54:04 +02:00
parent 467a037a77
commit 446756c7e1
5 changed files with 69 additions and 28 deletions

View File

@@ -0,0 +1,12 @@
use lua_typed::Typed;
#[derive(Typed)]
#[serde(tag = "tag")]
enum Test {
A,
B(String),
C(u8),
D { test: f32 },
}
fn main() {}

View File

@@ -0,0 +1,11 @@
error: Tuple structs/variants are currently not supported by Typed
--> tests/ui/tuple_enum_variant.rs:7:6
|
7 | B(String),
| ^^^^^^^^
error: Tuple structs/variants are currently not supported by Typed
--> tests/ui/tuple_enum_variant.rs:8:6
|
8 | C(u8),
| ^^^^

View File

@@ -1,4 +1,4 @@
error: Tuple structs are not supported by Typed
error: Tuple structs/variants are currently not supported by Typed
--> tests/ui/tuple_struct.rs:4:16
|
4 | pub struct Test(u8);