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 {
63356335 }
63366336 case ElementKind . PROPERTY : {
63376337 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+
63396349 let thisArg : ExpressionRef = 0 ;
63406350 if ( propertyInstance . is ( CommonFlags . INSTANCE ) ) {
63416351 thisArg = this . compileExpression (
Original file line number Diff line number Diff line change @@ -877,7 +877,6 @@ export class Resolver extends DiagnosticEmitter {
877877 }
878878 if ( isTypedElement ( kind ) ) {
879879 let type = ( < TypedElement > element ) . type ;
880- assert ( type != Type . void ) ;
881880 let classReference = type . getClassOrWrapper ( this . program ) ;
882881 if ( classReference ) {
883882 let wrappedType = classReference . wrappedType ;
You can’t perform that action at this time.
0 commit comments