You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs
+27-1Lines changed: 27 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -320,6 +320,33 @@ module ``Equivalence of properties and getters`` =
320
320
IL_000e: ret
321
321
}"""]
322
322
323
+
module``Typechecking behavior`` =
324
+
325
+
#if!NETCOREAPP
326
+
[<Theory(Skip ="IWSAMs are not supported by NET472.")>]
327
+
#else
328
+
[<InlineData("""
329
+
type INormalInterface =
330
+
abstract member IntMember: int
331
+
332
+
module INormalInterfaceExtensions =
333
+
type INormalInterface with
334
+
static member ExtMethod (a: INormalInterface) =
335
+
()""")>]
336
+
[<Theory>]
337
+
#endif
338
+
let``Extension method on interface without SAM does not produce a warning`` code =
339
+
Fsx code
340
+
|> withLangVersion60
341
+
|> compile
342
+
|> shouldSucceed
343
+
|> ignore
344
+
345
+
Fsx code
346
+
|> withLangVersion70
347
+
|> compile
348
+
|> shouldSucceed
349
+
|> ignore
323
350
324
351
moduleNegative =
325
352
@@ -375,7 +402,6 @@ module Negative =
375
402
|> withDiagnosticMessage "The trait 'A' invoked by this call has multiple support types. This invocation syntax is not permitted for such traits. See https://aka.ms/fsharp-srtp for guidance."
0 commit comments