Skip to content

--typecheck-only for scripts has issues with #load #19047

@abonie

Description

@abonie

Recently added support for --typecheck-only for .fsx files does not catch type check errors in the following setup:

Repro steps

// Domain.fsx
type T = {
    Field: string
}

printfn "D"
// A.fsx
#load "Domain.fsx"

open Domain

let y = {
    Field = 1
}

printfn "A"

With these two files run dotnet fsi --typecheck-only .\A.fsx

Expected behavior

A typechecking error FS0001

Actual behavior

No errors reported

Known workarounds

Provide a description of any known workarounds.

Related information

Provide any related information (optional):

  • Operating system
  • .NET Runtime kind (.NET Core, .NET Framework, Mono)
  • Editing Tools (e.g. Visual Studio Version, Visual Studio)

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

Status

New

Relationships

None yet

Development

No branches or pull requests

Issue actions