Skip to content

Double backticks do not follow syntax rules in function arguments, i.e. can be used without spaces #3580

@abelbraaksma

Description

@abelbraaksma

Arguments to a function must be separated by spaces. But if an argument is an identifier written with double backticks (between `` ... ``), adjacent arguments can be given without spaces.

Same is true for combining backtick-identifiers with non-back-identifiers.

Repro steps

Minimal repro:

let ``hi`` = 12
let ``bye`` = 13
let f x y = x + y
let g = f``hi````bye``   // no spaces between f, ``hi`` and ``bye``

Or even sillier:

let ``hi`` = 12
let ``bye`` = 13
let hi2 = 14
let bye2 = 15
let f w x y z = w + x + y + z
let g = f``hi``hi2``bye``bye2    // no spaces between backticked and non-backticked idents

Expected behavior

This syntax is illegal according to the F# Spec. Identifiers must be separated by spaces.

Actual behavior

No syntax error is thrown.

Known workarounds

n/a

Related information

Seen on F# 4.0, F# 4.1, VS2015, VS2017.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions