diff --git a/packages/compiler-sfc/__tests__/compileScript.spec.ts b/packages/compiler-sfc/__tests__/compileScript.spec.ts
index f375f51ac..a83029a25 100644
--- a/packages/compiler-sfc/__tests__/compileScript.spec.ts
+++ b/packages/compiler-sfc/__tests__/compileScript.spec.ts
@@ -1573,6 +1573,56 @@ const emit = defineEmits(['a', 'b'])
})
})
+ test('runtime inference for Enum in defineProps', () => {
+ expect(
+ compile(
+ ``,
+ { hoistStatic: true }
+ ).content
+ ).toMatch(`foo: { type: Number`)
+
+ expect(
+ compile(
+ ``,
+ { hoistStatic: true }
+ ).content
+ ).toMatch(`foo: { type: String`)
+
+ expect(
+ compile(
+ ``,
+ { hoistStatic: true }
+ ).content
+ ).toMatch(`foo: { type: [String, Number]`)
+
+ expect(
+ compile(
+ ``,
+ { hoistStatic: true }
+ ).content
+ ).toMatch(`foo: { type: Number`)
+ })
+
test('import type', () => {
const { content } = compile(
`