-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
pkl-core/src/test/files/LanguageSnippetTests/input/listings/listing7.pkl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// ensure that these members are only evaluated once (trace should only be emitted once) | ||
listing = new Listing { trace(1) } | ||
|
||
listing2: Listing<Int> = listing | ||
|
||
listing3 = new Listing { | ||
new Listing { trace(2) } | ||
} | ||
|
||
listing4: Listing<Listing<Int>> = listing3 |
18 changes: 18 additions & 0 deletions
18
pkl-core/src/test/files/LanguageSnippetTests/output/listings/listing7.err
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
listing { | ||
1 | ||
} | ||
listing2 { | ||
1 | ||
} | ||
listing3 { | ||
new { | ||
2 | ||
} | ||
} | ||
listing4 { | ||
new { | ||
2 | ||
} | ||
} | ||
pkl: TRACE: 1 = 1 (file:///$snippetsDir/input/listings/listing7.pkl) | ||
pkl: TRACE: 2 = 2 (file:///$snippetsDir/input/listings/listing7.pkl) |