Skip to content

Missing Super-as-Expression Error in VSCode #60906

Open
@RohitSaily

Description

@RohitSaily
  • Dart SDK version: 3.9.0-211.0.dev (dev) (Fri Jun 6 17:03:13 2025 -0700) on "macos_x64"
  • VSCode Version: 1.100.3 (Universal)

Consider the main.dart

final class A
{	A f()=>
		this;
}
final class B extends A
{	A f()=>
		(super..f())..g();
	B g()=>
		this;
}

dart run outputs

main.dart:7:4: Error: Can't use 'super' as an expression.
To delegate a constructor to a super constructor, put the super call as an initializer.
                (super..f())..g();

Static analysis should catch this while coding in VSCode but it doesn't. Nothing is reported via VSCode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions