Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long format string causes bogus error in editor FS0001 #5041

Closed
asik opened this issue May 30, 2018 · 1 comment
Closed

Long format string causes bogus error in editor FS0001 #5041

asik opened this issue May 30, 2018 · 1 comment

Comments

@asik
Copy link
Contributor

asik commented May 30, 2018

If you remove one character from the string, the bogus error message disappears.


let a username password = 
    sprintf """aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa%s%s""" username password
Error FS0001 This expression was expected to have type
''a -> 'b -> 'c'
but here has type
'string'

Expected behavior:

should not have this error in the editor.

Visual Studio 15.7.2
Visual F# Tools 10.1 for F# 4.1 - 15.7.0.0.

Possibly related (?) Seems to be a different limit. Coloring re-appears only after several more characters are deleted from the string.
#4268

@cartermp
Copy link
Contributor

Looks like this is the same cause as #4268; i.e., compiler ranges are too small to support this. Closing as a duplicate, and this further motivates the PR #4476 which makes them considerably longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants