// ── ILEmitterTests_Coverage_Data__Generic_IdentityFunction ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::Generic_IdentityFunction topic: generics status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test func identity(value: T) -> T { return value } func go() -> int { return identity(99) } // ── ILEmitterTests_GenericDerive__DeriveBoth_EqualityAndDebug ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_GenericDerive.cs::DeriveBoth_EqualityAndDebug topic: generics status: verified // verified behavior: Test.go(...) == "Box { item = 5 }" derive equality, debug data Box { item: T } func go() -> string { let a = Box { item: 5 } return a.ToString() } // ── ILEmitterTests_GenericDerive__GenericDebug_BoolField ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_GenericDerive.cs::GenericDebug_BoolField topic: generics status: verified // verified behavior: Test.go(...) == "Flag { on = True }" derive debug data Flag { on: T } func go() -> string { let f = Flag { on: true } return f.ToString() } // ── ILEmitterTests_GenericDerive__SingleTypeParam_Equality ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_GenericDerive.cs::SingleTypeParam_Equality topic: generics status: verified // verified behavior: Test.go(...) == true derive equality data Box { item: T } func go() -> bool { let a = Box { item: 42 } let b = Box { item: 42 } return a.Equals(b) } // ── ILEmitterTests2__Generic_Data_Type_Construction ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Generic_Data_Type_Construction topic: generics status: verified // verified behavior: Test.test(...) == 42 namespace Test data Box { value: T } func test() -> int { let b = Box { value: 42 } return b.value } // ── ILEmitterTests2__Generic_Identity_Function_Int ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Generic_Identity_Function_Int topic: generics status: verified // verified behavior: Test.test(...) == 42 namespace Test func id(x: T) -> T = x func test() -> int = id(42) // ── ILEmitterTests2__Generic_Identity_Function_Int_LetBinding ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Generic_Identity_Function_Int_LetBinding topic: generics status: verified // verified behavior: Test.test(...) == 43 namespace Test func id(x: T) -> T = x func test() -> int { let b = id(42) return b + 1 } // ── ILEmitterTests2__Generic_Identity_Function_String ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Generic_Identity_Function_String topic: generics status: verified // verified behavior: Test.test(...) == "hello" namespace Test func id(x: T) -> T = x func test() -> string = id("hello") // ── ILEmitterTests2__Generic_Identity_Function_String_LetBinding ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Generic_Identity_Function_String_LetBinding topic: generics status: verified // verified behavior: Test.test(...) == "hi!" namespace Test func id(x: T) -> T = x func test() -> string { let s = id("hi") return s + "!" } // ── ILEmitterTests2__Generic_Identity_Function_UserData_LetBinding ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Generic_Identity_Function_UserData_LetBinding topic: generics status: verified // verified behavior: Test.test(...) == 7 namespace Test data Box { n: int } func id(x: T) -> T = x func test() -> int { let b = id(Box { n: 7 }) return b.n } // ── TranspilerTests__Transpiles_Generic_Function ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Transpiles_Generic_Function topic: generics status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Util func first(items: List) -> T { return items[0] } func swap(a: A, b: B) -> B { return b }