c191551fac
TEST=Covered by existing tests. Change-Id: Ied8be1874164e68e0a3a48e1b2f9a33310071381 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183009 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
237 lines
11 KiB
Plaintext
237 lines
11 KiB
Plaintext
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:16:3: Error: Non-nullable variable 'local1' must be assigned before it can be used.
|
|
// local1; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:17:3: Error: Late variable 'local2' without initializer is definitely unassigned.
|
|
// local2; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:18:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
// local3; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:19:3: Error: Late variable 'local4' without initializer is definitely unassigned.
|
|
// local4; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:20:3: Error: Non-nullable variable 'local5' must be assigned before it can be used.
|
|
// local5; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:21:3: Error: Late variable 'local6' without initializer is definitely unassigned.
|
|
// local6; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:34:3: Error: Non-nullable variable 'local1' must be assigned before it can be used.
|
|
// local1; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:35:3: Error: Late variable 'local2' without initializer is definitely unassigned.
|
|
// local2; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:36:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
// local3; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:37:3: Error: Late variable 'local4' without initializer is definitely unassigned.
|
|
// local4; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:38:3: Error: Non-nullable variable 'local5' must be assigned before it can be used.
|
|
// local5; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:39:3: Error: Late variable 'local6' without initializer is definitely unassigned.
|
|
// local6; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:62:3: Error: Non-nullable variable 'local1' must be assigned before it can be used.
|
|
// local1; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:64:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
// local3; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:66:3: Error: Non-nullable variable 'local5' must be assigned before it can be used.
|
|
// local5; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:90:3: Error: Non-nullable variable 'local1' must be assigned before it can be used.
|
|
// local1; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:92:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
// local3; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:94:3: Error: Non-nullable variable 'local5' must be assigned before it can be used.
|
|
// local5; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:103:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
// local3 += 0; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:104:3: Error: Late variable 'local4' without initializer is definitely unassigned.
|
|
// local4 += 0; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:111:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
// local3 += 0; // error
|
|
// ^^^^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/definitely_unassigned.dart:112:3: Error: Late variable 'local4' without initializer is definitely unassigned.
|
|
// local4 += 0; // error
|
|
// ^^^^^^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
import "dart:async";
|
|
|
|
static field <T extends core::Object? = dynamic>(T%) → Null fieldDirect = <T extends core::Object? = dynamic>(T% value) → Null {
|
|
T% local1;
|
|
late T% local2;
|
|
core::int local3;
|
|
late core::int local4;
|
|
FutureOr<core::int>local5;
|
|
late FutureOr<core::int>local6;
|
|
late T% local7 = value;
|
|
let final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:34:3: Error: Non-nullable variable 'local1' must be assigned before it can be used.
|
|
local1; // error
|
|
^^^^^^" in local1;
|
|
let final Never #t2 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:35:3: Error: Late variable 'local2' without initializer is definitely unassigned.
|
|
local2; // error
|
|
^^^^^^" in local2;
|
|
let final Never #t3 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:36:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
local3; // error
|
|
^^^^^^" in local3;
|
|
let final Never #t4 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:37:3: Error: Late variable 'local4' without initializer is definitely unassigned.
|
|
local4; // error
|
|
^^^^^^" in local4;
|
|
let final Never #t5 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:38:3: Error: Non-nullable variable 'local5' must be assigned before it can be used.
|
|
local5; // error
|
|
^^^^^^" in local5;
|
|
let final Never #t6 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:39:3: Error: Late variable 'local6' without initializer is definitely unassigned.
|
|
local6; // error
|
|
^^^^^^" in local6;
|
|
local7;
|
|
};
|
|
static field <T extends core::Object? = dynamic>(core::bool, T%) → Null fieldConditional = <T extends core::Object? = dynamic>(core::bool b, T% value) → Null {
|
|
T% local1;
|
|
late T% local2;
|
|
core::int local3;
|
|
late core::int local4;
|
|
FutureOr<core::int>local5;
|
|
late FutureOr<core::int>local6;
|
|
late T% local7 = value;
|
|
if(b) {
|
|
local1 = value;
|
|
local2 = value;
|
|
local3 = 0;
|
|
local4 = 0;
|
|
local5 = 0;
|
|
local6 = 0;
|
|
local7;
|
|
}
|
|
let final Never #t7 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:90:3: Error: Non-nullable variable 'local1' must be assigned before it can be used.
|
|
local1; // error
|
|
^^^^^^" in local1;
|
|
local2;
|
|
let final Never #t8 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:92:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
local3; // error
|
|
^^^^^^" in local3;
|
|
local4;
|
|
let final Never #t9 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:94:3: Error: Non-nullable variable 'local5' must be assigned before it can be used.
|
|
local5; // error
|
|
^^^^^^" in local5;
|
|
local6;
|
|
local7;
|
|
};
|
|
static field () → Null fieldCompound = () → Null {
|
|
core::int local3;
|
|
late core::int local4;
|
|
local3 = (let final Never #t10 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:111:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
local3 += 0; // error
|
|
^^^^^^" in local3).{core::num::+}(0);
|
|
local4 = (let final Never #t11 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:112:3: Error: Late variable 'local4' without initializer is definitely unassigned.
|
|
local4 += 0; // error
|
|
^^^^^^" in local4).{core::num::+}(0);
|
|
};
|
|
static method methodDirect<T extends core::Object? = dynamic>(self::methodDirect::T% value) → dynamic {
|
|
self::methodDirect::T% local1;
|
|
late self::methodDirect::T% local2;
|
|
core::int local3;
|
|
late core::int local4;
|
|
FutureOr<core::int>local5;
|
|
late FutureOr<core::int>local6;
|
|
late self::methodDirect::T% local7 = value;
|
|
let final Never #t12 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:16:3: Error: Non-nullable variable 'local1' must be assigned before it can be used.
|
|
local1; // error
|
|
^^^^^^" in local1;
|
|
let final Never #t13 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:17:3: Error: Late variable 'local2' without initializer is definitely unassigned.
|
|
local2; // error
|
|
^^^^^^" in local2;
|
|
let final Never #t14 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:18:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
local3; // error
|
|
^^^^^^" in local3;
|
|
let final Never #t15 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:19:3: Error: Late variable 'local4' without initializer is definitely unassigned.
|
|
local4; // error
|
|
^^^^^^" in local4;
|
|
let final Never #t16 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:20:3: Error: Non-nullable variable 'local5' must be assigned before it can be used.
|
|
local5; // error
|
|
^^^^^^" in local5;
|
|
let final Never #t17 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:21:3: Error: Late variable 'local6' without initializer is definitely unassigned.
|
|
local6; // error
|
|
^^^^^^" in local6;
|
|
local7;
|
|
}
|
|
static method methodConditional<T extends core::Object? = dynamic>(core::bool b, self::methodConditional::T% value) → dynamic {
|
|
self::methodConditional::T% local1;
|
|
late self::methodConditional::T% local2;
|
|
core::int local3;
|
|
late core::int local4;
|
|
FutureOr<core::int>local5;
|
|
late FutureOr<core::int>local6;
|
|
late self::methodConditional::T% local7 = value;
|
|
if(b) {
|
|
local1 = value;
|
|
local2 = value;
|
|
local3 = 0;
|
|
local4 = 0;
|
|
local5 = 0;
|
|
local6 = 0;
|
|
local7 = value;
|
|
}
|
|
let final Never #t18 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:62:3: Error: Non-nullable variable 'local1' must be assigned before it can be used.
|
|
local1; // error
|
|
^^^^^^" in local1;
|
|
local2;
|
|
let final Never #t19 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:64:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
local3; // error
|
|
^^^^^^" in local3;
|
|
local4;
|
|
let final Never #t20 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:66:3: Error: Non-nullable variable 'local5' must be assigned before it can be used.
|
|
local5; // error
|
|
^^^^^^" in local5;
|
|
local6;
|
|
local7;
|
|
}
|
|
static method methodCompound() → dynamic {
|
|
core::int local3;
|
|
late core::int local4;
|
|
local3 = (let final Never #t21 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:103:3: Error: Non-nullable variable 'local3' must be assigned before it can be used.
|
|
local3 += 0; // error
|
|
^^^^^^" in local3).{core::num::+}(0);
|
|
local4 = (let final Never #t22 = invalid-expression "pkg/front_end/testcases/nnbd/definitely_unassigned.dart:104:3: Error: Late variable 'local4' without initializer is definitely unassigned.
|
|
local4 += 0; // error
|
|
^^^^^^" in local4).{core::num::+}(0);
|
|
}
|
|
static method main() → dynamic {}
|