Skip to content

LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A01_t12 is wrong #492

@athomas

Description

@athomas
stderr:
 tests/co19_2/src/LanguageFeatures/Constant-update-2018/ShortCircuitOperators_A01_t12.dart:23:34: Error: A value of type 'Type' can't be assigned to a variable of type 'bool'.
  - 'Type' is from 'dart:core'.
   const MyClass() : b = false && nil;
                                  ^
const nil = Null;

class MyClass {
  final bool b;
  const MyClass() : b = false && nil;
}

main() {
  const res = MyClass();
}

Maybe const nil = Null;was meant to be const nil = null; (note the lowercase 'N')?

Metadata

Metadata

Assignees

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