mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add test case
The test passes in 1.8 and fails in master.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// @noImplicitAny: true
|
||||
function getNumber(): number {
|
||||
return 1;
|
||||
}
|
||||
class Example {
|
||||
getNumber(): number {
|
||||
return 1;
|
||||
}
|
||||
doSomething(a = this.getNumber()): typeof a {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user