Skip to content

Commit

Permalink
tests: add integration for using Erase on members
Browse files Browse the repository at this point in the history
  • Loading branch information
MangelMaxime committed Oct 25, 2024
1 parent efe3fbd commit e311a46
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/Integration/Integration/CompilationTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let tests =
Directory.EnumerateDirectories(data)
|> Seq.map (fun testCaseDir -> //
testCaseAsync
(Path.GetDirectoryName(testCaseDir))
testCaseDir
(async {
let project =
Directory.GetFileSystemEntries(testCaseDir, "*.fsproj") |> Seq.exactlyOne
Expand Down
15 changes: 15 additions & 0 deletions tests/Integration/Integration/data/eraseAttribute/Members.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module EraseAttributeMembers

open Fable.Core

type input() =

[<Erase>]
member this.onChange
with set (_: obj -> unit) = ()


type input with

[<Erase>]
member this.onChange2 set (_: obj -> unit) = ()
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { class_type } from "./fable_modules/fable-library-js.4.22.0/Reflection.js";

export class input {
constructor() {
}
}

export function input_$reflection() {
return class_type("EraseAttributeMembers.input", undefined, input);
}

export function input_$ctor() {
return new input();
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RollForward>Major</RollForward>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<Compile Include="Members.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Fable.Core" Version="4.2.0" />
</ItemGroup>

</Project>

0 comments on commit e311a46

Please sign in to comment.