mirror of https://github.com/sveltejs/svelte
add failing test for #2278
parent
b161725a51
commit
1098b6c1f5
@ -0,0 +1,7 @@
|
||||
export default {
|
||||
props: {
|
||||
greeting: 'Good day'
|
||||
},
|
||||
|
||||
html: '<h1>Good day, world</h1>'
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<script>
|
||||
export let greeting = 'Hello'
|
||||
let name = 'world';
|
||||
|
||||
// both functions, and `name` are hoistable, but hoistMe does not get hoisted
|
||||
function hoistMeMaybe () {
|
||||
return hoistMe(name) // comment out this line => hoistMe is hoisted
|
||||
}
|
||||
|
||||
function hoistMe (name) {
|
||||
return name
|
||||
}
|
||||
</script>
|
||||
|
||||
<h1>{greeting}, {hoistMeMaybe()}</h1>
|
Loading…
Reference in new issue