33using System . Reflection ;
44using ASCompletion . Completion ;
55using ASCompletion . Context ;
6- using ASCompletion . Model ;
76using PluginCore ;
87using PluginCore . Controls ;
98using ScintillaNet ;
@@ -68,7 +67,7 @@ internal StatementReturnType GetStatementReturnType(ScintillaControl sci, string
6867 var currentClass = ASContext . Context . CurrentClass ;
6968 if ( currentClass . InFile . Context == null )
7069 {
71- currentClass = ( ClassModel ) currentClass . Clone ( ) ;
70+ currentClass = currentClass . Clone ( ) ;
7271 var language = PluginBase . MainForm . SciConfig . GetLanguageFromFile ( currentClass . InFile . BasePath ) ;
7372 currentClass . InFile . Context = ASContext . GetLanguageContext ( language ) ?? ASContext . Context ;
7473 }
@@ -79,9 +78,9 @@ internal StatementReturnType GetStatementReturnType(ScintillaControl sci, string
7978 var type = returnType . GetType ( ) ;
8079 var result = new StatementReturnType
8180 {
82- Resolve = ( ASResult ) type . GetField ( "resolve" ) . GetValue ( returnType ) ,
83- Position = ( int ) type . GetField ( "position" ) . GetValue ( returnType ) ,
84- Word = ( string ) type . GetField ( "word" ) . GetValue ( returnType )
81+ Resolve = ( ASResult ) type . GetField ( nameof ( StatementReturnType . Resolve ) ) . GetValue ( returnType ) ,
82+ Position = ( int ) type . GetField ( nameof ( StatementReturnType . Position ) ) . GetValue ( returnType ) ,
83+ Word = ( string ) type . GetField ( nameof ( StatementReturnType . Word ) ) . GetValue ( returnType )
8584 } ;
8685 return result ;
8786 }
0 commit comments