2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/propertyWrappedInTry.ts(3,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
|
|
|
tests/cases/compiler/propertyWrappedInTry.ts(5,9): error TS1129: Statement expected.
|
|
|
|
tests/cases/compiler/propertyWrappedInTry.ts(11,5): error TS1128: Declaration or statement expected.
|
|
|
|
tests/cases/compiler/propertyWrappedInTry.ts(11,18): error TS1005: ';' expected.
|
|
|
|
tests/cases/compiler/propertyWrappedInTry.ts(17,1): error TS1128: Declaration or statement expected.
|
|
|
|
tests/cases/compiler/propertyWrappedInTry.ts(5,16): error TS2304: Cannot find name 'bar'.
|
|
|
|
tests/cases/compiler/propertyWrappedInTry.ts(5,22): error TS2304: Cannot find name 'someInitThatMightFail'.
|
|
|
|
tests/cases/compiler/propertyWrappedInTry.ts(11,12): error TS2304: Cannot find name 'baz'.
|
|
|
|
|
|
|
|
|
2014-11-20 00:30:35 +01:00
|
|
|
==== tests/cases/compiler/propertyWrappedInTry.ts (8 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
class Foo {
|
|
|
|
|
|
|
|
try {
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
public bar = someInitThatMightFail();
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1129: Statement expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'bar'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'someInitThatMightFail'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
} catch(e) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public baz() {
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1128: Declaration or statement expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1005: ';' expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'baz'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
return this.bar; // doesn't get rewritten to Foo.bar.
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1128: Declaration or statement expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
|