mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 21:21:31 +03:00
20 lines
352 B
TypeScript
20 lines
352 B
TypeScript
class C {
|
|
constructor(x);
|
|
constructor(public x: string = 1) { // error
|
|
var y = x;
|
|
}
|
|
}
|
|
|
|
class D<T, U> {
|
|
constructor(x: T, y: U);
|
|
constructor(x: T = 1, public y: U = x) { // error
|
|
var z = x;
|
|
}
|
|
}
|
|
|
|
class E<T extends Date> {
|
|
constructor(x);
|
|
constructor(x: T = new Date()) { // error
|
|
var y = x;
|
|
}
|
|
} |