File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -6335,7 +6335,17 @@ export class Compiler extends DiagnosticEmitter {
6335
6335
}
6336
6336
case ElementKind . PROPERTY : {
6337
6337
let propertyInstance = < Property > target ;
6338
- let getterInstance = assert ( propertyInstance . getterInstance ) ;
6338
+ let getterInstance = propertyInstance . getterInstance ;
6339
+ let type = assert ( this . resolver . getTypeOfElement ( target ) ) ;
6340
+
6341
+ if ( ! getterInstance ) {
6342
+ this . error (
6343
+ DiagnosticCode . Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures ,
6344
+ expression . range , type . toString ( )
6345
+ ) ;
6346
+ return module . unreachable ( ) ;
6347
+ }
6348
+
6339
6349
let thisArg : ExpressionRef = 0 ;
6340
6350
if ( propertyInstance . is ( CommonFlags . INSTANCE ) ) {
6341
6351
thisArg = this . compileExpression (
Original file line number Diff line number Diff line change @@ -877,7 +877,6 @@ export class Resolver extends DiagnosticEmitter {
877
877
}
878
878
if ( isTypedElement ( kind ) ) {
879
879
let type = ( < TypedElement > element ) . type ;
880
- assert ( type != Type . void ) ;
881
880
let classReference = type . getClassOrWrapper ( this . program ) ;
882
881
if ( classReference ) {
883
882
let wrappedType = classReference . wrappedType ;
You can’t perform that action at this time.
0 commit comments