TypeScript/tests/cases/compiler/objectCreationExpressionInFunctionParameter.ts
2014-07-12 17:30:19 -07:00

6 lines
127 B
TypeScript

class A {
constructor(public a1: string) {
}
}
function foo(x = new A(123)) { //should error, 123 is not string
}}