From 80eb08f5a1de98ebbec0e989928d665c7061c07c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 5 Dec 2006 18:54:47 +0000 Subject: updated test files to avoid illegal null assign... updated test files to avoid illegal null assignments --- test/files/neg/bug576.scala | 2 +- test/files/neg/bug591.scala | 4 ++-- test/files/neg/bug712.scala | 2 +- test/files/pos/bug788.scala | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/files/neg/bug576.scala b/test/files/neg/bug576.scala index 2d9cf01910..fd83217a45 100644 --- a/test/files/neg/bug576.scala +++ b/test/files/neg/bug576.scala @@ -9,7 +9,7 @@ trait PriorityTreeXXX extends BaseListXXX { type Node <: BasicTreeNode; trait BasicTreeNode extends BaseNode { - def sibling: Node = null; + def sibling: Node; def insert(dir : Int, node : Node) = { if (true) sibling.insert(node); //else insert(node); diff --git a/test/files/neg/bug591.scala b/test/files/neg/bug591.scala index 94d8068bb3..0f0b02395c 100644 --- a/test/files/neg/bug591.scala +++ b/test/files/neg/bug591.scala @@ -32,8 +32,8 @@ trait BaseFlow extends BaseList { } trait BFNode extends BaseNode { - private var input : Input = null; - private var output : Output = null; + private var input : Input = _; + private var output : Output = _; def input_=(in : Input) = {} diff --git a/test/files/neg/bug712.scala b/test/files/neg/bug712.scala index 0887810c85..6f2627743f 100644 --- a/test/files/neg/bug712.scala +++ b/test/files/neg/bug712.scala @@ -14,6 +14,6 @@ trait B extends A { def scope : Int; } implicit def coerceSym(sym : Symbol) : SymbolImpl; - var s : Symbol = null; + var s : Symbol = _; val s_scope = s.scope; } diff --git a/test/files/pos/bug788.scala b/test/files/pos/bug788.scala index 23ffa4a52d..19638dd170 100644 --- a/test/files/pos/bug788.scala +++ b/test/files/pos/bug788.scala @@ -14,7 +14,6 @@ trait Test { def asExpression(e : ExpressionImpl) : Named = { e match { case f : NamedImpl => f.self; - case _ => null; } } } -- cgit v1.2.3