Show
Ignore:
Timestamp:
11/03/09 15:19:06 (3 weeks ago)
Author:
jmaessen
Message:

[static checks] Fixed massive bugs in the AbstractMethodChecker
(tested for in Compiled12.inherit). Modified
STypesUtil.inheritedMethods to avoid using a Frankensteinian
combination of plt and Scala tuple types, and to account for getter
and setter methods as well as ordinary and functional methods.

Location:
trunk/ProjectFortress/compiler_tests
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/compiler_tests/Compiled12.inherit.fss

    r4305 r4309  
    2020trait T comprises { U, V } 
    2121  abstract getter asString(): String 
     22  abstract getter foo(): String 
    2223  abstract m(t:T): T 
    2324  abstract mv(v:V): T 
     25  abstract leaf(): T 
    2426end 
    2527 
    2628object U extends T 
    2729  getter asString(): String = "U" 
     30  getter foo(): String = "U" 
    2831  m(t:T): T = t 
    2932  mv(v:V): T = v 
     33  leaf(): T = self 
    3034end 
    3135 
    3236trait V extends T comprises { W, X } 
     37  getter foo(): String = "V" 
     38  getter k(): String 
    3339  m(t:T): T = t.mv(self) 
    3440  mv(v:V): T = self 
     
    3743object W extends V 
    3844  getter asString(): String = "W" 
     45  getter k(): String = "WW" 
     46  leaf(): T = self 
    3947end 
    4048 
    4149object X extends V 
    4250  getter asString(): String = "X" 
     51  getter k(): String = "XX" 
     52  leaf(): T = self 
    4353end 
    4454 
     
    5363    println("W" X.m(W).asString) 
    5464    println("X" X.m(X).asString) 
     65    println("U" U.foo) 
     66    println("V" W.foo) 
     67    println("V" X.foo) 
     68    println("U" U.leaf().asString) 
     69    println("W" W.leaf().asString) 
     70    println("X" X.leaf().asString) 
    5571  end 
  • trunk/ProjectFortress/compiler_tests/Compiled12.inherit.test

    r4305 r4309  
    2626XX\n\ 
    2727WW\n\ 
     28XX\n\ 
     29UU\n\ 
     30VV\n\ 
     31VV\n\ 
     32UU\n\ 
     33WW\n\ 
    2834XX\n