diff --git a/packages/jsii-calc-base/test/assembly.jsii b/packages/jsii-calc-base/test/assembly.jsii
index d9b4a575a4..c8e66971d3 100644
--- a/packages/jsii-calc-base/test/assembly.jsii
+++ b/packages/jsii-calc-base/test/assembly.jsii
@@ -73,7 +73,6 @@
},
"name": "typeName",
"returns": {
- "optional": true,
"primitive": "any"
}
}
@@ -103,5 +102,5 @@
}
},
"version": "0.7.8",
- "fingerprint": "K1rAUs6WiQ5lF08T46B8v/5UL8T8Ot59e0Nc8rh2jiQ="
+ "fingerprint": "FbKHAP60R40tOOnvhCeDrZDrNlgzIypOfAdWPed+Jog="
}
diff --git a/packages/jsii-calc/lib/compliance.ts b/packages/jsii-calc/lib/compliance.ts
index 783a5a94cf..a0989493cc 100644
--- a/packages/jsii-calc/lib/compliance.ts
+++ b/packages/jsii-calc/lib/compliance.ts
@@ -939,3 +939,12 @@ export interface IInterfaceWithMethods {
export interface IInterfaceThatShouldNotBeADataType extends IInterfaceWithMethods {
readonly otherValue: string;
}
+
+/**
+ * jsii#284: do not recognize "any" as an optional argument
+ */
+export class DoNotRecognizeAnyAsOptional {
+ public method(_requiredAny: any, _optionalAny?: any, _optionalString?: string) {
+
+ }
+}
diff --git a/packages/jsii-calc/test/assembly.jsii b/packages/jsii-calc/test/assembly.jsii
index 97e7a8e8a5..d245fa15e5 100644
--- a/packages/jsii-calc/test/assembly.jsii
+++ b/packages/jsii-calc/test/assembly.jsii
@@ -382,7 +382,6 @@
"type": {
"collection": {
"elementtype": {
- "optional": true,
"primitive": "any"
},
"kind": "array"
@@ -394,13 +393,18 @@
"type": {
"collection": {
"elementtype": {
- "optional": true,
"primitive": "any"
},
"kind": "map"
}
}
},
+ {
+ "name": "anyProperty",
+ "type": {
+ "primitive": "any"
+ }
+ },
{
"name": "arrayProperty",
"type": {
@@ -528,7 +532,6 @@
"type": {
"collection": {
"elementtype": {
- "optional": true,
"primitive": "any"
},
"kind": "array"
@@ -540,7 +543,6 @@
"type": {
"collection": {
"elementtype": {
- "optional": true,
"primitive": "any"
},
"kind": "map"
@@ -548,9 +550,8 @@
}
},
{
- "name": "anyProperty",
+ "name": "unknownProperty",
"type": {
- "optional": true,
"primitive": "any"
}
},
@@ -560,13 +561,6 @@
"fqn": "jsii-calc.StringEnum",
"optional": true
}
- },
- {
- "name": "unknownProperty",
- "type": {
- "optional": true,
- "primitive": "any"
- }
}
]
},
@@ -1301,6 +1295,45 @@
],
"name": "DoNotOverridePrivates"
},
+ "jsii-calc.DoNotRecognizeAnyAsOptional": {
+ "assembly": "jsii-calc",
+ "docs": {
+ "comment": "jsii#284: do not recognize \"any\" as an optional argument"
+ },
+ "fqn": "jsii-calc.DoNotRecognizeAnyAsOptional",
+ "initializer": {
+ "initializer": true
+ },
+ "kind": "class",
+ "methods": [
+ {
+ "name": "method",
+ "parameters": [
+ {
+ "name": "_requiredAny",
+ "type": {
+ "primitive": "any"
+ }
+ },
+ {
+ "name": "_optionalAny",
+ "type": {
+ "optional": true,
+ "primitive": "any"
+ }
+ },
+ {
+ "name": "_optionalString",
+ "type": {
+ "optional": true,
+ "primitive": "string"
+ }
+ }
+ ]
+ }
+ ],
+ "name": "DoNotRecognizeAnyAsOptional"
+ },
"jsii-calc.DoubleTrouble": {
"assembly": "jsii-calc",
"fqn": "jsii-calc.DoubleTrouble",
@@ -3062,7 +3095,6 @@
{
"name": "value",
"returns": {
- "optional": true,
"primitive": "any"
}
}
@@ -3412,5 +3444,5 @@
}
},
"version": "0.7.8",
- "fingerprint": "Xn7Rk17rqR3AaMx3+ssxT0GR1sCWwz0OGC+C8QuLI3A="
+ "fingerprint": "2BaszImarh4WChl9DFUcygfTpEfXU17fHQT2wgEptfM="
}
diff --git a/packages/jsii-java-runtime-test/project/.gitignore b/packages/jsii-java-runtime-test/project/.gitignore
index 58d35b13a4..46aa9ff1a5 100644
--- a/packages/jsii-java-runtime-test/project/.gitignore
+++ b/packages/jsii-java-runtime-test/project/.gitignore
@@ -1,3 +1,5 @@
+bin/
+
!index.js
.idea
pom.xml
diff --git a/packages/jsii-java-runtime/project/.gitignore b/packages/jsii-java-runtime/project/.gitignore
index d0b519a66f..a6e9c72336 100644
--- a/packages/jsii-java-runtime/project/.gitignore
+++ b/packages/jsii-java-runtime/project/.gitignore
@@ -1,3 +1,5 @@
+bin/
+
!index.js
.idea
pom.xml
diff --git a/packages/jsii-pacmak/test/.gitignore b/packages/jsii-pacmak/test/.gitignore
index 013c75f014..ad8d4b09f2 100644
--- a/packages/jsii-pacmak/test/.gitignore
+++ b/packages/jsii-pacmak/test/.gitignore
@@ -1,2 +1,4 @@
+**/java/bin/
+
!*.tgz
diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/.jsii b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/.jsii
index d9b4a575a4..c8e66971d3 100644
--- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/.jsii
+++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/.jsii
@@ -73,7 +73,6 @@
},
"name": "typeName",
"returns": {
- "optional": true,
"primitive": "any"
}
}
@@ -103,5 +102,5 @@
}
},
"version": "0.7.8",
- "fingerprint": "K1rAUs6WiQ5lF08T46B8v/5UL8T8Ot59e0Nc8rh2jiQ="
+ "fingerprint": "FbKHAP60R40tOOnvhCeDrZDrNlgzIypOfAdWPed+Jog="
}
diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs
index 83224daeac..c38472e6b3 100644
--- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs
+++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs
@@ -19,7 +19,7 @@ protected Base(DeputyProps props): base(props)
}
/// the name of the class (to verify native type names are created for derived classes).
- [JsiiMethod("typeName", "{\"primitive\":\"any\",\"optional\":true}", "[]")]
+ [JsiiMethod("typeName", "{\"primitive\":\"any\"}", "[]")]
public virtual object TypeName()
{
return InvokeInstanceMethod