Nice/testsuite/compiler/typing/inference merging.testsuite,NONE,1.1

Daniel Bonniot <[email protected]> Tue, 24 May 2005 19:14:58 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/testsuite/compiler/typing/inference
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29140/testsuite/compiler/typing/inference

Added Files:
	merging.testsuite 
Log Message:
Fix mergings involving the Object type.


--- NEW FILE: merging.testsuite ---
/// PASS
  /// Toplevel
let Object REMOVED = new Object();
int insertionIndex(Object key){
  ?Object cur = null;
  if(cur == REMOVED)
    return (cur != null && cur != REMOVED) ? 1 : -1;
  return (cur != null && cur != REMOVED) ? 1 : -1;
}

/// PASS
  ?Object o = null;
  if (true)
    o = new Object();
  else
    assert o instanceof String;
  Object x = o;

/// PASS
  A a = new B();

  if (true)
    assert a instanceof B;
  else
    assert a instanceof C;

  A aa = a;

  /// Toplevel
class A {}
class B extends A {}
class C extends A {}



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005