Skip to content

Field mismatch error is only reported on the first compilation in vscode #12995

Description

@yuxiaomao

Repro:

  • Open in vscode and compile (probably some display/diagnostic requests are automatically sent), observe that only the first compilation shows missing field error (expected), the following compilations succeed and result in runtime null access.
class Foo {
}

class Main {
	static function main() {
		Foo.bar();
	}
}

Bisect point to 0700869 from #12809 from #12797

Remove && Common.is_compilation com fix it, but I'm not sure if it's the good fix

let handle_display_after_typing com tctx display_file_dot_path =
if com.display.dms_kind = DMNone && com.part_scope.has_error && Common.is_compilation com then
true
else begin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions