Skip to content

関数の返り値の型に予約語などのチェックが行われない #1000

@poppingmoon

Description

@poppingmoon

visitNode は 関数型の返り値の部分に対しても呼び出されるべきですが、そのようになっていません

case 'fnTypeSource': {
for (let i = 0; i < result.params.length; i++) {
result.params[i] = visitNodeInner(result.params[i]!, fn, ancestors) as Ast.FnTypeSource['params'][number];
}
break;
}

そのため、返り値の型を関数にして型引数に未使用の予約語を入れると、その型引数を使ってもエラーが発生しません

let x: @() => @<async>() => async = @() {}

Playground

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions