//META: generated=true
//META: model=claude-sonnet-4-6
//META: generated_at=2026-06-02T07:58:38+00:00
//META: source_commit=a01e79278cf0be9772deb8b2be52ee87687697a3
//META: doc_ref=docs/language-reference/declarations.md#enumeration-types
//META: doc_section_digest=4b116a159e7885ebdd4cd361d9d70a300c658321193492133928c90bc17abd3e
//META: purpose=A value of an enumeration type can be implicitly converted to a value of its tag type.
//META: intent=functional
//META: pipeline_stage=runtime
//META: warning=Auto-generated. May drift from source. Do not edit by hand.

// Verifies that enum values implicitly convert to their tag type (int) without an explicit cast.
// Assigning `Color.Red` and `Color.Green` directly to `int` variables and printing them
// proves the implicit conversion yields the correct tag values 0 and 3.

//TEST:INTERPRET(filecheck=CHECK):

enum Color { Red, Green = 3, Blue }

void main()
{
    int r = Color.Red;
    int g = Color.Green;
    // CHECK: 0
    // CHECK: 3
    printf("%d\n%d\n", r, g);
}
