Type mismatch reported for interpolated strings with multiple % specifiers in IDE checking
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- fsharp
- Área
- compilers
Línea de trabajo
Start by reproducing the error with the snippet in the issue, using ParseAndCheckFileInProject in the language service rather than fsc. The report says this regressed in #19971, so check that change first to see how interpolated format strings are type-checked. Done means $"%b{flag} %b{flag}" type-checks without error in the IDE path and the existing interpolation tests still pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Consider this code:
let flag = true
let s = $"%b{flag} %b{flag}"
It compiles fine with fsc, but ParseAndCheckFileInProject reports an error on the string:
Error FS0001 : Type mismatch. Expecting a
'bool -> string'
but given a
'bool -> bool -> string'
The type 'string' does not match the type 'bool -> string'
It happens when there are two or more % specifiers and at least one of them is not a bare %s/%c/%d/%i/%M, i.e. %b, %A, %f or %5d.
This seems to be a regression in #19971. Initially reported as RIDER-143926.
- Lenguaje dominante
- F#
- Estrellas
- 4.3k
- Forks
- 881
- Merge medio
- 3 d 20 h
- PR fusionados (30 d)
- 108
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/fsharp
-
Documentation: Array.tryPick code example gives an errorPosiblemente ocupada @T-Gro la tomó hoy. AbiertoArea-XmlDocs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
dotnet/fsharp#20780 · 1 asignado ·
Los mantenedores suelen responder en 3 días
-
Semantic classification cache for opened documents is never populated (written to the unopened-documents cache)Posiblemente ocupada @xperiandri la tomó hace 42 días. AbiertoNeeds-Triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 3 días
-
Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/fsharp#20265 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Bug Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
Visual Studio F# Rename corrupts record update expressionsPosiblemente ocupada @T-Gro la tomó hoy. AbiertoArea-LangService-RenameSymbol Bug
dotnet/fsharp#20791 · 1 asignado ·
Los mantenedores suelen responder en 3 días
Todos los issues de dotnet/fsharp
Issues similares
-
bug frontend rt sev-3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
area:adapters duckdb engine:v2 status:triage triage type:bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
Bisect issue232859Abiertobisect
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
dtcxzyw/llvm-bisect-service#529 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día