@@ -379,6 +379,7 @@ export function analyze_component(root, source, options) {
379379 uses_rest_props : false ,
380380 uses_slots : false ,
381381 uses_component_bindings : false ,
382+ uses_render_tags : false ,
382383 custom_element : options . customElementOptions ?? options . customElement ,
383384 inject_styles : options . css === 'injected' || options . customElement ,
384385 accessors : options . customElement
@@ -388,7 +389,7 @@ export function analyze_component(root, source, options) {
388389 ! ! options . legacy ?. componentApi ,
389390 reactive_statements : new Map ( ) ,
390391 binding_groups : new Map ( ) ,
391- slot_names : new Set ( ) ,
392+ slot_names : new Map ( ) ,
392393 warnings,
393394 css : {
394395 ast : root . css ,
@@ -455,6 +456,10 @@ export function analyze_component(root, source, options) {
455456 }
456457 }
457458 }
459+
460+ if ( analysis . uses_render_tags && ( analysis . uses_slots || analysis . slot_names . size > 0 ) ) {
461+ error ( analysis . slot_names . values ( ) . next ( ) . value , 'conflicting-slot-usage' ) ;
462+ }
458463 } else {
459464 instance . scope . declare ( b . id ( '$$props' ) , 'bindable_prop' , 'synthetic' ) ;
460465 instance . scope . declare ( b . id ( '$$restProps' ) , 'rest_prop' , 'synthetic' ) ;
@@ -1087,7 +1092,7 @@ const common_visitors = {
10871092 break ;
10881093 }
10891094 }
1090- context . state . analysis . slot_names . add ( name ) ;
1095+ context . state . analysis . slot_names . set ( name , node ) ;
10911096 } ,
10921097 StyleDirective ( node , context ) {
10931098 if ( node . value === true ) {
0 commit comments