Skip to content

Commit 2aa6fc6

Browse files
committed
Retire untried tests
1 parent f0c050e commit 2aa6fc6

6 files changed

+132
-226
lines changed

tests/untried/neg/warn-unused-imports.check

-33
This file was deleted.

tests/untried/neg/warn-unused-imports.flags

-1
This file was deleted.

tests/untried/neg/warn-unused-imports.scala

-125
This file was deleted.

tests/untried/neg/warn-unused-privates.check

-66
This file was deleted.

tests/untried/neg/warn-unused-privates.flags

-1
This file was deleted.

tests/warn/i15503a.scala

+132
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,135 @@ package i22692:
328328

329329
type b = AbstractButton
330330
type t = swingEvent.AncestorListener
331+
332+
package ancient:
333+
package p {
334+
class Bippo {
335+
def length: Int = 123
336+
class Tree
337+
}
338+
}
339+
340+
package object p1 {
341+
import p._
342+
class A
343+
implicit class B(val s: String) { def bippy = s }
344+
val c: Bippo = new Bippo
345+
type D = String
346+
}
347+
package object p2 {
348+
import p._
349+
class A
350+
implicit class B(val s: String) { def bippy = s }
351+
val c: Bippo = new Bippo
352+
type D = Int
353+
}
354+
355+
trait NoWarn {
356+
{
357+
import p1._ // no warn
358+
println("abc".bippy)
359+
}
360+
361+
{
362+
import p1._ // no warn
363+
println(new A)
364+
}
365+
366+
{
367+
import p1.B // no warn
368+
println("abc".bippy)
369+
}
370+
371+
{
372+
import p1._ // no warn
373+
import c._ // no warn
374+
println(length)
375+
}
376+
377+
{
378+
import p1._ // no warn
379+
import c._ // no warn
380+
val x: Tree = null
381+
println(x)
382+
}
383+
384+
{
385+
import p1.D // no warn
386+
val x: D = null
387+
println(x)
388+
}
389+
}
390+
391+
trait Warn {
392+
{
393+
import p1.A // warn
394+
println(123)
395+
}
396+
397+
{
398+
import p1.{ A, B } // warn on A
399+
println("abc".bippy)
400+
}
401+
402+
{
403+
import p1.{ A, B } //warn // warn on both
404+
println(123)
405+
}
406+
407+
{
408+
import p1._ // no warn (technically this could warn, but not worth the effort to unroll unusedness transitively)
409+
import c._ // warn
410+
println(123)
411+
}
412+
413+
{
414+
import p1._ // warn
415+
println(123)
416+
}
417+
418+
{
419+
class Tree
420+
import p1._ // no warn
421+
import c._ // warn
422+
val x: Tree = null
423+
println(x)
424+
}
425+
426+
{
427+
import p1.c._ // warn
428+
println(123)
429+
}
430+
}
431+
432+
trait Nested {
433+
{
434+
import p1._ // warn
435+
trait Warn {
436+
import p2.*
437+
println(new A)
438+
println("abc".bippy)
439+
}
440+
println("")
441+
}
442+
443+
{
444+
import p1._ // no warn
445+
trait NoWarn {
446+
import p2.B // no warn
447+
println("abc".bippy)
448+
println(new A)
449+
}
450+
println(new NoWarn { })
451+
}
452+
453+
{
454+
import p1.A // warn
455+
trait Warn {
456+
import p2.A
457+
println(new A)
458+
}
459+
println(new Warn { })
460+
}
461+
}
462+
end ancient

0 commit comments

Comments
 (0)