diff --git a/src/Compiler/Checking/CheckExpressions.fs b/src/Compiler/Checking/CheckExpressions.fs index 6aade43c55f..0ef6963c527 100644 --- a/src/Compiler/Checking/CheckExpressions.fs +++ b/src/Compiler/Checking/CheckExpressions.fs @@ -4773,6 +4773,9 @@ and CrackStaticConstantArgs (cenv: cenv) env tpenv (staticParameters: Tainted info.ProvidedType diff --git a/tests/fsharp/regression/13219/test.fsx b/tests/fsharp/regression/13219/test.fsx new file mode 100644 index 00000000000..c6ff7817805 --- /dev/null +++ b/tests/fsharp/regression/13219/test.fsx @@ -0,0 +1,22 @@ +#r "nuget: FSharp.Data, 4.2.10" + +open FSharp.Data + +[] +let url = "https://en.wikipedia.org/wiki/F_Sharp_(programming_language)" + +// Works +let html = new HtmlProvider() + +type System.Object with + + // Works + member x.Html1 = new HtmlProvider<"https://en.wikipedia.org/wiki/F_Sharp_(programming_language)">() + + // Error: FS0267 This is not a valid constant expression or custom attribute value + member x.Html2 = new HtmlProvider() + +// This is a compilation test, not a lot actually happens in the test +do (System.Console.Out.WriteLine "Test Passed"; + System.IO.File.WriteAllText("test.ok", "ok"); + exit 0) diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs index c40d9f756e6..44cf37b3268 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -2157,6 +2157,9 @@ module RegressionTests = [] let ``12383-FSC_OPTIMIZED`` () = singleTestBuildAndRun "regression/12383" FSC_OPTIMIZED + [] + let ``13219-bug-FSI`` () = singleTestBuildAndRun "regression/13219" FSI + [] let ``4715-optimized`` () = let cfg = testConfig "regression/4715"