Skip to content

Commit 8337615

Browse files
jonathanpeppersjonpryor
authored andcommitted
Revert "[generator] fix NRE encountered when binding AndroidX (#396)" (#400)
Context: https://jenkins.mono-project.com/job/xamarin-android-pr-builder-release/140/ This reverts commit 2e68225. I neglected to test this change in `Mono.Android.csproj`! obj\Debug\android-28\mcw\Java.Time.Temporal.ChronoUnit.cs(284,50): error CS0234: The type or namespace name 'ITemporal' does not exist in the namespace 'Java.Time.Temporal' (are you missing an assembly reference?) [C:\Users\jopepper\Desktop\Git\xamarin-android\src\Mono.Android\Mono.Android.csproj] obj\Debug\android-28\mcw\Java.Time.Temporal.ChronoUnit.cs(284,99): error CS0234: The type or namespace name 'ITemporal' does not exist in the namespace 'Java.Time.Temporal' (are you missing an assembly reference?) [C:\Users\jopepper\Desktop\Git\xamarin-android\src\Mono.Android\Mono.Android.csproj] obj\Debug\android-28\mcw\Java.Time.Temporal.ChronoUnit.cs(299,56): error CS0234: The type or namespace name 'ITemporal' does not exist in the namespace 'Java.Time.Temporal' (are you missing an assembly reference?) [C:\Users\jopepper\Desktop\Git\xamarin-android\src\Mono.Android\Mono.Android.csproj] obj\Debug\android-28\mcw\Java.Time.Temporal.ValueRange.cs(113,72): error CS0234: The type or namespace name 'ITemporalField' does not exist in the namespace 'Java.Time.Temporal' (are you missing an assembly reference?) [C:\Users\jopepper\Desktop\Git\xamarin-android\src\Mono.Android\Mono.Android.csproj] obj\Debug\android-28\mcw\Java.Time.Temporal.ValueRange.cs(128,70): error CS0234: The type or namespace name 'ITemporalField' does not exist in the namespace 'Java.Time.Temporal' (are you missing an assembly reference?) [C:\Users\jopepper\Desktop\Git\xamarin-android\src\Mono.Android\Mono.Android.csproj] Let's revert this change, and I will look into another fix for the AndroidX problem. It will happen *after* we branch.
1 parent 2e68225 commit 8337615

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tools/generator/Parameter.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class Parameter {
1616
string name;
1717
string type, managed_type, rawtype;
1818
ISymbol sym;
19-
bool is_enumified, validated, is_valid;
19+
bool is_enumified;
2020

2121
internal Parameter (string name, string type, string managedType, bool isEnumified, string rawtype = null)
2222
{
@@ -254,20 +254,16 @@ public string GetGenericCall (CodeGenerationOptions opt, Dictionary<string, stri
254254

255255
public bool Validate (CodeGenerationOptions opt, GenericParameterDefinitionList type_params)
256256
{
257-
if (validated)
258-
return is_valid;
259-
validated = true;
260-
261257
sym = opt.SymbolTable.Lookup (type, type_params);
262258
if (sym == null) {
263259
Report.Warning (0, Report.WarningParameter + 0, "Unknown parameter type {0} {1}.", type, opt.ContextString);
264-
return (is_valid = false);
260+
return false;
265261
}
266262
if (!sym.Validate (opt, type_params)) {
267263
Report.Warning (0, Report.WarningParameter + 1, "Invalid parameter type {0} {1}.", type, opt.ContextString);
268-
return (is_valid = false);
264+
return false;
269265
}
270-
return (is_valid = true);
266+
return true;
271267
}
272268

273269
public static Parameter FromElement (XElement elem)

0 commit comments

Comments
 (0)