File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
tests/FSharpLint.Core.Tests/Rules/Conventions Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -38,4 +38,31 @@ module Program
3838let _ = System.Version()"""
3939
4040 this.Parse source
41- Assert.AreEqual( expected, this.ApplyQuickFix source)
41+ Assert.AreEqual( expected, this.ApplyQuickFix source)
42+
43+ [<Test>]
44+ member this. ``new keyword is not required ( 1 ). ``() =
45+ this.Parse( """
46+ module Program
47+ let foo =
48+ new System.Collections.Generic.Dictionary<string, string>() |> ignore""" )
49+
50+ Assert.IsTrue this.ErrorsExist
51+
52+ [<Test>]
53+ member this. ``new keyword is not required ( 2 ). ``() =
54+ this.Parse( """
55+ module Program
56+ let foo =
57+ new Guid() |> ignore""" )
58+
59+ Assert.IsTrue this.ErrorsExist
60+
61+ [<Test>]
62+ member this. ``new keyword is not required ( 3 ). ``() =
63+ this.Parse( """
64+ module Program
65+ let foo =
66+ new Int32() |> ignore""" )
67+
68+ Assert.IsTrue this.ErrorsExist
You can’t perform that action at this time.
0 commit comments