blob: a22bd352f9931c9fe0575b486e25c03ae14abdac [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/extensions/explicit_invalid_access.dart:10:3: Error: Explicit extension application cannot be used as an expression.
// Extension(c);
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/explicit_invalid_access.dart:11:3: Error: Explicit extension application cannot be a target for assignment.
// Extension(c) = 42;
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/explicit_invalid_access.dart:12:3: Error: Explicit extension application cannot be used as an expression.
// Extension(c) += 42;
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/explicit_invalid_access.dart:13:3: Error: Explicit extension application cannot be used as an expression.
// Extension(c)++;
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/explicit_invalid_access.dart:14:5: Error: Explicit extension application cannot be used as an expression.
// ++Extension(c);
// ^^^^^^^^^
//
import self as self;
import "dart:core" as core;
class Class extends core::Object {
synthetic constructor •() self::Class
: super core::Object::•()
;
}
extension Extension on self::Class {
}
static method errors(self::Class c) dynamic {
invalid-expression "pkg/front_end/testcases/extensions/explicit_invalid_access.dart:10:3: Error: Explicit extension application cannot be used as an expression.
Extension(c);
^^^^^^^^^";
invalid-expression "pkg/front_end/testcases/extensions/explicit_invalid_access.dart:11:3: Error: Explicit extension application cannot be a target for assignment.
Extension(c) = 42;
^^^^^^^^^";
invalid-expression "pkg/front_end/testcases/extensions/explicit_invalid_access.dart:12:3: Error: Explicit extension application cannot be used as an expression.
Extension(c) += 42;
^^^^^^^^^";
invalid-expression "pkg/front_end/testcases/extensions/explicit_invalid_access.dart:13:3: Error: Explicit extension application cannot be used as an expression.
Extension(c)++;
^^^^^^^^^";
invalid-expression "pkg/front_end/testcases/extensions/explicit_invalid_access.dart:14:5: Error: Explicit extension application cannot be used as an expression.
++Extension(c);
^^^^^^^^^";
}
static method main() dynamic {}