File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
tests/ConsoleAppFramework.GeneratorTests Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -222,12 +222,8 @@ public GlobalOptionInfo[] ParseGlobalOptions()
222222 bool isRequired = x . required ;
223223 object ? defaultValue = null ;
224224
225- // TODO: need
226- if ( memberAccess . Name is GenericNameSyntax genericName )
227- {
228- var typeArgument = genericName . TypeArgumentList . Arguments [ 0 ] ;
229- typeSymbol = new ( model . GetTypeInfo ( typeArgument ) . Type ! ) ; // TODO: not !
230- }
225+ var symbolInfo = model . GetSymbolInfo ( memberAccess ) . Symbol as IMethodSymbol ;
226+ typeSymbol = new ( symbolInfo ! . TypeArguments [ 0 ] ) ;
231227
232228 var arguments = node . ArgumentList . Arguments ;
233229 name = model . GetConstantValue ( arguments [ 0 ] . Expression ) . Value ! . ToString ( ) ;
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public void EnumParse()
6868app.ConfigureGlobalOptions((ref ConsoleApp.GlobalOptionsBuilder builder) =>
6969{
7070 var p = builder.AddGlobalOption("--parameter", "", 0);
71- var d = builder.AddGlobalOption("--dry-run", "");
71+ var d = builder.AddGlobalOption<bool> ("--dry-run", "");
7272 var f = builder.AddGlobalOption("--fruit", "", Fruit.Orange);
7373 return (p, d, f);
7474});
You can’t perform that action at this time.
0 commit comments