diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts
index 1432813e9d..2bf8935150 100644
--- a/src/compile/render-dom/index.ts
+++ b/src/compile/render-dom/index.ts
@@ -395,11 +395,11 @@ export default function dom(
});
let unknown_props_check;
- if (component.compile_options.dev && writable_props.length) {
+ if (component.compile_options.dev && !component.var_lookup.has('$$props') && writable_props.length) {
unknown_props_check = deindent`
const writable_props = [${writable_props.map(prop => `'${prop.export_name}'`).join(', ')}];
Object.keys($$props).forEach(key => {
- if (!writable_props.includes(key)) console.warn(\`<${component.tag}> was created with unknown prop '\${key}'\`);
+ if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(\`<${component.tag}> was created with unknown prop '\${key}'\`);
});
`;
}
diff --git a/test/runtime/samples/dev-warning-unknown-props-with-$$props/Foo.svelte b/test/runtime/samples/dev-warning-unknown-props-with-$$props/Foo.svelte
new file mode 100644
index 0000000000..9e5c62339d
--- /dev/null
+++ b/test/runtime/samples/dev-warning-unknown-props-with-$$props/Foo.svelte
@@ -0,0 +1,7 @@
+
+
+
{foo}
+{JSON.stringify($$props)}
diff --git a/test/runtime/samples/dev-warning-unknown-props-with-$$props/_config.js b/test/runtime/samples/dev-warning-unknown-props-with-$$props/_config.js
new file mode 100644
index 0000000000..62ad08624d
--- /dev/null
+++ b/test/runtime/samples/dev-warning-unknown-props-with-$$props/_config.js
@@ -0,0 +1,7 @@
+export default {
+ compileOptions: {
+ dev: true
+ },
+
+ warnings: []
+};
diff --git a/test/runtime/samples/dev-warning-unknown-props-with-$$props/main.svelte b/test/runtime/samples/dev-warning-unknown-props-with-$$props/main.svelte
new file mode 100644
index 0000000000..1566cf3e41
--- /dev/null
+++ b/test/runtime/samples/dev-warning-unknown-props-with-$$props/main.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/test/runtime/samples/dev-warning-unknown-props-with-$$scope/Foo.svelte b/test/runtime/samples/dev-warning-unknown-props-with-$$scope/Foo.svelte
new file mode 100644
index 0000000000..b9f7feec24
--- /dev/null
+++ b/test/runtime/samples/dev-warning-unknown-props-with-$$scope/Foo.svelte
@@ -0,0 +1,6 @@
+
+
+{answer}
+
diff --git a/test/runtime/samples/dev-warning-unknown-props-with-$$scope/_config.js b/test/runtime/samples/dev-warning-unknown-props-with-$$scope/_config.js
new file mode 100644
index 0000000000..62ad08624d
--- /dev/null
+++ b/test/runtime/samples/dev-warning-unknown-props-with-$$scope/_config.js
@@ -0,0 +1,7 @@
+export default {
+ compileOptions: {
+ dev: true
+ },
+
+ warnings: []
+};
diff --git a/test/runtime/samples/dev-warning-unknown-props-with-$$scope/main.svelte b/test/runtime/samples/dev-warning-unknown-props-with-$$scope/main.svelte
new file mode 100644
index 0000000000..a1656e86e0
--- /dev/null
+++ b/test/runtime/samples/dev-warning-unknown-props-with-$$scope/main.svelte
@@ -0,0 +1,7 @@
+
+
+
+ bar
+