You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler/REPL normally give an unchecked warning with .isInstanceOf[GenericType[SomeType]], which makes sense since it gets type-erased to GenericType[Object].
However, .isInstanceOf[GenericType[AnotherGenericType[...]]] does not give any warning, even though it is equally affected by type erasure.
The answer http://stackoverflow.com/a/11555642/319931 shows where in the compiler code the issue is; in particular "[t]he check function returns unit without performing any test" for generic types.
The text was updated successfully, but these errors were encountered:
The compiler/REPL normally give an unchecked warning with
.isInstanceOf[GenericType[SomeType]]
, which makes sense since it gets type-erased toGenericType[Object]
.However,
.isInstanceOf[GenericType[AnotherGenericType[...]]]
does not give any warning, even though it is equally affected by type erasure.I asked about this on Stack Overflow (some more examples there): http://stackoverflow.com/questions/11554323/why-does-some123-isinstanceofoptionliststring-not-give-an-unchecked
The answer http://stackoverflow.com/a/11555642/319931 shows where in the compiler code the issue is; in particular "[t]he check function returns unit without performing any test" for generic types.
The text was updated successfully, but these errors were encountered: