Skip to content

Compiler fails to recognise namespace in FQN with enabled GraphBasedChecking #17508

@BoundedChenn31

Description

@BoundedChenn31

Repro steps

Consider Foo.fs:

namespace MyRootNamespace.A

type Foo() = class end

and following Bar.fs:

namespace MyRootNamespace.A.B

type Bar(foo: MyRootNamespace.A.Foo, s: string) = class end

When GraphBasedChecking is enabled build fails with error:

0>Bar.fs(3,15): Error FS0039 : The namespace or module 'MyRootNamespace' is not defined.

Here is complete solution.
GraphBasedChecking_FullPathError.zip

Expected behavior

Build succeeds without any changes.

Actual behavior

Compiler fails to recognise namespace

Known workarounds

With open MyRootNamespace.A in Bar.fs builds succeeds.
With removed parameter s: string or changed order of s and foo build also succeeds 😮
With GraphBasedChecking disabled build succeeds.

Related information

.NET 9.0.100-preview.6.24328.19
.NET 8.0.303

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions