Skip to content

Incorrect runtime prop type inference when using Prettify #13902

@lozinsky

Description

@lozinsky

Vue version

3.5.15-3.5.16, 3.5.19-3.5.21

Link to minimal reproduction

https://play.vuejs.org/#eNqNU8Fu2zAM/RXBKOYNaC0MXS+ZG6AbetgKbMGaW12sjk07amRJkOgsget/HyUvbtYUQW8U+Ug+PpFddGVMsm4hmkSpK6wwyGSu6sssQpdFzAG2Zpop0Rhtkc21ligMq6xuWJzwf29fIM5UyocKhKcHQmNkjkAvxtJdJrkKaEAhdVhoRN1QF06YlO8lRKfUvtCqEnXy6LQidp0vk0WFboyQYH8aFFoRxQkLER/LpdR/vgcf2hZOd/5iCcXqFf+j23hfFs0sOLBryKIxhrmtAYfw9e0P2JA9BhtdtpLQR4K/wGnZeo4D7EurSqK9hwtsvwVdharn7nqDoNxuKE/UI/uAzyJS+OuR0Z/pniefQl6meq/i1oBL0JGAnLMlonETzmuBy3aRkJa8kjr3/c9a8Z+9kHrBm9whWG7yYpXX4DjNIx13tuBClbChuv6nfQ9GEiKKapvOp+xyx+vuhgnFVrDVFZvfT9j87ub+MxFj71jXk5Ep2IS9CiWupKiVXw0qEDuaCGP2xGJQZXyAvRUleBhqE0BW1MsBPixVMCVUeJga2kA52y0ilXk46XzB/uykG0n0DweZ+ynjvIHJ00HVKWWT/nsH8rYLC426vVb9eGzhL+nMMtK+EgpmVhuXBqnHq5o8Z5LO0/cfjl9lKdbBINNJjeEQyeaD/+VJ/l6D9QtKk5wnF8nHi6j/C3TWc8k=

Steps to reproduce

  1. Open the reproduction link
  2. Check the developer console
  3. You will see the runtime prop validation warning:
Invalid prop: type check failed for prop "placement". Expected Object, got String with value "bottom".

What is expected?

There should be no prop validation warning.

What is actually happening?

Before version 3.5.15, the runtime type was inferred as null when using a complex type like Prettify. Now, it is inferred as Object, which doesn’t seem correct for runtime type checking in this case.

System Info

Any additional comments?

This issue may be related to #13245, #12876.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.scope: sfc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions