Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Compiler/Checking/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4773,6 +4773,9 @@ and CrackStaticConstantArgs (cenv: cenv) env tpenv (staticParameters: Tainted<Pr
argsInStaticParameterOrderIncludingDefaults

and TcProvidedTypeAppToStaticConstantArgs (cenv: cenv) env generatedTypePathOpt tpenv (tcref: TyconRef) (args: SynType list) m =
// Static argument expressions should not get debug points
let env = { env with eIsControlFlow = false }

let typeBeforeArguments =
match tcref.TypeReprInfo with
| TProvidedTypeRepr info -> info.ProvidedType
Expand Down
22 changes: 22 additions & 0 deletions tests/fsharp/regression/13219/test.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#r "nuget: FSharp.Data, 4.2.10"

open FSharp.Data

[<Literal>]
let url = "https://en.wikipedia.org/wiki/F_Sharp_(programming_language)"

// Works
let html = new HtmlProvider<url>()

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<url>()

// 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)
3 changes: 3 additions & 0 deletions tests/fsharp/tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2157,6 +2157,9 @@ module RegressionTests =
[<Test >]
let ``12383-FSC_OPTIMIZED`` () = singleTestBuildAndRun "regression/12383" FSC_OPTIMIZED

[<Test>]
let ``13219-bug-FSI`` () = singleTestBuildAndRun "regression/13219" FSI

[<Test >]
let ``4715-optimized`` () =
let cfg = testConfig "regression/4715"
Expand Down