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
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -320,6 +320,28 @@ 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("6.0")>]
329
+
[<InlineData("7.0")>]
330
+
[<Theory>]
331
+
#endif
332
+
let``Extension method on interface without SAM does not produce a warning`` version =
333
+
Fsx """
334
+
type INormalInterface =
335
+
abstract member IntMember: int
336
+
337
+
module INormalInterfaceExtensions =
338
+
type INormalInterface with
339
+
static member ExtMethod (a: INormalInterface) =
340
+
()
341
+
"""
342
+
|> withLangVersion version
343
+
|> compile
344
+
|> shouldSucceed
323
345
324
346
moduleNegative =
325
347
@@ -375,7 +397,6 @@ module Negative =
375
397
|> 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