Skip to content

Embedding an untyped quotation in a typed quotation results in ArgumentException #89

Description

@latkin

This repros back to F# 3.0 at least. Compiles fine, but throws at runtime.

<@ <@@ 100 @@> @>
System.ArgumentException: Type mismatch when building 'expr': the expression has the wrong type. Expected 'Microsoft.FSharp.Quotations.FSharpExpr', but received type 'Microsoft.FSharp.Quotations.FSharpExpr`1[System.Int32]'.
Parameter name: receivedType
   at Microsoft.FSharp.Quotations.PatternsModule.checkTypesSR[a](Type expectedType, Type receivedType, a name, String threeHoleSR)
   at Microsoft.FSharp.Quotations.PatternsModule.cast[T](FSharpExpr expr)
   at <StartupCode$FSI_0002>.$FSI_0002.main@()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions