Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Type mismatch reported for interpolated strings with multiple % specifiers in IDE checking

オープン
#20,752 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
fsharp
領域
compilers

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

Bug Needs-Triage

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.

主要言語
F#
スター
4.3k
フォーク
880
平均マージ
4日 9時間
マージ済み PR(30日)
117

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/fsharp のほかの issue

dotnet/fsharp の issue をすべて見る

似ている issue

Compilers の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。