Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
auduchinok committed Dec 5, 2023
1 parent cff239b commit 563be80
Showing 1 changed file with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -609,3 +609,42 @@ type Bar =
|> withReferences [ fsharp ]

csharp |> compile |> shouldSucceed

[<Fact>]
let ``Abbreviated CSharp type with extensions`` () =
let csharp =
CSharp """
namespace CSharpLib {
public interface I
{
public int P { get; }
}
public static class Ext
{
public static void M(this I i)
{
}
}
}
"""
|> withName "CSLib"

let fsharp =
FSharp """
module Module
open CSharpLib
module M =
type Ext2 = CSharpLib.Ext
let f (i: I) =
i.M()
"""
|> withLangVersion80
|> withName "FSLib"
|> withReferences [ csharp ]

fsharp |> compile |> shouldSucceed

0 comments on commit 563be80

Please sign in to comment.