11 lines
483 B
Plaintext
11 lines
483 B
Plaintext
==== tests/cases/compiler/collisionRestParameterUnderscoreIUsage.ts (1 errors) ====
|
|
declare var console: { log(msg?: string): void; };
|
|
var _i = "This is what I'd expect to see";
|
|
class Foo {
|
|
constructor(...args: any[]) {
|
|
console.log(_i); // This should result in error
|
|
~~
|
|
!!! error TS2398: Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter.
|
|
}
|
|
}
|
|
new Foo(); |