645f3acca7
Closes #41386 Change-Id: I1a5a4cdc35cef37c7a8ba6a6aecb99457789bcdc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144940 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
24 lines
1.1 KiB
Plaintext
24 lines
1.1 KiB
Plaintext
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd/issue41386.dart:8:28: Error: The operator '%' isn't defined for the class 'Object?'.
|
|
// - 'Object' is from 'dart:core'.
|
|
// Try correcting the operator to an existing operator, or defining a '%' operator.
|
|
// print(predicate((v) => v % 2 == 1)(3));
|
|
// ^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
static method predicate<T extends core::Object? = dynamic>((self::predicate::T%) → core::bool fn) → (self::predicate::T%) → core::bool
|
|
return (self::predicate::T% val) → core::bool => fn.call(val);
|
|
static method test() → void {
|
|
core::print(self::predicate<core::Object?>((core::Object? v) → core::bool => invalid-expression "pkg/front_end/testcases/nnbd/issue41386.dart:8:28: Error: The operator '%' isn't defined for the class 'Object?'.
|
|
- 'Object' is from 'dart:core'.
|
|
Try correcting the operator to an existing operator, or defining a '%' operator.
|
|
print(predicate((v) => v % 2 == 1)(3));
|
|
^".{core::Object::==}(1)).call(3));
|
|
}
|
|
static method main() → void {}
|