| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
% scala -Dscalac.debug.tvar
scala> class Foo[CC[X] <: Traversable[X]] { def bar[T](xs: CC[T]) = xs.head }
defined class Foo
scala> new Foo bar List(1,2,3)
[ create] ?CC ( In Foo[CC[X] <: Traversable[X]] )
[ create] ?CC ( In Foo[CC[X] <: Traversable[X]] )
[ setInst] Nothing ( In Foo[CC[X] <: Traversable[X]], CC=Nothing )
[ create] ?CC ( In Foo[CC[X] <: Traversable[X]] )
[ create] ?T ( In Foo[CC[X] <: Traversable[X]]#bar[T] )
[ create] ?A ( In List#apply[A] )
[ create] ?A ( In List#apply[A] )
[ setInst] Int ( In List#apply[A], A=Int )
[ create] ?CC ( In Foo[CC[X] <: Traversable[X]] )
[ create] ?T ( In Foo[CC[X] <: Traversable[X]]#bar[T] )
[ create] ?CC ( In Foo[CC[X] <: Traversable[X]] )
[ applyArgs] ?CC ( In Foo[CC[X] <: Traversable[X]], apply args ?T to CC )
[ setInst] List ( In Foo[CC[X] <: Traversable[X]], CC=List )
[ setInst] Int ( In Foo[CC[X] <: Traversable[X]]#bar[T], T=Int )
res0: Int = 1
Also, I gave TypeVar some polymorphism. Review by @moors.
|
|
|
|
|
|
|
| |
Custom versions of collections which methods which operate on 2 or 3
collections. Eliminated most users of zip/zipped. Cleaned up the kinds
checking code somewhat. Reduced the number of silent typechecks
being performed at named argument sites.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Important note for busy commit log skimmers ***
Symbol method "fullName" has been trying to serve the dual role of "how
to print a symbol" and "how to find a class file." It cannot serve both
these roles simultaneously, primarily because of package objects but
other little things as well. Since in the majority of situations we want
the one which corresponds to the idealized scala world, not the grubby
bytecode, I went with that for fullName. When you require the path to a
class (e.g. you are calling Class.forName) you should use javaClassName.
package foo { package object bar { class Bippy } }
If sym is Bippy's symbol, then
sym.fullName == foo.bar.Bippy
sym.javaClassName == foo.bar.package.Bippy
*** End important note ***
There are many situations where we (until now) forewent revealing
everything we knew about a type mismatch. For instance, this isn't very
helpful of scalac (at least in those more common cases where you didn't
define type X on the previous repl line.)
scala> type X = Int
defined type alias X
scala> def f(x: X): Byte = x
<console>:8: error: type mismatch;
found : X
required: Byte
def f(x: X): Byte = x
^
Now it says:
found : X
(which expands to) Int
required: Byte
def f(x: X): Byte = x
^
In addition I rearchitected a number of methods involving:
- finding a symbol's owner
- calculating a symbol's name
- determining whether to print a prefix
No review.
|
|
|
|
|
|
|
|
| |
Since I don't want to commit anything "interesting" until we ship 2.9, a
few uninteresting cleanups involving how types are printed, getting some
debugging code in shape to prepare for the long winter ahead, etc. No
review.
|
|
|
|
|
|
| |
Some cleanup from investigating #4041, with a comment instead of a fix
for the ticket. Review by rytz in case he sees a good way to fix it.
|
|
|
|
|
|
| |
A raw tree was making its way into an error message. Removed. Closes
#4196, no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some refinement of the error messages when the found and required types
have the same simple names. No longer must we watch people scratch their
heads at such messages as:
found : scala.collection.Set[String]
required: Set[String]
Now so clear you could enjoy a movie through it:
found : scala.collection.Set[String]
required: scala.collection.immutable.Set[String]
No review.
|
| |
|
| |
|
|
|
|
|
|
| |
added @deprecatedName annotation, allowing to deprecate parameter names.
review by prokopec.
|
| |
|
|
|
|
|
|
| |
removed integration of placeholder syntax and named arguments. review by
odersky
|
| |
|
| |
|
|
|
|
|
|
| |
fixes to check files and removed nonapplicable test case Tuple2 impl,
but commented out so that we can bootstrap whitespace...
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Enhanced error message when a type error is because of identically named
classes, one in scala.* and one not.
|
| |
|
|
|
|
|
| |
named arguments only at top level in () parameters.
|
|
|
|
|
|
| |
improvements to names / defaults (implicits, type of defaults, #2064,
...)
|
|
|
|
|
|
| |
allow using named / default arguments in self- and super constructor
calls. fixes #2050 and #2052.
|
| |
|
|
|
|
|
|
| |
named argument disallowed when assignment expression would typecheck.
minor fixe to names / defaults.
|
|
- MethodTypes now have (params: List[Symbol])
- "copy"-methods for case classes
- the "copy" object in the compiler is now called "treeCopy"
|