summaryrefslogtreecommitdiff
path: root/test/files/neg
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Merge pull request #3214 from retronym/ticket/8024Adriaan Moors2013-12-134-0/+43
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8024 Fix inaccurate message on overloaded ambiguous ident
| * | | | | | SI-8024 Improve user-level toString of package objectsJason Zaugg2013-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were outputing a the unattractive `package package`; now we opt for `package object pack`. Under `-Ydebug`, we still go to the "accurate" mode of the old `toString` implementation, which differentiates package objects vs package object classes.
| * | | | | | SI-8024 Fix inaccurate message on overloaded ambiguous identJason Zaugg2013-12-124-0/+43
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Symbol#owner` of an overloaded symbol doesn't necessarily correspond to the owner of any of the alternatives, and as such it shouldn't be used in error message. neg/t8024.scala actually represents a progression since 2.10.3; the ambiguity was not reported. I bisected the change to https://github.com/scala/scala/pull/1554.
* | | | | | Merge pull request #3263 from retronym/ticket/6780Adriaan Moors2013-12-131-0/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6780 Better handling of cycles in in-scope implicit search
| * | | | | | SI-6780 Better handling of cycles in in-scope implicit searchJason Zaugg2013-12-111-0/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit searches in the body of implicit members with inferred types were leading to cycles. Before we used to resolve that by saying there were no implicits in scope at all; now we just skip the current context and still include the enclosing implicits. Care is taken not to cache results under these circumstances. This entails reworking `Context#implicitss` so that: - the implicit info cache only contains implicits from the current level. The List[List[_]] is now contructed on demand; - we can detect cycles by setting `implicitsCacheRunId` to -1 during the computation. The outer implicits when we encounter that. - we avoid caching when we hit a cycle or when the owner is uninitialized.
* | | | | | Merge pull request #3169 from som-snytt/issue/4841-plugin-cpJason Zaugg2013-12-121-1/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Plugins get a class path
| * | | | | SI-4841 Plugins get a class pathSom Snytt2013-12-061-1/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let -Xplugin specify a class path (or multiple of them). Each entry can be a jar or dir, and the first entry to supply a plugin descriptor defines the plugin to load. If no plugin is found on the path, then issue a warning if `-Xdev`. This honors the legacy silent treatment (which scala-ide tests for). In the proposed scheme, each plugin gets a class loader so that plugins are isolated from each other. Presumably, if compiler plugins were a rich ecosystem, in which shared dependencies were required in incompatible versions, this would have become a requirement by now. (Updated with a `DirectTest` that uses two plugins, but keeping the following as documentation.) Partest can't do multiple plugins yet, but this is what it looks like: ``` skalac -Xplugin:sample.jar:useful.jar:util,needful.jar:another.jar:util,needful.jar:util:exploded -Xplugin-require:sample,another,other foo.scala skalac -Xplugin:sample.jar:useful.jar:util,needful.jar:another.jar:util,needful.jar:util:exploded -Xplugin-require:sample,other -Xplugin-disable:another foo.scala skalac -Xplugin:sample.jar:useful.jar:util,sample.jar:useful.jar:util -Xplugin-require:sample foo.scala ``` The manual test shows three plugins with various permutations of jars and dirs. The manual test demonstrates that plugins only see classes on their class path: ``` Initializing test.plugins.SamplePlugin needful.Needful? Failure(java.lang.ClassNotFoundException: needful.Needful) useful.Useful? Success(class useful.Useful) Initializing more.plugins.AnotherPlugin needful.Needful? Success(class needful.Needful) useful.Useful? Failure(java.lang.ClassNotFoundException: useful.Useful) Initializing other.plugins.OtherPlugin ``` Disabling a plugin results in a message instead of silent suppression: ``` Disabling plugin another ``` The duplicate plugin class test must still be honored: ``` Ignoring duplicate plugin sample (test.plugins.SamplePlugin) Initializing test.plugins.SamplePlugin needful.Needful? Failure(java.lang.ClassNotFoundException: needful.Needful) useful.Useful? Success(class useful.Useful) ``` If the path is bad, then missing classes will report which plugin induced the error: ``` Error: class not found: util/Probe required by test.plugins.SamplePlugin Error: class not found: util/Probe required by more.plugins.AnotherPlugin Initializing other.plugins.OtherPlugin needful.Needful? Success(class needful.Needful) useful.Useful? Failure(java.lang.ClassNotFoundException: useful.Useful) error: Missing required plugin: sample error: Missing required plugin: another two errors found ```
* | | | | Test unliftable not found scenarioDen Shabalin2013-12-102-0/+9
| | | | |
* | | | | Refactor Holes and Reifiers slices of Quasiquotes cakeDen Shabalin2013-12-102-0/+12
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit performs a number of preliminary refactoring needed to implement unliftable: 1. Replace previous inheritance-heavy implementation of Holes with similar but much simpler one. Holes are now split into two different categories: ApplyHole and UnapplyHole which correspondingly represent information about holes in construction and deconstruction quasiquotes. 2. Make Placeholders extract holes rather than their field values. This is required to be able to get additional mode-specific information from holes (e.g. only ApplyHoles have types). 3. Bring ApplyReifier & UnapplyReifier even closer to the future where there is just a single base Reifier with mode parameter. Along the way a few bugs were fixed: 1. SI-7980 SI-7996 fail with nice error on bottom types splices 2. Use asSeenFrom instead of typeArguments in parseCardinality. This fixes a crash if T <:< Iterable[Tree] but does not itself have any type arguments. 3. Fix spurious error message on splicing of Lists through Liftable[List[T]]
* | | | Merge pull request #3246 from xeno-by/topic/compile-time-onlyJason Zaugg2013-12-102-20/+69
|\ \ \ \ | | | | | | | | | | streamlines refchecking undesired symbol properties
| * | | | streamlines refchecking undesired symbol propertiesEugene Burmako2013-12-092-20/+69
| |/ / / | | | | | | | | | | | | | | | | | | | | Unifies `checkDeprecated`, `checkMigration` and `checkCompileTimeOnly` into a single centralized point of reference that is now consistently called from `checkTypeRef`, `transformIdent` and `transformSelect`.
* / / / deprecates macro def return type inferenceEugene Burmako2013-12-1030-61/+98
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the new focus on quasiquotes in macro implementations, we now have to change the way how inference of macro def return types works. Previously, if the return type of a macro def wasn’t specified, we looked into the signature of its macro impl, took its return type (which could only be c.Expr[T]) and then assigned T to be the return type of the macro def. We also had a convenient special case which inferred Any in case when the body of the macro impl wasn’t an expr. That avoided reporting spurious errors if the macro impl had its body typed incorrectly (because in that case we would report a def/impl signature mismatch anyway) and also provided a convenience by letting macro impls end with `???`. However now we also allow macro impls to return c.Tree, which means that we are no longer able to do any meaningful type inference, because c.Tree could correspond to tree of any type. Unfortunately, when coupled with the type inference special case described above, this means that the users who migrate from exprs to quasiquotes are going to face an unpleasant surprise. If they haven’t provided explicit return types for their macro defs, those types are going to be silently inferred as `Any`! This commit plugs this loophole by prohibiting type inference from non-expr return types of macro impls (not counting Nothing). Moreover, it also deprecates c.Expr[T] => T inference in order to avoid confusion when switching between exprs and quasiquotes.
* | | Merge pull request #3216 from xeno-by/topic/macro-error-messagesAdriaan Moors2013-12-0313-66/+58
|\ \ \ | | | | | | | | better error messages for various macro definition errors
| * | | better error messages for various macro definition errorsEugene Burmako2013-12-0313-66/+58
| |/ /
* / / Better error messages for common Function/Tuple mistakesJason Zaugg2013-12-014-0/+63
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firstly, for `((a, b) => c): (Tuple2[A, B] => C)`, we currently just offer "missing parameter type." Is something of a rite of passage to know that you need `{ case (...)}` This commit stops short DWIM, but does offer a diagnostic to guide the user towards the supported way of destructuring a `Tuple` in the sole argument of a `Function1`. Secondly, another (less common?) way one might try to write a function to destructure a single tuple argument is: (((a, b)) => c) The parser now matches offers a specific error message for this, and points out the alternatives. In both cases, we avoid offering syntactically invalid alternatives, by detecting names that aren't valid as variable-patterns, and falling back to generic "paramN" in the error message. A handly utility function to sequence a list of options is liberated from the pattern matcher for broader use.
* | Merge pull request #3197 from retronym/merge/2.10.x-positions-to-masterJason Zaugg2013-11-261-4/+4
|\ \ | | | | | | Merge 2.10.x, and PR #3196, to master
| * | Merge remote-tracking branch 'origin/pr/3196' into ↵Jason Zaugg2013-11-261-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge/2.10.x-positions-to-master Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala test/files/neg/applydynamic_sip.check - Changes two calls from `.endOrPoint` to `.point`. The latter is safe in master for both `Range`- and `OffsetPosition`s - Updates checkfiles with unrelated position changes (constructors)
| | * SI-7463,SI-8003 Correct wrong position for {select,apply}Dynamic callsSimon Schaefer2013-11-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new positions are range positions that directly refer to the beginning and the end of the method calls in the sources instead of simply point to the beginning of the expression. This allows the scala-ide to semantically highlight select- and applyDynamic method calls, because it has only to traverse the tree and apply the color ranges to the given position ranges. This also fixes the position marker of an error messages related to a wrong Dynamic method signature.
| | * SI-7519: Additional test case covering sbt/sbt#914Mark Harrah2013-10-233-0/+26
| | | | | | | | | | | | (cherry picked from commit e72c32db03b44d6eaf1c1872765a578c5445e15f)
| | * [nomaster] SI-7519 Less brutal attribute resetting in adapt fallbackJason Zaugg2013-10-232-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefers `resetLocalAttrs` over `resetAllAttrs`. The latter loses track of which enclosing class of the given name is referenced by a `This` node which prefixes the an applied implicit view. The code that `resetAllAttrs` originally landed in: https://github.com/scala/scala/commit/d4c63b#L6R804 Cherry picked from 433880e91cba9e1e926e9fcbf04ecd4aeb1d73eb Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala
* | | SI-7984 Issue unchecked warning for type aliasesJason Zaugg2013-11-267-9/+23
|/ / | | | | | | | | | | - Dealias pattern types before launching the CheckabilityChecker - Sharpen the error messages to explain that the dealiased type is the expansion of the alias.
* | Merge pull request #3178 from retronym/ticket/7872Adriaan Moors2013-11-257-1/+72
|\ \ | | | | | | SI-7872 Plug a variance exploit in refinement types
| * | SI-7872 Plug a variance exploit in refinement typesJason Zaugg2013-11-237-1/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refinement types are collapsed to a TypeTree with an original during type checking; this was enough to evade variance validation in refchecks. This commit: - validates the original of `TypeTree`s in refchecks - changes VarianceValidator to recurse into: - the originals of `TypeTree`s - `TypTree` (to cover, e.g. `CompoundTypeTree` / `SelectFromTypeTree`) It also finds an unreported variance violation in an existing test case, variances.scala. This looks to be legitimate.
* | | Merge pull request #3130 from retronym/ticket/7967-2Adriaan Moors2013-11-252-0/+18
|\ \ \ | | | | | | | | SI-7967 Account for type aliases in self-type checks
| * | | SI-7967 Account for type aliases in self-type checksJason Zaugg2013-11-222-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These eluded the check for "illegal inheritance; self-type does not conform" as AliasTypeRef doesn't forward `typeOfThis`. This commit dealiases before calling `typeOfThis`. That seems to be the most localised change. Without the dealias, we had: parent.tpe = TypeRef(pre, sym = AliasTypeSymbol("CC"), Nil) parent.tpe.typeOfThis = parent.tpe.transform(sym.typeOfThis) = CC After: parent.tpe.dealias = TypeRef(pre, sym = ClassSymbol("C"), Nil) parent.tpe.dealias.typeOfThis = C with B
* | | | Merge pull request #3131 from densh/pr/deprecate-pair-and-tripleJason Zaugg2013-11-227-9/+9
|\ \ \ \ | | | | | | | | | | Deprecate Pair and Triple
| * | | | deprecate Pair and TripleDen Shabalin2013-11-207-9/+9
| | |/ / | |/| |
* / | | Handle TypeApply(fun, ...) for symbol-less funsJason Zaugg2013-11-212-0/+7
|/ / / | | | | | | | | | | | | | | | Such as class literals, as one could conjure in `classOf[Int][Int]` Before, this would crash with a `NullPointerException`
* | | Merge pull request #3141 from soc/SI-7961Adriaan Moors2013-11-172-8/+14
|\ \ \ | | | | | | | | SI-7961 Fix false positive procedure warnings
| * | | SI-7961 Fix false positive procedure warningsSimon Ochsenreither2013-11-142-8/+14
| |/ / | | | | | | | | | | | | | | | | | | Two issues are fixed in this commit: - `def foo: Unit` was detected as missing a return type - The warning was emitted for constructors, but `def this(...): Unit = ...` is not valid Scala syntax
* | | Merge pull request #3129 from adriaanm/pr-rebase-3001Adriaan Moors2013-11-1371-182/+340
|\ \ \ | |/ / |/| | [rebase] blackbox and whitebox macros
| * | blackbox restriction #4: can't customize pattern matchingEugene Burmako2013-11-124-1/+31
| | | | | | | | | | | | | | | | | | When an application of a blackbox macro is used as an extractor in a pattern match, it triggers an unconditional compiler error, preventing customizations of pattern matching implemented with macros.
| * | blackbox restriction #3: can't affect implicit searchEugene Burmako2013-11-125-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | When an application of a blackbox macro is used as an implicit candidate, no expansion is performed until the macro is selected as the result of the implicit search. This makes it impossible to dynamically calculate availability of implicit macros.
| * | blackbox restriction #2: can't guide type inferenceEugene Burmako2013-11-124-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an application of a blackbox macro still has undetermined type parameters after Scala’s type inference algorithm has finished working, these type parameters are inferred forcedly, in exactly the same manner as type inference happens for normal methods. This makes it impossible for blackbox macros to influence type inference, prohibiting fundep materialization.
| * | blackbox restriction #1: can't refine the official return typeEugene Burmako2013-11-125-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an application of a blackbox macro expands into a tree `x`, the expansion is wrapped into a type ascription `(x: T)`, where `T` is the declared return type of the blackbox macro with type arguments and path dependencies applied in consistency with the particular macro application being expanded. This invalidates blackbox macros as an implementation vehicle of type providers.
| * | blackbox and whitebox macrosEugene Burmako2013-11-1257-181/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first commit in the series. This commit only: 1) Splits Context into BlackboxContext and WhiteboxContext 2) Splits Macro into BlackboxMacro and WhiteboxMacro 3) Introduces the isBundle property in the macro impl binding Here we just teach the compiler that macros can now be blackbox and whitebox, without actually imposing any restrictions on blackbox macros. These restrictions will come in subsequent commits. For description and documentation of the blackbox/whitebox separation see the official macro guide at the scaladoc website: http://docs.scala-lang.org/overviews/macros/blackbox-whitebox.html Some infrastructure work to make evolving macros easier: compile partest-extras with quick so they can use latest library/reflect/...
* | | Merge pull request #3123 from som-snytt/issue/7747-scrapcodes-fixAdriaan Moors2013-11-121-6/+2
|\ \ \ | | | | | | | | SI-7747 Support class based wrappers in REPL
| * | | SI-7747 Support class based wrappers clean upSom Snytt2013-11-101-6/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplified the code paths to just use one of two `Wrapper` types for textual templating. Simplified the class-based template to use the same `$iw` name for the both the class and the wrapper value. In addition, the $read value is an object extending $read, instead of containing an extra instance field, which keeps paths to values the same for both templates. Both styles trigger loading the value object by referencing the value that immediately wraps the user code, although for the class style, inner vals are eager and it would suffice to load the enclosing `$read` object. The proposed template included extra vals for values imported from history, but this is not necessary since such an import is always a stable path. (Or, counter-example to test is welcome.) The test for t5148 is updated as a side effect. Probably internal APIs don't make good test subjects. Modify -Y option message.
* / / Make parameters to implicit value classes privateJason Zaugg2013-11-121-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that they aren't offered as an autocomplete suggestion: implicit class Shouty(string: String) extends AnyVal { def SHOUT_! = string.toUpperCase + "!" } "". // autocompletion offers `.string` here The original incarnation of value classes didn't allow this sort of encapsulation, so we either invented goofy names like `__thingToAdd` or just picked `x` or `self`. But SI-7859 has delivered us the freedom to keep the accessor private. Should we keep any of these accessors around in a deprecated form? The implicit classes in Predef were added in 2.11.0-M2 (c26a8db067e4f), so they are okay. I think we can make reason that these APIs were both accidental and unlikely to be interpreted as public, so we can break them immediately. scala> Left(1).x res0: scala.util.Either[Int,Int] = Left(1) scala> import concurrent.duration._ import concurrent.duration._ scala> 1.n res1: Int = 1
* | Parser stack reduction peekingAheadSom Snytt2013-11-082-5/+8
| | | | | | | | | | | | | | | | Restores a form of the previous peekAhead bookkeeping. Instead of tracking the current token and offset outside of xxxAhead, peekingAhead uses `in.prev` and will push back if the operation results in an empty tree.
* | Parser stack reduction discussionSom Snytt2013-11-085-13/+13
| | | | | | | | Check files
* | Rewrites the parser stack reduction logic.Paul Phillips2013-11-083-9/+6
| | | | | | | | | | | | | | Centralizes the scattered logic surrounding erroneous pattern syntax. Consolidates the redundant lookahead implementations. Eliminates var manipulation in favor of recursion.
* | Force several tests to run using inline delambdafication.James Iry2013-11-063-0/+3
| | | | | | | | | | | | The differences when running with method based delambdafication aren't important enough yet to create specialized versions that use method based delambdafication.
* | Create test variants where delambdafication alters signatures.James Iry2013-11-064-0/+32
| | | | | | | | | | | | This commit includes several tests where there's a variation in signatures between inline delambdafication and method based delambdafication.
* | Add a skeletal Delambdafy phase.James Iry2013-11-014-44/+48
| | | | | | | | | | | | This commit adds a do-nothing phase called "Delambdafy" that will eventually be responsible for doing the final translation of lambdas into classes.
* | Merge pull request #3076 from soc/SI-7605-deprecate-proceduresJames Iry2013-10-293-0/+18
|\ \ | | | | | | SI-7605 Deprecate procedure syntax
| * | SI-7605 Deprecate procedure syntaxSimon Ochsenreither2013-10-243-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit covers three cases: - constructor definitions (def this {...}) - concrete method definitions (def foo {...}) - abstract method declarations (def foo) The deprecation is currently hidden behind -Xfuture pending IDE support for migrating users from procedures to methods.
* | | Merge pull request #3082 from retronym/ticket/6385Grzegorz Kossakowski2013-10-296-20/+21
|\ \ \ | | | | | | | | SI-6385 Avoid bridges to identical signatures over value classes
| * | | SI-6385 Avoid bridges to identical signatures over value classesJason Zaugg2013-10-286-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As Paul noted in the comments to SI-6260 (from which I mined some test cases) "there is no possible basis for conflict here": scala> class C[A](val a: Any) extends AnyVal defined class C scala> class B { def x[A](ca: C[A]) = () } defined class B scala> class D extends B { override def x[A](ca: C[A]) = () } <console>:8: error: bridge generated for member method x: [A](ca: C[A])Unit in class D which overrides method x: [A](ca: C[A])Unit in class B clashes with definition of the member itself; both have erased type (ca: Object)Unit class D extends B { override def x[A](ca: C[A]) = () } ^ What was happening? Bridge computation compares `B#x` and `D#x` exitingErasure, which results in comparing: ErasedValueType(C[A(in B#x)]) =:= ErasedValueType(C[A(in D#x)]) These types were considered distinct (on the grounds of the unique type hash consing), even though they have the same erasure and involve the same value class. That triggered creation of an bridge. After post-erasure eliminates the `ErasedValuedType`s, we find that this marvel of enginineering is bridges `(Object)Unit` right back onto itself. The previous resolution of SI-6385 (d435f72e5fb7fe) was a test case that confirmed that we detected the zero-length bridge and reported it nicely, which happened after related work in SI-6260. But we can simply avoid creating in it in the first place. That's what this commit does. It does so by reducing the amount of information carried in `ErasedValueType` to the bare minimum needed during the erasure -> posterasure transition. We need to know: 1. which value class wraps the value, so we can box and unbox as needed 2. the erasure of the underlying value, which will replace this type in post-erasure. This construction means that the bridge above computation now compares: ErasedValueType(C, Any) =:= ErasedValueType(C, Any]) I have included a test to show that: - we don't incur any linkage or other runtime errors in the reported case (run/t6385.scala) - a similar case compiles when the signatures align (pos/t6260a.scala), but does *not* compile when the just erasures align (neg/t6260c.scala) - polymorphic value classes continue to erase to the instantiated type of the unbox: (run/t6260b.scala) - other cases in SI-6260 remains unsolved and indeed unsolvable without an overhaul of value classes: (neg/t6260b.scala) In my travels I spotted a bug in corner case of null, asInstanceOf and value classes, which I have described in a pending test.
* | | | Remove orphaned check files and flags files.Jason Zaugg2013-10-274-15/+0
|/ / / | | | | | | | | | (for f in $(find test -name '*.check' -o -name '*.flags'); do bare=$(echo $f | sed -E 's/\.\w+$//'); ([[ -f "$bare" ]] || [[ -d "$bare" ]] || [[ -f "$bare.scala" ]] || [[ -f "$bare.test" ]] || echo $f) done;) | xargs rm