root/trunk/ProjectFortress/not_passing_yet/genericFunctionalMethods.fss

Revision 3562, 1.2 KB (checked in by jmaessen, 8 months ago)

Bunches of minor library tweaks due to bugs uncovered along the way,
plus a minor fix to the printing of extends clauses in AstToConcrete?
to make sure that the comprises keyword appears on the same line as
the comprises clause itself. Also includes source code for #328 and
#329.

Line 
1(*******************************************************************************
2    Copyright 2009 Sun Microsystems, Inc.,
3    4150 Network Circle, Santa Clara, California 95054, U.S.A.
4    All rights reserved.
5
6    U.S. Government Rights - Commercial software.
7    Government users are subject to the Sun Microsystems, Inc. standard
8    license agreement and applicable provisions of the FAR and its supplements.
9
10    Use is subject to license terms.
11
12    This distribution may include materials developed by third parties.
13
14    Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
15    trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
16 ******************************************************************************)
17
18component genericFunctionalMethods
19export Executable
20
21(** Initialization of generic functional methods in the interpreter is
22    failing, signaling that the generic parameter is unbound.
23    Commenting out the declaration and use of bar allows execution of
24    the equivalent dotted method to succeed. **)
25object O
26    foo[\T\](x:T): T = x
27(*
28    bar[\T\](self, y:T): T = y
29*)
30end
31
32run():() = do
33    assert(O.foo[\ZZ32\](17),17)
34    assert(bar[\ZZ32\](O,17),17)
35    println("OK")
36end
37
38end
Note: See TracBrowser for help on using the browser.