Skip to content

customHeadersUsingBoundVariable test #748

@sjakobi

Description

@sjakobi

{- This is a type error because the custom headers are type-checked with an
empty context. This is necessary because:
* import resolution precedes β-normalization
* we also don't want custom headers to leak program state anyway
This should fail due to the `x` within the custom header being an unbound
variable
-}
let x = "Bar"
in https://httpbin.org/headers
using [ { mapKey = "Foo", mapValue = x } ]
as Text

Which part of the standard says that this is illegal?

In particular, I don't find anything in type-inference.md, so I'm wondering why this is part of the type-inference tests.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions