You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following works in 2.9.1 (and earlier versions) but fails in trunk (2011-11-21):
objectWithOpTest {
traitWithOpextendsCloneable {
deff:this.type=thisdefg1:this.type= {
f
}
defg2:this.type= {
valt= f
t
}
}
}
Using f directly in g1 is OK but assigning it to an intermediate variable in g2 fails:
C:\Users\szeiger\Desktop>scalac Test.scala
C:\Users\szeiger\Desktop>c:\StandaloneApps\scala-2.10.0.r26037-b20111121023229\bin\scalac Test.scala
Test.scala:13:error: typemismatch;
found : t.type (with underlying typeWithOpTest.WithOp)
required: WithOp.this.type
t
^
one error found
Adding an explicit type annotation ": this.type" to t also makes it work.
The text was updated successfully, but these errors were encountered:
The following works in 2.9.1 (and earlier versions) but fails in trunk (2011-11-21):
Using f directly in g1 is OK but assigning it to an intermediate variable in g2 fails:
Adding an explicit type annotation ": this.type" to t also makes it work.
The text was updated successfully, but these errors were encountered: