Skip to content

Better tracking of inferred types and constraints for lint analysis #9211

@scabug

Description

@scabug
Welcome to Scala version 2.11.6-20150309-134842-c11032c6b1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40).
Type in expressions to have them evaluated.
Type :help for more information.

scala> trait T[A] ; class C extends T[Any]
defined trait T
defined class C

scala> def f[A](t: T[A]) = ()
f: [A](t: T[A])Unit

scala> f(new C)
<console>:11: warning: a type was inferred to be `Any`; this may indicate a programming error.
              f(new C)
                ^

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions