// ── DataContractTests__ClassAttribute_ForcesClass ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::ClassAttribute_ForcesClass topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test [Class] struct Point { x: int y: int } // ── DataContractTests__ReadonlyData_StaysStruct_EvenWhenLarge ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::ReadonlyData_StaysStruct_EvenWhenLarge topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test readonly struct Big { a: double b: double c: double d: double e: double f: double g: double h: double i: double } // ── DataContractTests__RecursiveField_DirectSelfReference_Errors ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::RecursiveField_DirectSelfReference_Errors topic: struct status: verified // verified behavior: reports diagnostic ES2002 namespace Test struct Node { value: int next: Node } // ── DataContractTests__RecursiveField_InGenericContainer_Errors ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::RecursiveField_InGenericContainer_Errors topic: struct status: verified // verified behavior: reports diagnostic ES2002 namespace Test struct Tree { value: int children: List } // ── DataContractTests__SmallData_StaysStruct ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::SmallData_StaysStruct topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Point { x: int y: int } // ── DataContractTests__StructAttribute_ForcesStruct ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::StructAttribute_ForcesStruct topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test [Struct] struct Big { a: double b: double c: double d: double e: double f: double g: double h: double i: double } // ── DefaultNamedArgsTests__CompositeDefault_NotStampedAsConstant ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DefaultNamedArgsTests.cs::CompositeDefault_NotStampedAsConstant topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Opts { depth: int = 0 } func walk(n: int, o: Opts = Opts { depth: 1 }) -> int = n + o.depth // ── DefaultNamedArgsTests__Default_CompositeLiteral_FreshPerCall ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DefaultNamedArgsTests.cs::Default_CompositeLiteral_FreshPerCall topic: struct status: verified // verified behavior: Test.go(...) == 0 namespace Test struct Opts { depth: int = 0 } func walk(o: Opts = Opts { depth: 0 }) -> int = o.depth func go() -> int = walk() // ── DefaultNamedArgsTests__Default_OnMethod ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DefaultNamedArgsTests.cs::Default_OnMethod topic: struct status: verified // verified behavior: Test.go(...) == 15 namespace Test struct Counter { v: int } func (c: Counter) bump(by: int = 5) -> int = c.v + by func go() -> int { let c = Counter { v: 10 } return c.bump() } // ── DefaultNamedArgsTests__Named_OnConstruction_PositionalData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DefaultNamedArgsTests.cs::Named_OnConstruction_PositionalData topic: struct status: verified // verified behavior: Test.go(...) == 7 namespace Test struct Vec2(x: int, y: int) func go() -> int { let v = Vec2(y: 4, x: 3) return v.x + v.y } // ── EmitterStressTests__PositionalDataWithListLiterals ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: EmitterStressTests.cs::PositionalDataWithListLiterals topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace T struct Config(name: string, url: string, category: string) func defaults() -> List { return [ Config("A", "http://a.com", "cat1"), Config("B", "http://b.com", "cat2"), ] } // ── FeatureMixingTests__Axis3_GenericReadonlyData_WithChain ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: FeatureMixingTests.cs::Axis3_GenericReadonlyData_WithChain topic: struct status: verified // verified behavior: Test.run(...) == 303 namespace Test readonly struct Pair { first: A second: B } func run() -> int { let p = Pair { first: 1, second: 2 } let q = p with { first: 100 } let r = q with { second: 200 } return r.first + r.second + p.first + p.second } // ── FeatureMixingTests__Axis3_WithOnReadonlyData_OverwritingEmbeddedField ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: FeatureMixingTests.cs::Axis3_WithOnReadonlyData_OverwritingEmbeddedField topic: struct status: verified // verified behavior: Test.run(...) == 34 namespace Test struct Vec2 { var x: int var y: int } readonly struct Transform { Vec2 scale: int } func run() -> int { let t = Transform { x: 1, y: 2, scale: 3 } let u = t with { Vec2: Vec2 { x: 10, y: 20 } } return u.x + u.y + u.scale + t.x } // ── FeatureMixingTests__Axis3_WithUpdatesEmbeddedField_PromotedAccess ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: FeatureMixingTests.cs::Axis3_WithUpdatesEmbeddedField_PromotedAccess topic: struct status: verified // verified behavior: Test.run(...) == 33 namespace Test struct Vec2 { var x: int var y: int } struct Wrap { Vec2 tag: int } func run() -> int { let w = Wrap { x: 1, y: 2, tag: 3 } let q = w with { Vec2: Vec2 { x: 10, y: 20 } } return q.x + q.y + q.tag } // ── FeatureMixingTests__Axis6_DeriveEquality_OnGenericData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: FeatureMixingTests.cs::Axis6_DeriveEquality_OnGenericData topic: struct status: verified // verified behavior: Test.strPair(...) == false namespace Test derive equality struct Pair { first: A second: B } func intPair() -> bool { let a = Pair { first: 3, second: 4 } let b = Pair { first: 3, second: 4 } return a.Equals(b) } func strPair() -> bool { let a = Pair { first: "x", second: 1 } let b = Pair { first: "y", second: 1 } return a.Equals(b) } // ── FeatureMixingTests__Axis6_DeriveEquality_OnTypeWithEmbeddedField ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: FeatureMixingTests.cs::Axis6_DeriveEquality_OnTypeWithEmbeddedField topic: struct status: verified // verified behavior: Test.differingEmbedded(...) == false namespace Test struct Vec2 { x: int y: int } derive equality struct Box { Vec2 tag: int } func sameTag() -> bool { let a = Box { x: 1, y: 2, tag: 7 } let b = Box { x: 1, y: 2, tag: 7 } return a.Equals(b) } func differingEmbedded() -> bool { let a = Box { x: 1, y: 2, tag: 7 } let b = Box { x: 99, y: 2, tag: 7 } return a.Equals(b) } // ── FluentChainTests__ValueData_TransformChain ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: FluentChainTests.cs::ValueData_TransformChain topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Vec { x: int, y: int } func (v: Vec) add(o: Vec) -> Vec = Vec { x: v.x + o.x, y: v.y + o.y } func (v: Vec) scaled(k: int) -> Vec = Vec { x: v.x * k, y: v.y * k } func go() -> int { let r = (Vec { x: 3, y: 2 }).add(Vec { x: 1, y: 4 }).scaled(4) return r.x + r.y // (4,6)*4 = (16,24) → 40 } // ── ForwardReferenceTests__Data_Embeds_LaterData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ForwardReferenceTests.cs::Data_Embeds_LaterData topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Transform { Vec2 scale: int } struct Vec2 { var x: int var y: int } func go() -> int { var t = Transform { x: 10, y: 20, scale: 5 } t.x += 5 return t.x + t.y + t.scale // 15 + 20 + 5 } // ── ForwardReferenceTests__Data_Field_Of_LaterData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ForwardReferenceTests.cs::Data_Field_Of_LaterData topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct A { b: B } struct B { n: int } func go() -> int { let a = A { b: B { n: 7 } } return a.b.n } // ── ForwardReferenceTests__Data_ListField_Of_LaterData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ForwardReferenceTests.cs::Data_ListField_Of_LaterData topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct A { bs: List } struct B { n: int } func go() -> int { let xs = List() xs.Add(B { n: 1 }) xs.Add(B { n: 2 }) let a = A { bs: xs } return a.bs.Count } // ── FuzzFindingsTests__NestedDataField_ShadowedFieldName_ReadsInnerValue ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: FuzzFindingsTests.cs::NestedDataField_ShadowedFieldName_ReadsInnerValue topic: struct status: verified // verified behavior: Test.go(...) == 7 namespace Test struct Inner { v: int } struct Outer { v: int, inner: Inner } func (o: Outer) readInner() -> int { return o.inner.v } func go() -> int { return Outer { v: 100, inner: Inner { v: 7 } }.readInner() } // ── FuzzFindingsTests__PromotedMethod_NestedFieldInListLiteral_ResolvesAgainstTargetType ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: FuzzFindingsTests.cs::PromotedMethod_NestedFieldInListLiteral_ResolvesAgainstTargetType topic: struct status: verified // verified behavior: Test.go(...) == 5 namespace Test struct D0 { f0: int, f1: int } struct D1 { f0: int, f1: int, f2: D0 } func (p1_0: D1) h1() -> int { let v1 = [p1_0.f2.f0, (-27)] return p1_0.f0 } func h2(p2_0: int) -> int { return D1 { f0: p2_0, f1: (-4), f2: D0 { f0: p2_0, f1: 39 } }.h1() } func go() -> int { return h2(5) } // ── ILEmitterTests__Attribute_ObsoleteWithMessage_EmittedOntoType ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::Attribute_ObsoleteWithMessage_EmittedOntoType topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test [Obsolete("do not use")] struct Legacy { value: int } func run() -> int { return 0 } // ── ILEmitterTests__Default_StructZeroed ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::Default_StructZeroed topic: struct status: verified // verified behavior: Test.run(...) == 0 namespace Test struct P { x: int y: int } func run() -> int { let p = default(P) return p.x + p.y } // ── ILEmitterTests__DeriveDebug_NoFields_ShowsEmptyBraces ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::DeriveDebug_NoFields_ShowsEmptyBraces topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test derive debug struct Marker { } // ── ILEmitterTests__DeriveDebug_Struct_ToStringContainsFieldValues ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::DeriveDebug_Struct_ToStringContainsFieldValues topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test derive debug struct Point { x: int y: int } // ── ILEmitterTests__DeriveEquality_GetHashCode_EqualInstancesHaveEqualHash ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::DeriveEquality_GetHashCode_EqualInstancesHaveEqualHash topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test derive equality struct Point { x: int y: int } // ── ILEmitterTests__DeriveEquality_Struct_DifferingField_AreNotEqual ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::DeriveEquality_Struct_DifferingField_AreNotEqual topic: struct status: verified // verified behavior: Test.go(...) == false namespace Test derive equality struct Point { x: int y: int } func go() -> bool { let p1 = Point { x: 3, y: 4 } let p2 = Point { x: 3, y: 5 } return p1.Equals(p2) } // ── ILEmitterTests__DeriveEquality_Struct_NoFields_AlwaysEqual ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::DeriveEquality_Struct_NoFields_AlwaysEqual topic: struct status: verified // verified behavior: Test.go(...) == true namespace Test derive equality struct Unit { } func go() -> bool { let a = Unit {} let b = Unit {} return a.Equals(b) } // ── ILEmitterTests__DeriveEquality_Struct_TwoEqualInstances_AreEqual ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::DeriveEquality_Struct_TwoEqualInstances_AreEqual topic: struct status: verified // verified behavior: Test.go(...) == true namespace Test derive equality struct Point { x: int y: int } func go() -> bool { let p1 = Point { x: 3, y: 4 } let p2 = Point { x: 3, y: 4 } return p1.Equals(p2) } // ── ILEmitterTests__DeriveEqualityAndDebug_Combined ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::DeriveEqualityAndDebug_Combined topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test derive equality, debug struct Pair { a: int b: string } // ── ILEmitterTests__Emit_RefDataWithMethodsAndLambdas ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::Emit_RefDataWithMethodsAndLambdas topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace T struct Config(name: string, url: string) class Aggregator { configs: List count: int init() { self.configs = List() self.count = 0 } func getCount() -> int = self.count func addConfig(name: string, url: string) = self.configs.Add(Config(name, url)) } // ── ILEmitterTests__GenericData_Construction_MixedTypes ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::GenericData_Construction_MixedTypes topic: struct status: verified // verified behavior: Test.go(...) == "hello" namespace Test struct Pair { first: A second: B } func go() -> string { let p = Pair { first: 42, second: "hello" } return p.second } // ── ILEmitterTests__GenericData_Construction_StructLiteralWithTypeArgs ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::GenericData_Construction_StructLiteralWithTypeArgs topic: struct status: verified // verified behavior: Test.makePair(...) == 7 namespace Test struct Pair { first: A second: B } func makePair() -> int { let p = Pair { first: 3, second: 4 } return p.first + p.second } // ── ILEmitterTests__GenericData_Declaration_EmitsOpenGenericTypeDefinition ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::GenericData_Declaration_EmitsOpenGenericTypeDefinition topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Pair { first: A second: B } // ── ILEmitterTests__GenericData_TwoInstantiations_AreDistinctAtRuntime ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::GenericData_TwoInstantiations_AreDistinctAtRuntime topic: struct status: verified // verified behavior: Test.strPair(...) == "b" namespace Test struct Pair { first: A second: B } func intPair() -> int { let p = Pair { first: 10, second: 20 } return p.first } func strPair() -> string { let p = Pair { first: "a", second: "b" } return p.second } // ── ILEmitterTests__GenericExternalType_List_ResolvesCorrectly ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::GenericExternalType_List_ResolvesCorrectly topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Container { items: List } // ── ILEmitterTests__GenericExternalType_UserDefinedArg_ResolvesCorrectly ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::GenericExternalType_UserDefinedArg_ResolvesCorrectly topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Item { name: string value: int } struct Bag { items: List } // ── ILEmitterTests__LetField_IsEmittedAsInitOnly ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::LetField_IsEmittedAsInitOnly topic: struct status: verified // verified behavior: Test.make(...) == 3 namespace Test struct Point { let x: int var y: int } func make() -> int { let p = Point { x: 1, y: 2 } return p.x + p.y } // ── ILEmitterTests__MultiFile_DuplicateDataName_ReportsDiagnostic ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::MultiFile_DuplicateDataName_ReportsDiagnostic topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Thing { a: int } // ── ILEmitterTests__PositionalData_BasicConstruction ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::PositionalData_BasicConstruction topic: struct status: verified // verified behavior: Test.makeAndSum(...) == 7 namespace Test struct Vec2(x: int, y: int) func (v: Vec2) sum() -> int { return v.x + v.y } func makeAndSum() -> int { let v = Vec2(3, 4) return v.sum() } // ── ILEmitterTests__PositionalData_FieldAccess ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::PositionalData_FieldAccess topic: struct status: verified // verified behavior: Test.make(...) == 42 namespace Test struct Item(name: string, value: int) func make() -> int { let a = Item("hello", 42) return a.value } // ── ILEmitterTests__ReadonlyData_AllFieldsInitOnly ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::ReadonlyData_AllFieldsInitOnly topic: struct status: verified // verified behavior: Test.make(...) == 7.0f namespace Test readonly struct Vec2 { x: float y: float } func make() -> float { let v = Vec2 { x: 3.0, y: 4.0 } return v.x + v.y } // ── ILEmitterTests__ReadonlyData_HasIsReadOnlyAttribute ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::ReadonlyData_HasIsReadOnlyAttribute topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test readonly struct Pt { x: int y: int } func make() -> int { return 0 } // ── ILEmitterTests__Struct_FieldAccess_And_Creation ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::Struct_FieldAccess_And_Creation topic: struct status: verified // verified behavior: Test.scale(...) == 35 namespace Test struct Vec2 { x: int y: int } func scale(factor: int, v: Vec2) -> int { return v.x * factor + v.y * factor } // ── ILEmitterTests__With_CopyAndOverwrite_ProducesNewValue ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::With_CopyAndOverwrite_ProducesNewValue topic: struct status: verified // verified behavior: Test.run(...) == 14 namespace Test struct Point { x: int y: int } func run() -> int { let p = Point { x: 3, y: 4 } let q = p with { x: 10 } return q.x + q.y } // ── ILEmitterTests__With_DoesNotMutateOriginal ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::With_DoesNotMutateOriginal topic: struct status: verified // verified behavior: Test.run(...) == 3 namespace Test struct Point { x: int y: int } func run() -> int { let p = Point { x: 3, y: 4 } let q = p with { x: 10 } return p.x } // ── ILEmitterTests__With_OnReadonlyData_Works ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::With_OnReadonlyData_Works topic: struct status: verified // verified behavior: Test.run(...) == 100 namespace Test readonly struct Vec { x: int y: int } func run() -> int { let v = Vec { x: 1, y: 2 } let w = v with { y: 99 } return w.x + w.y } // ── ILEmitterTests_Coverage_Adversarial__Generics_ListOfValueData_AddAndIndex ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Adversarial.cs::Generics_ListOfValueData_AddAndIndex topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Pt { x: int, y: int } func go() -> int { let xs = List() xs.Add(Pt { x: 10, y: 20 }) xs.Add(Pt { x: 30, y: 40 }) return xs[0].y + xs[1].x } // ── ILEmitterTests_Coverage_Adversarial__Generics_UserPairSwap ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Adversarial.cs::Generics_UserPairSwap topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Pair { first: A second: B } func go() -> int { let p = Pair { first: 3, second: 7 } let q = Pair { first: p.second, second: p.first } return q.first - q.second } // ── ILEmitterTests_Coverage_Adversarial__Ns_AmbiguousResolvedByQualifier ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Adversarial.cs::Ns_AmbiguousResolvedByQualifier topic: struct status: verified // verified behavior: Test.go(...) == 9 namespace A struct Widget { a: int } // ── ILEmitterTests_Coverage_Adversarial__Ns_LowerCaseTypeName_IsError ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Adversarial.cs::Ns_LowerCaseTypeName_IsError topic: struct status: verified // verified behavior: reports diagnostic ES2160 namespace Test struct widget { x: int } // ── ILEmitterTests_Coverage_Adversarial__Ns_PromotedMethodReachableViaReceiverType ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Adversarial.cs::Ns_PromotedMethodReachableViaReceiverType topic: struct status: verified // verified behavior: Test.go(...) == 11 namespace Lib struct Vec { x: int } func (v: Vec) bump() -> int { return v.x + 1 } // ── ILEmitterTests_Coverage_Adversarial__Ns_ThreeNamespacesChainedViaUsings ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Adversarial.cs::Ns_ThreeNamespacesChainedViaUsings topic: struct status: verified // verified behavior: Test.go(...) == 500 namespace Core struct Money { cents: int } // ── ILEmitterTests_Coverage_Adversarial__Ns_UsingBringsTypeAndFreeFuncBare ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Adversarial.cs::Ns_UsingBringsTypeAndFreeFuncBare topic: struct status: verified // verified behavior: Test.go(...) == 11 namespace Lib struct Vec { x: int } func incr(n: int) -> int { return n + 1 } // ── ILEmitterTests_Coverage_Adversarial__Ns_ValueReceiverFreeCall_IsError ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Adversarial.cs::Ns_ValueReceiverFreeCall_IsError topic: struct status: verified // verified behavior: reports diagnostic ES2142 namespace Test struct Vec { x: int } func (v: Vec) bump() -> int { return v.x + 1 } func go() -> int { let v = Vec { x: 10 } return bump(v) } // ── ILEmitterTests_Coverage_Adversarial__Reflection_GetTypeNameOfData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Adversarial.cs::Reflection_GetTypeNameOfData topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Widget { id: int } func go() -> string { let w = Widget { id: 1 } return w.GetType().Name } // ── ILEmitterTests_Coverage_Collections__Added_ListOfPointers_ForInSum ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Collections.cs::Added_ListOfPointers_ForInSum topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Box { n: int } func go() -> int { let xs = [new Box { n: 10 }, new Box { n: 20 }, new Box { n: 30 }] var t = 0 for b in xs { t += b.n } return t } // ── ILEmitterTests_Coverage_Collections__Added_TupleOfValueData_Item ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Collections.cs::Added_TupleOfValueData_Item topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Box { n: int } func go() -> int { let t = (Box { n: 2 }, Box { n: 5 }) return t.Item2.n } // ── ILEmitterTests_Coverage_Collections__Added_ValueDataList_ForInSum ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Collections.cs::Added_ValueDataList_ForInSum topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Box { n: int } func go() -> int { let xs = [Box { n: 10 }, Box { n: 20 }, Box { n: 30 }] var t = 0 for b in xs { t += b.n } return t } // ── ILEmitterTests_Coverage_Collections__List_OfData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Collections.cs::List_OfData topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Pt { x: int, y: int } func go() -> int { let pts = List() pts.Add(Pt { x: 10, y: 20 }) let p = pts[0] return p.x + p.y } // ── ILEmitterTests_Coverage_ControlFlow__Added_For_RangeWithPointerWork ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_ControlFlow.cs::Added_For_RangeWithPointerWork topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Acc { total: int } func go() -> int { var a = new Acc { total: 0 } for i in 1..4 { a.total += i } return a.total } // ── ILEmitterTests_Coverage_ControlFlow__Added_ForIn_OverPointerList_Count ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_ControlFlow.cs::Added_ForIn_OverPointerList_Count topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Box { n: int } func go() -> int { let xs = [new Box { n: 1 }, new Box { n: 2 }, new Box { n: 3 }] var c = 0 for b in xs { c += 1 } return c } // ── ILEmitterTests_Coverage_ControlFlow__Added_Ternary_NestedPointer ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_ControlFlow.cs::Added_Ternary_NestedPointer topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Box { n: int } func go() -> int { let pick = true let b = pick ? new Box { n: 2 } : new Box { n: 9 } return b.n } // ── ILEmitterTests_Coverage_ControlFlow__For_AccumulatesIntoData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_ControlFlow.cs::For_AccumulatesIntoData topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Acc { var total: int } func go() -> int { var a = Acc { total: 0 } for i in 0..10 { a.total += i } return a.total } // ── ILEmitterTests_Coverage_Data__Data_ConstructAndFieldAccess ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::Data_ConstructAndFieldAccess topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Point { x: int, y: int } func go() -> int { let p = Point { x: 10, y: 20 } return p.x + p.y } // ── ILEmitterTests_Coverage_Data__Data_FactoryFunction ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::Data_FactoryFunction topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Box { v: int } func makeBox(n: int) -> Box { return Box { v: n * 2 } } func go() -> int { return makeBox(21).v } // ── ILEmitterTests_Coverage_Data__Data_InstanceMethodPromotion ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::Data_InstanceMethodPromotion topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Sq { side: int } func (s: Sq) area() -> int { return s.side * s.side } func go() -> int { let s = Sq { side: 5 } return s.area() } // ── ILEmitterTests_Coverage_Data__Data_MutableField ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::Data_MutableField topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Counter { var n: int } func go() -> int { var c = Counter { n: 10 } c.n += 5 return c.n } // ── ILEmitterTests_Coverage_Data__Data_PositionalConstruction ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::Data_PositionalConstruction topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Vec2(x: int, y: int) func go() -> int { let v = Vec2(3, 4) return v.x + v.y } // ── ILEmitterTests_Coverage_Data__Derive_Equality ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::Derive_Equality topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test derive equality struct P { x: int, y: int } func go() -> bool { let a = P { x: 1, y: 2 } let b = P { x: 1, y: 2 } return a == b } // ── ILEmitterTests_Coverage_Data__Derive_Equality_Distinct ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::Derive_Equality_Distinct topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test derive equality struct P { x: int, y: int } func go() -> bool { let a = P { x: 1, y: 2 } let b = P { x: 1, y: 9 } return a == b } // ── ILEmitterTests_Coverage_Data__Generic_Pair ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::Generic_Pair topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Pair { first: A, second: B } func go() -> int { let p = Pair { first: 3, second: 5 } return p.first + p.second } // ── ILEmitterTests_Coverage_Data__Generic_SwapPair ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::Generic_SwapPair topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Pair { first: A, second: B } func go() -> int { let p = Pair { first: 2, second: 1 } let q = Pair { first: p.second, second: p.first } return q.first } // ── ILEmitterTests_Coverage_Data__ReadonlyData_With ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::ReadonlyData_With topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test readonly struct P { x: int, y: int } func go() -> int { let a = P { x: 3, y: 4 } let b = a with { x: 9 } return b.x + b.y } // ── ILEmitterTests_Coverage_Data__StructEmbedding_PromotedAccess ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Data.cs::StructEmbedding_PromotedAccess topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Vec2 { var x: int var y: int } struct Transform { Vec2 var scale: int } func go() -> int { var t = Transform { x: 10, y: 20, scale: 5 } t.x += 5 return t.x + t.y } // ── ILEmitterTests_Coverage_Misc__Interface_Conformance ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Misc.cs::Interface_Conformance topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test interface ISized { func size() -> int } struct Crate : ISized { items: int } func (c: Crate) size() -> int { return c.items + 1 } func measure(s: ISized) -> int { return s.size() } func go() -> int { let c = Crate { items: 10 } return measure(c) } // ── ILEmitterTests_Coverage_Misc__NestedData_FieldChain ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Misc.cs::NestedData_FieldChain topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Inner { v: int } struct Outer { inner: Inner, tag: int } func go() -> int { let o = Outer { inner: Inner { v: 4 }, tag: 3 } return o.inner.v + o.tag } // ── ILEmitterTests_Coverage_Numerics__Byte_FieldRoundTrip ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Numerics.cs::Byte_FieldRoundTrip topic: struct status: verified // verified behavior: Test.go(...) == (byte)128 namespace Test struct Pixel { r: byte, g: byte, b: byte } func go() -> byte { let p = Pixel { r: 128, g: 64, b: 32 } return p.r } // ── ILEmitterTests_Coverage_Numerics__Double_FieldMagnitudeSquared ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Numerics.cs::Double_FieldMagnitudeSquared topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Vec { x: double, y: double } func go() -> double { let v = Vec { x: 3.0, y: 4.0 } return v.x * v.x + v.y * v.y } // ── ILEmitterTests_Coverage_Numerics__Int_FieldArithmetic ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Numerics.cs::Int_FieldArithmetic topic: struct status: verified // verified behavior: Test.go(...) == 30 namespace Test struct Vec { x: int, y: int } func go() -> int { let v = Vec { x: 10, y: 20 } return v.x + v.y } // ── ILEmitterTests_Coverage_Numerics__Long_FieldRoundTrip ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Numerics.cs::Long_FieldRoundTrip topic: struct status: verified // verified behavior: Test.go(...) == 5_000_000_000L namespace Test struct Timestamp { epochMs: long } func go() -> long { let t = Timestamp { epochMs: 5000000000 } return t.epochMs } // ── ILEmitterTests_GenericDerive__DeriveDebug_GenericStringFields ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_GenericDerive.cs::DeriveDebug_GenericStringFields topic: struct status: verified // verified behavior: Test.go(...) == "Pair { first = a, second = b }" derive debug struct Pair { first: A second: B } func go() -> string { let p = Pair { first: "a", second: "b" } return p.ToString() } // ── ILEmitterTests_GenericDerive__DeriveDebug_GenericToString ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_GenericDerive.cs::DeriveDebug_GenericToString topic: struct status: verified // verified behavior: Test.go(...) == "Pair { first = 3, second = 4 }" derive debug struct Pair { first: A second: B } func go() -> string { let p = Pair { first: 3, second: 4 } return p.ToString() } // ── ILEmitterTests_GenericDerive__NonGenericDerive_StillWorks ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_GenericDerive.cs::NonGenericDerive_StillWorks topic: struct status: verified // verified behavior: Test.go(...) == true derive equality struct Point { x: int y: int } func go() -> bool { let a = Point { x: 1, y: 2 } let b = Point { x: 1, y: 2 } return a.Equals(b) } // ── ILEmitterTests_Integration__CrossNamespace_FunctionGainsNoMethodFormAcrossNamespaces_IsError ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Integration.cs::CrossNamespace_FunctionGainsNoMethodFormAcrossNamespaces_IsError topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Geo struct Rect { w: int h: int } // ── ILEmitterTests_Integration__CrossNamespace_PromotedInstanceMethod ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Integration.cs::CrossNamespace_PromotedInstanceMethod topic: struct status: verified // verified behavior: Test.go(...) == 30 namespace Geometry struct Point { x: int y: int } func (p: Point) area() -> int { return p.x * p.y } // ── ILEmitterTests_Integration__CrossNamespace_SameNamespacePromotionStillResolves ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Integration.cs::CrossNamespace_SameNamespacePromotionStillResolves topic: struct status: verified // verified behavior: Test.go(...) == 20 namespace Geo struct Rect { w: int h: int } func (r: Rect) area() -> int { return r.w * r.h } // ── ILEmitterTests_Integration__CrossNamespace_ThreeUnitsChained ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Integration.cs::CrossNamespace_ThreeUnitsChained topic: struct status: verified // verified behavior: Test.go(...) == 500 namespace Core struct Money { cents: int } // ── ILEmitterTests_Integration__CrossNamespace_TypeVisibleViaUsing ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Integration.cs::CrossNamespace_TypeVisibleViaUsing topic: struct status: verified // verified behavior: Test.go(...) == 7 namespace Geometry struct Point { x: int y: int } // ── ILEmitterTests_Integration__Reflection_ValueDataTypeName ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Integration.cs::Reflection_ValueDataTypeName topic: struct status: verified // verified behavior: Test.go(...) == "Point" namespace Test struct Point { x: int, y: int } func go() -> string { let p = Point { x: 1, y: 2 } return p.GetType().Name } // ── ILEmitterTests_Nominal__Added_GenericConformance ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::Added_GenericConformance topic: struct status: verified // verified behavior: Test.go(...) == 9 namespace Test interface ISized { func size() -> int } struct Pair : ISized { a: A, count: int } func (p: Pair) size() -> int = p.count func go() -> int { let p = Pair { a: 1, count: 9 } let s: ISized = p return s.size() } // ── ILEmitterTests_Nominal__Added_InterfaceMethodViaPromotion ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::Added_InterfaceMethodViaPromotion topic: struct status: verified // verified behavior: Test.go(...) == 15 namespace Test interface IArea { func area() -> int } struct Rect : IArea { w: int, h: int } func (r: Rect) area() -> int = r.w * r.h func go() -> int { let r = Rect { w: 3, h: 5 } let a: IArea = r return a.area() } // ── ILEmitterTests_Nominal__Added_MarkerInterface_NoMethods_Conforms ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::Added_MarkerInterface_NoMethods_Conforms topic: struct status: verified // verified behavior: Test.go(...) == 5 namespace Test interface ITag { } struct Item : ITag { v: int } func tagged(t: ITag) -> int = 5 func go() -> int { let i = Item { v: 1 } return tagged(i) } // ── ILEmitterTests_Nominal__Added_TwoInterfaces_BothSatisfied ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::Added_TwoInterfaces_BothSatisfied topic: struct status: verified // verified behavior: Test.go(...) == 30 namespace Test interface INamed { func label() -> int } interface ISized { func size() -> int } struct Widget : INamed, ISized { a: int, b: int } func (w: Widget) label() -> int = w.a func (w: Widget) size() -> int = w.b func both(n: INamed, s: ISized) -> int = n.label() + s.size() func go() -> int { let w = Widget { a: 10, b: 20 } return both(w, w) } // ── ILEmitterTests_Nominal__Added_UndeclaredStructuralMatch_WarnsES2153 ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::Added_UndeclaredStructuralMatch_WarnsES2153 topic: struct status: verified // verified behavior: reports diagnostic ES2153 namespace Test interface ISized { func size() -> int } struct Crate { items: int } func (c: Crate) size() -> int = c.items // ── ILEmitterTests_Nominal__ExplicitConformance_ExactMatch_Works ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::ExplicitConformance_ExactMatch_Works topic: struct status: verified // verified behavior: Test.go(...) == 11 namespace Test interface ISized { func size() -> int } struct Crate : ISized { items: int } func (c: Crate) size() -> int { return c.items + 1 } func measure(s: ISized) -> int { return s.size() } func go() -> int { let c = Crate { items: 10 } return measure(c) } // ── ILEmitterTests_Nominal__Undeclared_StructuralMatch_RejectedAndSuggested ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::Undeclared_StructuralMatch_RejectedAndSuggested topic: struct status: verified // verified behavior: reports diagnostic ES2153 namespace Test interface ISized { func size() -> int } struct Crate { items: int } func (c: Crate) size() -> int { return c.items + 1 } func measure(s: ISized) -> int { return s.size() } func go() -> int { let c = Crate { items: 10 } return measure(c) } // ── ILEmitterTests_PtrEmbedIface__ValueEmbed_PromotedFieldAccess ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_PtrEmbedIface.cs::ValueEmbed_PromotedFieldAccess topic: struct status: verified // verified behavior: Test.go(...) == 15 struct Vec2 { var x: int var y: int } // ── ILEmitterTests_Receivers__BareFirstParam_IsFreeFunction_NotAMethod ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Receivers.cs::BareFirstParam_IsFreeFunction_NotAMethod topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Circle { r: float } func area(c: Circle) -> float = c.r * c.r func run() -> float { let c = Circle { r: 3.0 } return area(c) } // ── ILEmitterTests_Receivers__InlineMethod_Minimal_Struct ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Receivers.cs::InlineMethod_Minimal_Struct topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Foo { x: int func Bar() -> int = self.x } // ── ILEmitterTests_Receivers__ReadonlyReceiver_Reads ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Receivers.cs::ReadonlyReceiver_Reads topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Circle { r: float } readonly func (c: Circle) diameter() -> float = c.r * 2.0 func run() -> float { let c = Circle { r: 5.0 } return c.diameter() } // ── ILEmitterTests_Receivers__ValueReceiver_IsSnapshot_MutationDoesNotWriteBack ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Receivers.cs::ValueReceiver_IsSnapshot_MutationDoesNotWriteBack topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Circle { r: float } func (c: Circle) grow() { c.r = 99.0 } func run() -> float { var c = Circle { r: 2.0 } c.grow() return c.r } // ── ILEmitterTests_Receivers__ValueReceiver_ReadsField ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Receivers.cs::ValueReceiver_ReadsField topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Circle { r: float } func (c: Circle) area() -> float = c.r * c.r * 3.14159 func run() -> float { let c = Circle { r: 2.0 } return c.area() } // ── ILEmitterTests_StdlibReadiness__E02_ReturnValueTypeSelf_ByValue ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_StdlibReadiness.cs::E02_ReturnValueTypeSelf_ByValue topic: struct status: verified // verified behavior: Test.go(...) == 5 namespace Test struct Counter { n: int } func (c: Counter) same() -> Counter = c func go() -> int { let c = Counter { n: 5 } return c.same().n } // ── ILEmitterTests_StdlibReadiness__H09_TwoGenericArities_Coexist ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_StdlibReadiness.cs::H09_TwoGenericArities_Coexist topic: struct status: verified // verified behavior: Test.go(...) == 12 namespace Test struct Pair { a: A } struct Pair { a: A, b: B } func go() -> int { let one = Pair { a: 5 } let two = Pair { a: 3, b: 4 } return one.a + two.a + two.b } // ── ILEmitterTests_StdlibReadiness__J12_Arity_TwoGenericArities ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_StdlibReadiness.cs::J12_Arity_TwoGenericArities topic: struct status: verified // verified behavior: Test.go(...) == 12 namespace Test struct Cell { a: A } struct Cell { a: A, b: B } func go() -> int { let one = Cell { a: 5 } let two = Cell { a: 3, b: 4 } return one.a + two.a + two.b } // ── ILEmitterTests2__Bank_Account_With_Data_Type_Pin ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Bank_Account_With_Data_Type_Pin topic: struct status: verified // verified behavior: Test.run(...) == 75 namespace Test struct Account { balance: int } func (a: Account) deposit(amount: int) -> Account = a with { balance: a.balance + amount } func (a: Account) withdraw(amount: int) -> Account = a with { balance: a.balance - amount } func run() -> int { let opened = Account { balance: 0 } let after_deposit = opened.deposit(100) let after_withdraw = after_deposit.withdraw(30) let final = after_withdraw.deposit(5) return final.balance } // ── ILEmitterTests2__Composite_Nested_Literal ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Composite_Nested_Literal topic: struct status: verified // verified behavior: Test.test(...) == 111 namespace Test struct Outer { x: int, inner: Inner } struct Inner { a: int, b: int } func test() -> int { let o = Outer { x: 1, inner: Inner { a: 10, b: 100 } } return o.x + o.inner.a + o.inner.b } // ── ILEmitterTests2__Composite_Partial_With_Rebinds_One_Field ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Composite_Partial_With_Rebinds_One_Field topic: struct status: verified // verified behavior: Test.test(...) == 103 namespace Test struct Point { x: int, y: int, z: int } func test() -> int { let p = Point { x: 1, y: 2, z: 3 } let q = p with { y: 99 } return q.x + q.y + q.z } // ── ILEmitterTests2__Data_Method_Chain_Via_With_Pin ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Data_Method_Chain_Via_With_Pin topic: struct status: verified // verified behavior: Test.test(...) == 321 namespace Test struct Vec3 { x: int, y: int, z: int } func (v: Vec3) with_x(nx: int) -> Vec3 = v with { x: nx } func (v: Vec3) with_y(ny: int) -> Vec3 = v with { y: ny } func (v: Vec3) with_z(nz: int) -> Vec3 = v with { z: nz } func test() -> int { let origin = Vec3 { x: 0, y: 0, z: 0 } let stepped = origin.with_x(1).with_y(2).with_z(3) return stepped.x + stepped.y * 10 + stepped.z * 100 } // ── ILEmitterTests2__Function_Returns_Data_Used_By_Caller ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Function_Returns_Data_Used_By_Caller topic: struct status: verified // verified behavior: Test.test(...) == 30 namespace Test struct Pair { left: int, right: int } func make(a: int, b: int) -> Pair = Pair { left: a, right: b } func test() -> int { let p = make(10, 20) return p.left + p.right } // ── ILEmitterTests2__Interface_Dispatch_Through_Promoted_Method_Pin ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Interface_Dispatch_Through_Promoted_Method_Pin topic: struct status: verified // verified behavior: Test.test(...) == 73 namespace Test interface IShape { func area() -> int } struct Square : IShape { side: int } struct Circle : IShape { radius: int } func (s: Square) area() -> int = s.side * s.side func (c: Circle) area() -> int = 3 * c.radius * c.radius func test() -> int { let sq = Square { side: 5 } let ci = Circle { radius: 4 } return sq.area() + ci.area() } // ── ILEmitterTests2__Nested_Data_Field_Access_Two_Deep ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Nested_Data_Field_Access_Two_Deep topic: struct status: verified // verified behavior: Test.test(...) == 99 namespace Test struct Inner { v: int } struct Outer { inner: Inner } func test() -> int { let o = Outer { inner: Inner { v: 99 } } return o.inner.v } // ── ILEmitterTests2__Promoted_Instance_Methods_On_Data_Pin ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Promoted_Instance_Methods_On_Data_Pin topic: struct status: verified // verified behavior: Test.describe(...) == 38 namespace Test struct Rect { width: int, height: int } func (r: Rect) area() -> int = r.width * r.height func (r: Rect) perimeter() -> int = (r.width + r.height) * 2 func (r: Rect) is_square() -> bool = r.width == r.height func describe() -> int { let r = Rect { width: 4, height: 5 } var score = 0 if r.is_square() { score = score + 1000 } return r.area() + r.perimeter() + score } // ── ILEmitterTests2__Triple_Nested_Data_Field_Access ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests2.cs::Triple_Nested_Data_Field_Access topic: struct status: verified // verified behavior: Test.test(...) == 42 namespace Test struct A { v: int } struct B { a: A } struct C { b: B } func test() -> int { let c = C { b: B { a: A { v: 42 } } } return c.b.a.v } // ── ILEmitterTests3__Data_Composite_With_String_Field ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Data_Composite_With_String_Field topic: struct status: verified // verified behavior: Test.test(...) == "alice:30" namespace Test struct User { name: string, age: int } func test() -> string { let u = User { name: "alice", age: 30 } return u.name + ":" + u.age.ToString() } // ── ILEmitterTests3__Data_Equality_Field_By_Field ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Data_Equality_Field_By_Field topic: struct status: verified // verified behavior: Test.test(...) == 1 namespace Test struct P { x: int, y: int } func test() -> int { let a = P { x: 1, y: 2 } let b = P { x: 1, y: 2 } if a.x == b.x && a.y == b.y { return 1 } return 0 } // ── ILEmitterTests3__Data_Field_Read_After_Local_Assign ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Data_Field_Read_After_Local_Assign topic: struct status: verified // verified behavior: Test.test(...) == 12 namespace Test struct P { x: int, y: int } func test() -> int { var p = P { x: 0, y: 0 } p.x = 5 p.y = 7 return p.x + p.y } // ── ILEmitterTests3__Data_Multiple_Construction_Sites ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Data_Multiple_Construction_Sites topic: struct status: verified // verified behavior: Test.test(...) == 21 namespace Test struct Coord { x: int, y: int } func test() -> int { let a = Coord { x: 1, y: 2 } let b = Coord { x: 3, y: 4 } let c = Coord { x: 5, y: 6 } return a.x + b.x + c.x + a.y + b.y + c.y } // ── ILEmitterTests3__Data_Single_Field_Composite ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Data_Single_Field_Composite topic: struct status: verified // verified behavior: Test.test(...) == 99 namespace Test struct Wrap { v: int } func test() -> int { let w = Wrap { v: 99 } return w.v } // ── ILEmitterTests3__Data_With_All_Default_Fields_Compiles ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Data_With_All_Default_Fields_Compiles topic: struct status: verified // verified behavior: Test.test(...) == 0 namespace Test struct Empty { } func test() -> int { let e = Empty { } return 0 } // ── ILEmitterTests3__Data_With_Preserves_Other_Fields ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Data_With_Preserves_Other_Fields topic: struct status: verified // verified behavior: Test.test(...) == 28 namespace Test struct Cfg { a: int, b: int, c: int, d: int } func test() -> int { let c = Cfg { a: 1, b: 2, c: 3, d: 4 } let c2 = c with { b: 20 } return c2.a + c2.b + c2.c + c2.d } // ── ILEmitterTests3__Data_With_Single_Field_Update ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Data_With_Single_Field_Update topic: struct status: verified // verified behavior: Test.test(...) == 1004 namespace Test struct P { x: int, y: int } func test() -> int { let p = P { x: 3, y: 4 } let q = p with { x: 10 } return q.x * 100 + q.y } // ── ILEmitterTests3__Data_With_Used_In_Return ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Data_With_Used_In_Return topic: struct status: verified // verified behavior: Test.test(...) == 15 namespace Test struct P { x: int, y: int } func (p: P) translate(dx: int) -> P = p with { x: p.x + dx } func test() -> int { let start = P { x: 0, y: 5 } let moved = start.translate(10) return moved.x + moved.y } // ── ILEmitterTests3__Embedding_Direct_Field_Access_Pin ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Embedding_Direct_Field_Access_Pin topic: struct status: verified // verified behavior: Test.test(...) == 100 namespace Test struct Inner { value: int } struct Outer { pub Inner } func test() -> int { let o = Outer { Inner: Inner { value: 100 } } return o.Inner.value } // ── ILEmitterTests3__Generic_Pair_Construction ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Generic_Pair_Construction topic: struct status: verified // verified behavior: Test.test(...) == 7 namespace Test struct Pair { first: A, second: B } func test() -> int { let p = Pair { first: 3, second: 4 } return p.first + p.second } // ── ILEmitterTests3__Generic_Pair_String_Int ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Generic_Pair_String_Int topic: struct status: verified // verified behavior: Test.test(...) == "x7" namespace Test struct Pair { first: A, second: B } func test() -> string { let p = Pair { first: "x", second: 7 } return p.first + p.second.ToString() } // ── ILEmitterTests3__Interface_Method_Resolution_On_Data ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Interface_Method_Resolution_On_Data topic: struct status: verified // verified behavior: Test.test(...) == 42 namespace Test interface IGet { func get() -> int } struct Box : IGet { v: int } func (b: Box) get() -> int = b.v func test() -> int { let b = Box { v: 42 } return b.get() } // ── ILEmitterTests3__Interface_Method_Returns_Bool ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Interface_Method_Returns_Bool topic: struct status: verified // verified behavior: Test.test(...) == true namespace Test interface ITest { func passes() -> bool } struct Suite : ITest { flag: bool } func (s: Suite) passes() -> bool = s.flag func test() -> bool { let s = Suite { flag: true } return s.passes() } // ── ILEmitterTests3__Interface_Polymorphic_Param ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests3.cs::Interface_Polymorphic_Param topic: struct status: verified // verified behavior: Test.test(...) == 30 namespace Test interface IGet { func get() -> int } struct A : IGet { x: int } struct B : IGet { y: int } func (a: A) get() -> int = a.x func (b: B) get() -> int = b.y func consume(g: IGet) -> int = g.get() func test() -> int { let a = A { x: 10 } let b = B { y: 20 } return consume(a) + consume(b) } // ── IndexDiagnosticTests__IndexingData_Errors ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: IndexDiagnosticTests.cs::IndexingData_Errors topic: struct status: verified // verified behavior: reports diagnostic ES2145 namespace Test struct P { x: int } func (p: P) f() -> int { return p[0] } // ── MixedLanguageTests__CSharp_Interface_Implemented_By_Esharp_Data ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: MixedLanguageTests.cs::CSharp_Interface_Implemented_By_Esharp_Data topic: struct status: verified // verified behavior: Test.null(...) == "greeter" namespace Test struct Greeter : IDescribable {} func (g: Greeter) describe() -> string = "greeter" // ── MixedLanguageTests__Esharp_Data_Type_Used_From_Csharp ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: MixedLanguageTests.cs::Esharp_Data_Type_Used_From_Csharp topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test pub struct Point { x: int, y: int } // ── MultiLineParamsTests__PositionalData_Header_MultiLine ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: MultiLineParamsTests.cs::PositionalData_Header_MultiLine topic: struct status: verified // verified behavior: Test.go(...) == 7 namespace Test struct Vec2( x: int, y: int, ) func go() -> int { let v = Vec2(3, 4) return v.x + v.y } // ── PrimaryCtorCaptureTests__Data_PositionalForm_Unchanged ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: PrimaryCtorCaptureTests.cs::Data_PositionalForm_Unchanged topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Vec2(x: int, y: int) func (v: Vec2) sum() -> int { return v.x + v.y } func run() -> int { let v = Vec2(3, 4) return v.sum() } // ── RequiredDeconstructTests__Deconstruct_GenericPositionalData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Deconstruct_GenericPositionalData topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Pair(first: A, second: B) func run() -> int { let p = Pair(20, 3) let (a, b) = p return a + b } // ── RequiredDeconstructTests__Deconstruct_InvocableViaReflection ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Deconstruct_InvocableViaReflection topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Vec2(x: int, y: int) func make() -> Vec2 { return Vec2(8, 9) } // ── RequiredDeconstructTests__Deconstruct_LetDestructure_OverPositionalData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Deconstruct_LetDestructure_OverPositionalData topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Vec2(x: int, y: int) func run() -> int { let v = Vec2(3, 4) let (x, y) = v return x * 10 + y } // ── RequiredDeconstructTests__Deconstruct_MethodEmittedWithOutParams ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Deconstruct_MethodEmittedWithOutParams topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Vec2(x: int, y: int) func touch() -> int { let v = Vec2(1, 2) return v.x } // ── RequiredDeconstructTests__Deconstruct_MixedTypes ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Deconstruct_MixedTypes topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Entry(name: string, score: int) func run() -> string { let e = Entry("kae", 9) let (n, s) = e return n + s.ToString() } // ── RequiredDeconstructTests__Deconstruct_NotEmittedOnBodyFormData ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Deconstruct_NotEmittedOnBodyFormData topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Plain { a: int } func touch() -> int { let p = Plain { a: 1 } return p.a } // ── RequiredDeconstructTests__Required_AllSupplied_Compiles ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Required_AllSupplied_Compiles topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Span { required lo: int required hi: int } func run() -> int { let s = Span { lo: 2, hi: 9 } return s.hi - s.lo } // ── RequiredDeconstructTests__Required_EmitsRequiredMemberAttribute ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Required_EmitsRequiredMemberAttribute topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Span { required lo: int hi: int } func touch() -> int { let s = Span { lo: 1 } return s.lo } // ── RequiredDeconstructTests__Required_NonRequiredFieldsStillDefaultSilently ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Required_NonRequiredFieldsStillDefaultSilently topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Cfg { required port: int retries: int } func run() -> int { let c = Cfg { port: 80 } return c.port + c.retries } // ── RequiredDeconstructTests__Required_Omitted_ES2189 ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Required_Omitted_ES2189 topic: struct status: verified // verified behavior: reports diagnostic ES2189 namespace Test struct Span { required lo: int required hi: int } func run() -> int { let s = Span { lo: 2 } return s.lo } // ── SemanticModelTests__DeclarationsIn_EnumeratesFileDeclarationsInOrder ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: SemanticModelTests.cs::DeclarationsIn_EnumeratesFileDeclarationsInOrder topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Point { x: int, y: int } func (p: Point) dist() -> int = p.x + p.y const LIMIT = 10 // ── SemanticModelTests__Describe_RendersHoverLines ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: SemanticModelTests.cs::Describe_RendersHoverLines topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Point { x: int, y: int } func (p: Point) dist() -> int = p.x + p.y // ── SemanticModelTests__FindReferences_Field_RoundTrips ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: SemanticModelTests.cs::FindReferences_Field_RoundTrips topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Box { v: int } func (b: Box) read() -> int = b.v + b.v // ── SemanticModelTests__GetSymbolAt_TypeDeclarationAndUse_SameSymbol ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: SemanticModelTests.cs::GetSymbolAt_TypeDeclarationAndUse_SameSymbol topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Point { x: int, y: int } func origin() -> Point = Point { x: 0, y: 0 } // ── SemanticModelTests__GetTypeOf_MapsBindingToTypeSymbol ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: SemanticModelTests.cs::GetTypeOf_MapsBindingToTypeSymbol topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Point { x: int, y: int } func origin() -> Point { let p = Point { x: 0, y: 0 } return p } // ── SemanticModelTests__LookupSymbolsInScope_SeesNamespaceDeclarations ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: SemanticModelTests.cs::LookupSymbolsInScope_SeesNamespaceDeclarations topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Widget { id: int } func make() -> Widget = Widget { id: 1 } func use() -> int { let w = make() return w.id } // ── SpineTests__CrossNamespaceFunction_DoesNotAttachToReceiverSymbol ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: SpineTests.cs::CrossNamespaceFunction_DoesNotAttachToReceiverSymbol topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace A struct Widget { var v: int } // ── SpineTests__SemanticSink_CollectsDeclarationsAndPromotedUse ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: SpineTests.cs::SemanticSink_CollectsDeclarationsAndPromotedUse topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Box { var v: int } func (b: Box) tenfold() -> int = b.v * 10 func go() -> int { let p = Box { v: 5 } return p.tenfold() } // ── SymbolSpineTests__PointerMethods_ValueReceiverMethod_CallableOnPointer ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: SymbolSpineTests.cs::PointerMethods_ValueReceiverMethod_CallableOnPointer topic: struct status: verified // verified behavior: Test.gap1(...) == 50 namespace Test struct Box { var v: int } func (b: Box) tenfold() -> int = b.v * 10 func gap1() -> int { let p = new Box { v: 5 } return p.tenfold() } // ── TotalBinderTests__PromotedMethodAndObjectMembers_AreNotErrors ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TotalBinderTests.cs::PromotedMethodAndObjectMembers_AreNotErrors topic: struct status: verified // verified behavior: Test.go(...) == 42 namespace Test struct Vec { x: int } func (v: Vec) bump() -> int { return v.x + 1 } func go() -> int { let v = Vec { x: 41 } let s = v.ToString() return v.bump() } func run() -> int { return go() } // ── TotalBinderTests__UnknownMemberOnData_IsLocatedBinderError ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TotalBinderTests.cs::UnknownMemberOnData_IsLocatedBinderError topic: struct status: verified // verified behavior: reports diagnostic ES2147 struct Point { x: int, y: int } func (p: Point) main() -> int { return p.zz } // ── TranspilerTests__Classifies_Nested_Struct_Within_Threshold ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Classifies_Nested_Struct_Within_Threshold topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Lines struct Vec2 { x: float y: float } struct Line { a: Vec2 b: Vec2 } // ── TranspilerTests__Classifies_Oversized_As_Struct ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Classifies_Oversized_As_Struct topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Big struct Big { a: decimal b: int } // ── TranspilerTests__Classifies_RefField_As_Struct ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Classifies_RefField_As_Struct topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Wrap struct Wrapper { name: string } // ── TranspilerTests__Classifies_Small_ValueType_As_Struct ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Classifies_Small_ValueType_As_Struct topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Geo struct Point { x: int y: int } // ── TranspilerTests__MultiFile_CrossFile_Instance_Method_Promotion ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::MultiFile_CrossFile_Instance_Method_Promotion topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Types struct Counter { value: int } // ── TranspilerTests__MultiFile_CrossFile_Protocol_Satisfaction ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::MultiFile_CrossFile_Protocol_Satisfaction topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Proto interface IDescribable { func describe() -> string } struct Widget : IDescribable { label: string } func (w: Widget) describe() -> string { return w.label } // ── TranspilerTests__MultiFile_CrossFile_Type_Reference ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::MultiFile_CrossFile_Type_Reference topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Types struct Point { x: int y: int } // ── TranspilerTests__Transpiles_Data_With_External_Interface ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Transpiles_Data_With_External_Interface topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace IO struct FileHandle : IDisposable { path: string } func (h: FileHandle) Dispose() { Console.WriteLine("closed") } // ── TranspilerTests__Transpiles_Derive_Debug ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Transpiles_Derive_Debug topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Dbg derive debug struct Color { r: int g: int b: int } // ── TranspilerTests__Transpiles_Derive_Equality ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Transpiles_Derive_Equality topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Eq derive equality struct Point { x: int y: int } // ── TranspilerTests__Transpiles_Generic_Data ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Transpiles_Generic_Data topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Gen struct Pair { first: A second: B } func makePair(a: A, b: B) -> Pair { return Pair { first: a, second: b } } // ── TranspilerTests__Transpiles_Nullable_Return_Type ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Transpiles_Nullable_Return_Type topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct User { name: string } func find(id: int) -> User? { return nil } // ── TranspilerTests__Transpiles_ValueEmbedding ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::Transpiles_ValueEmbedding topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Base { var x: int var y: int } struct Widget { Base label: string } func getX() -> int { var w = Widget { x: 10, y: 20, label: "test" } return w.x } // ── TypeGrammarTests__GenericField_SubstitutesClosedArgs ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TypeGrammarTests.cs::GenericField_SubstitutesClosedArgs topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Pair { first: A, second: B } func go() -> int { let p = Pair { first: "abc", second: 5 } return p.first.Length + p.second } // ── TypeGrammarTests__PromotedGeneric_TwoReceiverTypeParams ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TypeGrammarTests.cs::PromotedGeneric_TwoReceiverTypeParams topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Pair { first: A, second: B } func (p: Pair) swapped() -> Pair = Pair { first: p.second, second: p.first } func go() -> int { let p = Pair { first: "x", second: 7 } return p.swapped().first } // ── TypeGrammarTests__QualifiedType_CrossNamespaceAnnotation ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TypeGrammarTests.cs::QualifiedType_CrossNamespaceAnnotation topic: struct status: verified // verified behavior: Test.go(...) == 11 namespace A struct Widget { size: int } // ── TypeInfoTests__TypeInfo_ProjectsFieldsKindClassification ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TypeInfoTests.cs::TypeInfo_ProjectsFieldsKindClassification topic: struct status: verified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Point { x: int, y: float } // ── CtorOverloadTests__Data_InitBlock_StillES3012 ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: CtorOverloadTests.cs::Data_InitBlock_StillES3012 topic: struct status: unverified // verified behavior: reports diagnostic ES3012 namespace Test struct Vec { x: int init(x: int) { self.x = x } } // ── DataContractTests__ClassAttribute_OnClass_Errors ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::ClassAttribute_OnClass_Errors topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test [Class] class Conn { host: string port: int } // ── DataContractTests__InitBlock_OnData_Errors ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::InitBlock_OnData_Errors topic: struct status: unverified // verified behavior: reports diagnostic ES3012 namespace Test struct Point { x: int y: int init(px: int, py: int) { self.x = px self.y = py } } // ── DataContractTests__InitBlock_OnRefData_Ok ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::InitBlock_OnRefData_Ok topic: struct status: unverified // verified behavior: reports diagnostic ES3012 namespace Test class Point { x: int y: int init(px: int, py: int) { self.x = px self.y = py } } // ── DataContractTests__PositionalForm_OnData_StillWorks ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::PositionalForm_OnData_StillWorks topic: struct status: unverified // verified behavior: reports diagnostic ES3012 namespace Test struct Vec2(x: int, y: int) func main() { let v = Vec2(3, 4) } // ── DataContractTests__RecursiveField_ListOfPointer_Ok ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::RecursiveField_ListOfPointer_Ok topic: struct status: unverified // verified behavior: reports diagnostic ES2002 namespace Test struct Tree { value: int children: List<*Tree> } // ── DataContractTests__RecursiveField_PointerForm_Ok ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::RecursiveField_PointerForm_Ok topic: struct status: unverified // verified behavior: reports diagnostic ES2002 namespace Test struct Node { value: int next: *Node } // ── DataContractTests__RecursiveField_RefDataAllowsSelfReference ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::RecursiveField_RefDataAllowsSelfReference topic: struct status: unverified // verified behavior: reports diagnostic ES2002 namespace Test class Node { value: int next: Node } // ── DataContractTests__StructAndClass_Together_Errors ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::StructAndClass_Together_Errors topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test [Struct] [Class] struct Point { x: int y: int } // ── DataContractTests__StructAttribute_OnClass_Errors ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: DataContractTests.cs::StructAttribute_OnClass_Errors topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test [Struct] class Conn { host: string port: int } // ── EmitterStressTests__Parse_ConstructorCallWith6ArgsInForLoop ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: EmitterStressTests.cs::Parse_ConstructorCallWith6ArgsInForLoop topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace T struct Item(a: string, b: string, c: string, d: DateTimeOffset, e: string, f: string) func run(synd: object, feed: object) { var items = List() for entry in synd.Items { let link = entry.Links.Count > 0 ? entry.Links[0].Uri.ToString() : "" let summary = entry.Summary?.Text ?? "" let pub = entry.PublishDate != DateTimeOffset.MinValue ? entry.PublishDate : entry.LastUpdatedTime items.Add(Item(entry.Title.Text, link, feed.name, pub, summary, feed.category)) } } // ── ILEmitterTests__LetField_AssignmentOutsideInit_ReportsError ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::LetField_AssignmentOutsideInit_ReportsError topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Point { let x: int y: int } func bad() -> int { var p = Point { x: 1, y: 2 } p.x = 99 return p.x } // ── ILEmitterTests__StructPromotion_LargeStruct_StaysStruct_AutopromotionDisabled ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::StructPromotion_LargeStruct_StaysStruct_AutopromotionDisabled topic: struct status: unverified // verified behavior: reports diagnostic ES2001 namespace Test struct Big { a: double b: double c: double d: double e: double f: double g: double h: double i: double } // ── ILEmitterTests__StructPromotion_ManyRefFields_StaysStruct_AutopromotionDisabled ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::StructPromotion_ManyRefFields_StaysStruct_AutopromotionDisabled topic: struct status: unverified // verified behavior: reports diagnostic ES2001 namespace Test struct Refs { a: string b: string c: string d: int } // ── ILEmitterTests__StructPromotion_StoredInCollection_StaysStruct_AutopromotionDisabled ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests.cs::StructPromotion_StoredInCollection_StaysStruct_AutopromotionDisabled topic: struct status: unverified // verified behavior: reports diagnostic ES2001 namespace Test struct Item { a: double b: double c: double d: double e: double } struct Container { items: List } // ── ILEmitterTests_Coverage_Adversarial__Ns_BareCrossNamespace_WithoutUsing_IsError ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Coverage_Adversarial.cs::Ns_BareCrossNamespace_WithoutUsing_IsError topic: struct status: unverified // verified behavior: reports diagnostic ES2150 namespace Lib struct Vec { x: int } // ── ILEmitterTests_Nominal__Added_ParamTypeMismatch_IsError ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::Added_ParamTypeMismatch_IsError topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test interface IAdder { func add(x: int) -> int } struct Calc : IAdder { base: int } func (c: Calc) add(x: string) -> int = c.base // ── ILEmitterTests_Nominal__Added_UndeclaredStructuralMatch_IsNotConformance ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::Added_UndeclaredStructuralMatch_IsNotConformance topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test interface ISized { func size() -> int } struct Crate { items: int } func (c: Crate) size() -> int = c.items func measure(s: ISized) -> int = s.size() func go() -> int { let c = Crate { items: 3 } return measure(c) } // ── ILEmitterTests_Nominal__Declared_ParamTypeMismatch_IsError ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::Declared_ParamTypeMismatch_IsError topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test interface IAdder { func add(n: int) -> int } struct Box : IAdder { v: int } func (b: Box) add(n: string) -> int { return b.v } // ── ILEmitterTests_Nominal__Declared_ReturnTypeMismatch_IsError ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Nominal.cs::Declared_ReturnTypeMismatch_IsError topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test interface ISized { func size() -> int } struct Crate : ISized { items: int } func (c: Crate) size() -> string { return "x" } // ── ILEmitterTests_Receivers__ReadonlyReceiver_RejectsFieldMutation ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_Receivers.cs::ReadonlyReceiver_RejectsFieldMutation topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Circle { r: float } readonly func (c: Circle) bad() { c.r = 1.0 } // ── ILEmitterTests_StdlibReadiness__D01_NestedDataType ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: ILEmitterTests_StdlibReadiness.cs::D01_NestedDataType topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test class Select { struct Arm { kind: int, body: int } arms: int init() { self.arms = 0 } } func make() -> Select = Select() // ── RequiredDeconstructTests__Deconstruct_ArityMismatch_Errors ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: RequiredDeconstructTests.cs::Deconstruct_ArityMismatch_Errors topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Vec2(x: int, y: int) func run() -> int { let v = Vec2(3, 4) let (a, b, c) = v return a } // ── TotalBinderTests__BrokenFunction_SiblingsStillBind ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TotalBinderTests.cs::BrokenFunction_SiblingsStillBind topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) struct Point { x: int, y: int } func (p: Point) broken() -> int { return p.x + } func (p: Point) fine() -> int { return p.x + p.y } // ── TranspilerTests__BoxingDiag_Warns_ValueType_As_Protocol ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TranspilerTests.cs::BoxingDiag_Warns_ValueType_As_Protocol topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test interface IWidget { func render() -> string } struct SmallWidget { label: string } func (w: SmallWidget) render() -> string { return w.label } func test() -> string { let w: IWidget = SmallWidget { label: "hi" } return w.render() } // ── TypeGrammarTests__DataInterfaces_AreStructuredNodes ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TypeGrammarTests.cs::DataInterfaces_AreStructuredNodes topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace T interface IShape { func area() -> int } struct Circle : IShape { r: int func area() -> int { return 3 * this.r } } // ── TypeInfoTests__MemberSynthesizer_AddedMethod_CompilesAndRuns ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TypeInfoTests.cs::MemberSynthesizer_AddedMethod_CompilesAndRuns topic: struct status: unverified // compiles cleanly (no auto-run claim was extracted) namespace Test struct Box { v: int } func go() -> int { let b = Box { v: 7 } return b.answer() } // ── TypeInfoTests__MemberSynthesizer_SatisfiesInterfaceConformance ── // E# — a verified example from the E# language corpus (CLR language; .es, not ECMAScript). // provenance: TypeInfoTests.cs::MemberSynthesizer_SatisfiesInterfaceConformance topic: struct status: unverified // verified behavior: Test.Test(...) == 42 namespace Test interface IAnswer { func answer() -> int } struct Box : IAnswer { v: int } func go() -> int { let b = Box { v: 1 } return b.answer() }