summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2597 from paulp/issue/7520Paul Phillips2013-06-031-0/+10
|\ | | | | SI-7520 bug in subtyping.
| * SI-7520 bug in subtyping.Paul Phillips2013-05-311-0/+10
| | | | | | | | | | | | | | | | isSubType, if given two SingleTypes, would check =:= and stop there. It is necessary to continue with weakening the left hand side, because (for instance) the singleton type on the left hand side could be a refinement class carrying parents which are themselves single or constant types.
* | Merge pull request #2615 from paulp/issue/7517Paul Phillips2013-06-038-6/+116
|\ \ | | | | | | SI-7517 type constructors too eagerly normalized.
| * | SI-7517 type constructors too eagerly normalized.Paul Phillips2013-05-318-6/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think 403eadd0f1 was largely a symptomatic remedy (not that we shouldn't harden against such outcomes) and that this commit gets closer to the root causes. The unanticipated change to test/files/run/t6113.check is like a cry of support from the jury box. -Foo[[X](Int, X)] +Foo[AnyRef{type l[X] = (Int, X)}#l] We should continue to look at calls to normalize with grave suspicion.
* | | Merge pull request #2577 from scalamacros/pullrequest/paradiseEugene Burmako2013-06-03279-793/+1090
|\ \ \ | | | | | | | | Backport from paradise/macros
| * | | refactors macro compilationEugene Burmako2013-05-2814-41/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrades the way that macro defs are compiled by factoring out most of the logic in typedMacroBody and related errors in ContextErrors into an standalone cake. This leads to tighter cohesion and better code reuse as the cake is isolated from the rest of the compiler and is much easier to evolve than just a method body. Increased convenience of coding macro compilation allowed me to further clarify the implementation of the macro engine (e.g. take a look at Validators.scala) and to easily implement additional features, namely: 1) Parameters and return type of macro implementations can now be plain c.Tree's instead of previously mandatory c.Expr's. This makes macros more lightweight as there are a lot of situations when one doesn't need to splice macro params (the only motivation to use exprs over trees). Also as we're on the verge of having quasiquotes in trunk, there soon will be no reason to use exprs at all, since quasiquotes can splice everything. 2) Macro implementations can now be defined in bundles, standalone cakes built around a macro context: http://docs.scala-lang.org/overviews/macros/bundles.html. This further reduces boilerplate by simplifying implementations complex macros due to the fact that macro programmers no longer need to play path-dependent games to use helpers.
| * | | refactors macro testsEugene Burmako2013-05-28258-785/+847
| | | | | | | | | | | | | | | | | | | | | | | | | | | | putting in a nutshell, this patch: * condenses some macro-XXX-a/b/c/... bundles * renames some tests to prepare for other macro flavors * introduces some additional tests
| * | | macro engine refactoringEugene Burmako2013-05-2810-4/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Macro impl bindings now store more information in signatures. Previously it was a flattened List[Int] corresponding to flattened paramss, now it's List[List[Int]] to preserve the lengths of parameter lists. Also now we distinguish between c.Expr parameters and others. Previously actual and reference macro signatures were represented as tuples of vparamss, rets, and sometimes tparams. Now they are all abstracted behind MacroImplSig. Finally this patch provides better error messages in cases of argsc <-> paramsc and argc <-> paramc mismatches.
| * | | SI-7461 c.typeCheck(silent = true) now suppresses ambiguous errorsEugene Burmako2013-05-273-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise use cases like the one shown in the attached test (trying to typecheck something, which leads to an ambiguous overload error) will mysteriously fail compilation.
* | | | Merge pull request #2613 from retronym/ticket/6309James Iry2013-05-312-0/+17
|\ \ \ \ | | | | | | | | | | SI-6309 Test case for early-init / private[this] crasher.
| * | | | SI-6309 Test case for early-init / private[this] crasher.Jason Zaugg2013-05-312-0/+17
| | |_|/ | |/| | | | | | | | | | This has worked since 98daf03, "Overhauled local/getter/setter name logic.".
* | | | Merge pull request #2592 from paulp/issue/7088Paul Phillips2013-05-312-0/+15
|\ \ \ \ | |_|_|/ |/| | | SI-7088 Array crasher in erasure.
| * | | SI-7088 Array crasher in erasure.Paul Phillips2013-05-272-0/+15
| | |/ | |/| | | | | | | | | | The usual business where half our pattern matches are missing half the necessary cases.
* | | Revert "SI-6039 Harden against irrelevant filesystem details"Paul Phillips2013-05-311-18/+0
| |/ |/| | | | | | | | | | | | | This reverts commit b0758f5cb9d966b940933d48bdbb45d17a80de66. This commit sent startup time through the roof, at least in some circumstances (it is presumably related to one's current working directory.)
* | Merge pull request #2563 from soc/SI-7474James Iry2013-05-282-18/+7
|\ \ | | | | | | SI-7474 Parallel collections: End the exception handling madness
| * | SI-7474 Parallel collections: End the exception handling madnessSimon Ochsenreither2013-05-282-18/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "What's wrong with an API which non-deterministically returns either type A or type B(Set(A, ...))?" This is pretty much what the exception handling behavior of the parallel collections does: If exceptions of type A occur, either an exception of type A or an exception of type B, wrapping multiple exceptions of A's, is returned. This behavior is incredibly broken and so unintuitive, that even people writing tests don't handle it correctly, as seen in test files/run/t5375.scala. Concerning “non-deterministic”: How many exceptions are observed before the operation is aborted depends on the machine, the available cores and hyper-threading, the operating system, the threadpool implementation and configuration, the size of the collection and the runtime itself. In fact, files/run/t5375.scala can be made to fail reproducible on both jdk7u and Avian, if we run on a single-core machine like in a virtual machine. With this change, we just pass the "first" exception which occurs. This is - consistent with the behaviour of sequential collections, - doesn't require users to know more about parallel collections than they already do ("elements might be processed out of order"), - in line with what Java 8 does. “Why don't we wrap everything in CompositeThrowables?” Even consistently returning CompositeThrowable doesn't make much sense (because we have fail-fast behaviour and don't wait until all tasks have finished or have thrown an exception). Therefore, there is no useful semantic in having a CompositeThrowable which returns "some" exceptions. I have done extensive research into C#'s approach (which is very similar to what Scala did until now, but even more messy) and the key observation from asking multiple C# developers is that not a single one had understood how PLINQ handled exceptions or could describe the semantics of it. As a consequence, either a) gather and return all exceptions in a CompositeThrowable or b) just return one, unwrapped, instead of non-deterministically wrapping a non-deterministic number of exceptions into a completely unrelated wrapper type. Considering that changing the parallel collection semantics in such a profound way as described in a) is out of question, b) is chosen. As soon as Scala targets Java > 7 Throwable#addSurpressed can be used to add further exceptions to the one which gets returned. This would allow passing more information to the caller without compromising the simplicity of the API.
* | Merge pull request #2579 from vigdorchik/list_mapJames Iry2013-05-281-0/+26
|\ \ | |/ |/| SI-7502 removing non-existent element from ListMap leaves it unchaged.
| * SI-7502 removing non-existent element from ListMap returns same map.Eugene Vigdorchik2013-05-221-0/+26
| | | | | | | | | | | | | | Current imperative version constructs a new ListMap regardless of the fact the map doesn't contain the element. Replace it with the tail-recursive variant that conserves. Also replace some usages with the invariant now held.
* | Merge pull request #2598 from paulp/pr/raw-type-stubsPaul Phillips2013-05-274-0/+19
|\ \ | | | | | | Print raw types correctly.
| * | Print raw types correctly.Paul Phillips2013-05-264-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "For convenience, these are usable as stub implementations" bit has generated surprisingly few angry letters, but I noticed today it blows it on raw types. Or, used to blow it. /** As seen from class Sub, the missing signatures are as follows. * For convenience, these are usable as stub implementations. * (First one before this commitw as 'def raw(x$1: M_1)' */ def raw(x$1: M_1[_ <: String]): Unit = ??? def raw(x$1: Any): Unit = ???
* | | Merge pull request #2524 from soc/SI-7469-java-collectionsPaul Phillips2013-05-271-8/+0
|\ \ \ | |/ / |/| | SI-7469 Remove deprecated elements in Java{Conversions,Converters}
| * | SI-7469 Remove deprecated elements in Java{Conversions,Converters}Simon Ochsenreither2013-05-241-8/+0
| | |
* | | Merge pull request #2591 from som-snytt/topic/partest-inchesPaul Phillips2013-05-26365-481/+1285
|\ \ \ | | | | | | | | SI-7003 Partest redirects stderr to log file
| * | | SI-7198 Par-Test uses filters filesSom Snytt2013-05-2513-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partest will also read files/filters and files/kind/filters for filter expressions (one per line, trimmed, leading #comments) which are taken as regexes. A test/files/filters is provided which attempts to quell HotSpot warnings; the test for this commit requires it. The elided lines can be revealed using the lemon juice of verbosity: apm@mara:~/projects/snytt/test$ ./partest --verbose --show-diff files/run/t7198.scala [snip] >>>>> Transcripts from failed tests >>>>> > partest files/run/t7198.scala % scalac t7198.scala [snip] % filtering t7198-run.log --Over the moon --Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 28). The filtering operation is part of the transcript, which is printed on failure. No attempt is made to be clever about not slurping the filters file a thousand times. Previous literal patterns had to be updated because there's parens in them thar strings. Future feature: pattern aliases, define once globally and invoke in test filters.
| * | | SI-7003 Partest redirects stderr to log fileSom Snytt2013-05-25362-481/+1271
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some scalac output is on stderr, and it's useful to see that in the log file, especially for debugging. Adds a line filter for logs, specified as "filter: pattern" in the test source. Backslashes are made forward only when detected as paths. Test alignments: Deprecations which do not pertain to the system under test are corrected in the obvious way. When testing deprecated API, suppress warnings by deprecating the Test object. Check files are updated with useful true warnings, instead of running under -nowarn. Language feature imports as required, instead of running under -language. Language feature not required, such as casual use of postfix. Heed useful warning. Ignore broken warnings. (Rarely, -nowarn.) Inliner warnings pop up under -optimise only, so for now, just filter them out where they occur. Debug output from the test required an update.
* | | Merge pull request #2585 from paulp/pr/concision-contributionPaul Phillips2013-05-262-0/+29
|\ \ \ | |/ / |/| | Concision contribution.
| * | Concision contribution.Paul Phillips2013-05-232-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have lots of core classes for which we need not go through the symbol to get the type: ObjectClass.tpe -> ObjectTpe AnyClass.tpe -> AnyTpe I updated everything to use the concise/direct version, and eliminated a bunch of noise where places were calling typeConstructor, erasedTypeRef, and other different-seeming methods only to always wind up with the same type they would have received from sym.tpe. There's only one Object type, before or after erasure, with or without type arguments. Calls to typeConstructor were especially damaging because (see previous commit) it had a tendency to cache a different type than the type one would find via other means. The two types would compare =:=, but possibly not == and definitely not eq. (I still don't understand what == is expected to do with types.)
* | | Merge pull request #2573 from retronym/ticket/7499Paul Phillips2013-05-242-1/+9
|\ \ \ | | | | | | | | SI-7499 Additional test case for SI-7319
| * | | SI-7499 Additional test case for SI-7319Jason Zaugg2013-05-212-1/+9
| | |/ | |/| | | | | | | From a duplicate ticket.
* | | Merge pull request #2574 from paulp/issue/3425Paul Phillips2013-05-246-0/+1172
|\ \ \ | |_|/ |/| | SI-3425 erasure crash with refinement members.
| * | Added another test.Paul Phillips2013-05-213-0/+1127
| | | | | | | | | | | | Probably overshot the mark a little.
| * | SI-3425 erasure crash with refinement members.Paul Phillips2013-05-213-0/+45
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking that a refinement class symbol does not override any symbols does mean it will have to be invoke reflectively; but the converse is not true. It can override other symbols and still have to be called reflectively, because the overridden symbols may also be defined in refinement classes. scala> class Foo { type R1 <: { def x: Any } ; type R2 <: R1 { def x: Int } } defined class Foo scala> typeOf[Foo].member(TypeName("R2")).info.member("x": TermName).overrideChain res1: List[$r.intp.global.Symbol] = List(method x, method x) scala> res1 filterNot (_.owner.isRefinementClass) res2: List[$r.intp.global.Symbol] = List() And checking that "owner.info decl name == this" only works if name is not overloaded. So the logic is all in "isOnlyRefinementMember" now, and let's hope that suffices for a while.
* | Merge pull request #2576 from retronym/ticket/7436Paul Phillips2013-05-231-0/+9
|\ \ | |/ |/| SI-7436 Varargs awareness for super param aliasing.
| * SI-7436 Varargs awareness for super param aliasing.Jason Zaugg2013-05-211-0/+9
| | | | | | | | | | | | | | Don't consider a super class parameter accessor to be an alias if it is a repeated. Parameter aliases are used to avoid retaining redundant fields in the subclass; but that optimization is out of the question here.
* | Merge pull request #2492 from paulp/pr/enter-elimination-modePaul Phillips2013-05-201-1/+1
|\ \ | | | | | | Toward more organized typer state.
| * \ Merge remote-tracking branch 'origin/master' into pr/enter-elimination-modePaul Phillips2013-05-194-2/+7
| |\ \ | | | | | | | | | | | | | | | | | | | | * origin/master: An attempt to make tests deterministic. SI-7427 stop crashing under -Ydebug.
| * \ \ Merge commit 'd93826f278' into pr/enter-elimination-modePaul Phillips2013-05-181-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd93826f278': Incorporated reviewer feedback. Incorporated reviewer feedback. Refactored stabilize. Eliminated HKmode. Eliminated RETmode. Eliminated SNDTRYmode. Started eliminating modes. Corralling Modes into a smaller pen. Conflicts: src/compiler/scala/tools/nsc/typechecker/Macros.scala src/compiler/scala/tools/nsc/typechecker/RefChecks.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala
| | * \ \ Merge branch 'master' into HEADPaul Phillips2013-05-1627-16/+173
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: SI-7469 Remove @deprecated scala.util.logging SI-3943 Test case for already-fixed Java interop bug Fix formatting for couple of docs in the compiler SI-7476 Add documentation to GenericTraversableTemplate SI-7469 Remove @deprecated scala.util.parsing.ast SI-7469 Remove @deprecated MurmurHash elements SI-7469 Remove deprecated elements in s.u.parsing.combinator SI-7469 Make @deprecated elems in scala.concurrent private[scala] removes duplication in inferImplicitValue SI-7047 fixes silent for c.inferImplicitXXX SI-7167 implicit macros decide what is divergence macroExpandAll is now triggered in all invocations of typed SI-5923 instantiates targs in deferred macro applications SI-6406 Restore deprecated API SI-6039 Harden against irrelevant filesystem details Limit unnecessary calls to Type#toString. fix typo in comment SI-7432 add testcases SI-7432 Range.min should throw NoSuchElementException on empty range AbstractFile.getDirectory does not return null when outDir is "." Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala
| | * | | | Corralling Modes into a smaller pen.Paul Phillips2013-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to reduce the frequency of low-level operations with modes. I mean stuff like this: if ((mode & (EXPRmode | LHSmode)) == EXPRmode) THey don't make those ten line boolean guards any easier to understand. Hopefully this will lead us toward eliminating some of the modes entirely, or at least better isolating their logic rather than having it interspersed at arbitrary points throughout the typer. Modes are in their entirety a leaked implementation detail. Typing a tree requires a tree and optionally an expected type. It shouldn't require a bucket of state bits. In subsequent commits I will start eliminating them. This commit also breaks adapt down into more digestible chunks.
* | | | | | Merge pull request #2562 from som-snytt/issue/double-pluginv2.11.0-M3Jason Zaugg2013-05-2062-141/+129
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | SI-7494 Each plugin must only be instantiated once.
| * | | | | SI-7494 Tests for status quoSom Snytt2013-05-1962-141/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exploit SI-6446 fix to move old pending tests for plugins to the active pool. Also, nuance the partest runner to allow the compiler to crash with a FatalError if a check file is present. Some of the plugin tests make phase assembly throw. One of the legacy tests was moved back to pending: There seems to be a race for who shall be deemed truly dependent. Back to pending for you! apm@mara:~/projects/snytt/test$ ./partest files/neg/t7494-cyclic-dependency/ Selected 1 tests drawn from specified tests > starting 1 test in neg ok 1 - neg/t7494-cyclic-dependency 1/1 passed (elapsed time: 00:00:04) Test Run PASSED apm@mara:~/projects/snytt/test$ ./partest files/neg/t7494-cyclic-dependency/ Selected 1 tests drawn from specified tests > starting 1 test in neg !! 1 - neg/t7494-cyclic-dependency [output differs] > 0/1 passed, 1 failed in neg >>>>> Transcripts from failed tests >>>>> > partest files/neg/t7494-cyclic-dependency % scalac t7494-cyclic-dependency/ThePlugin.scala % scalac t7494-cyclic-dependency/sample_2.scala error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice! % diff files/neg/t7494-cyclic-dependency-neg.log files/neg/t7494-cyclic-dependency.check @@ -1 +1 @@ -error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice! +error: Cycle in compiler phase dependencies detected, phase cyclicdependency2 reacted twice! 0/1 passed, 1 failed (elapsed time: 00:00:04) Test Run FAILED
* | | | | | An attempt to make tests deterministic.Paul Phillips2013-05-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nondeterminism presently showing itself in presentation/implicit-member is a consequence of the presentation compiler tests relying on details of the behavior of toString calls. We need to stomp this out, but it will take a while. Based on the check file changes enclosed with this commit, this will suffice for the presentation compiler tests. A broader assault will have to take place, but not yet.
* | | | | | SI-7427 stop crashing under -Ydebug.Paul Phillips2013-05-192-0/+5
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change "dumpClassesAndAbort" to "devWarning". You can witness it happen like so. % scalac test/files/pos/t7427.scala -Ydebug -Xdev ... [running phase cleanup on t7427.scala] [running phase icode on t7427.scala] warning: !!! PJUMP(method matchEnd4)/scala.tools.nsc.backend.icode.GenICode$PJUMP is not a control flow instruction warning: !!! PJUMP(method case6)/scala.tools.nsc.backend.icode.GenICode$PJUMP is not a control flow instruction [running phase inliner on t7427.scala] [running phase inlinehandlers on t7427.scala] Having now lived with this for months, I have no ambition to unravel the actual problem, I just want it to stop crashing.
* | | | | Merge 2.10.x into masterAdriaan Moors2013-05-175-0/+20
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Implicits.scala src/reflect/scala/reflect/runtime/JavaMirrors.scala
| * | | | Merge pull request #2536 from adriaanm/ticket-7359Adriaan Moors2013-05-175-75/+21
| |\ \ \ \ | | | | | | | | | | | | [backport #1727] SI-7359 cyclic nested java class
| | * | | | [backport #1727] SI-7359 cyclic nested java classAdriaan Moors2013-05-165-75/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original commit message (from 54a84a36d5): SI-6548 reflection correctly enters jinners When completing Java classes, runtime reflection enumerates their fields, methods, constructors and inner classes, loads them and enters them into either the instance part (ClassSymbol) or the static part (ModuleSymbol). However unlike fields, methods and constructors, inner classes don't need to be entered explicitly - they are entered implicitly when being loaded. This patch fixes the double-enter problem, make sure that enter-on-load uses the correct owner, and also hardens jclassAsScala against double enters that can occur in a different scenario.
| * | | | | SI-7486 regression in implicit resolution.Paul Phillips2013-05-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | What a touchy beast the compiler is.
* | | | | | Merge pull request #2518 from paulp/issue/1786Adriaan Moors2013-05-173-20/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-1786 incorporate defined bounds in inference
| * | | | | | No bounds-driven inference for the named.Paul Phillips2013-05-142-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a variation on the previous commit which excludes named type parameters, so this works def f(x: Class[_]) = x.foo.bar But this does not: def f[T](x: Class[T]) = x.foo.bar This seems undesirable to me, but I offer it in case it makes the patch more attractive to others.
| * | | | | | SI-1786 incorporate defined bounds in inferencePaul Phillips2013-05-124-25/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fixes SI-5459. Look, you don't have to redeclare the bounds, isn't it exciting? For instance, there are eight places in JavaMirrors with this: jTypeVariable[_ <: GenericDeclaration] After this code is in starr, those can look like this: jTypeVariable[_] Since TypeVariable's definition looks like this: interface TypeVariable<D extends GenericDeclaration> We already know that!