Compare commits

..

1 Commits

Author SHA1 Message Date
Patrick Stevens
232d2ba5ec Relax arg checking strictness (#123) 2024-04-16 22:47:06 +01:00
3 changed files with 14 additions and 3 deletions

View File

@@ -188,7 +188,7 @@ type internal TypeWithInterfaceMock =
{
/// Implementation of IDisposable.Dispose
Dispose : unit -> unit
Mem1 : int -> string
Mem1 : string option -> string[] Async
}
/// An implementation where every method throws.

View File

@@ -46,4 +46,4 @@ type Curried<'a> =
[<GenerateMock>]
type TypeWithInterface =
inherit IDisposable
abstract Mem1 : int -> string
abstract Mem1 : string option -> string[] Async

View File

@@ -343,7 +343,18 @@ module internal AstHelper =
}
|> List.singleton
}
| _ -> failwith $"Unrecognised args in interface method declaration: %+A{args}"
| arg ->
{
HasParen = false
Args =
{
Attributes = []
IsOptional = false
Id = None
Type = arg
}
|> List.singleton
}
|> fun ty ->
{ ty with
HasParen = ty.HasParen || hasParen