blob: 1d1d2b27459a2aaa70c3c2526cbdef843990f503 [file] [log] [blame]
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// test w/ `pub run test -N unnecessary_null_in_if_null_operators`
var x = 1 ?? null; //LINT
var y = 1 ?? 1; //OK
var z = null ?? 1; //LINT
class X {
m1() {
var x = 1 ?? null; //LINT
var y = 1 ?? 1; //OK
var z = null ?? 1; //LINT
}
}