langtools/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java
changeset 39370 437ba9bd2582
parent 38908 f0c186d76c8a
child 41514 a75c2b869d8d
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java	Fri Jul 01 14:16:28 2016 -0700
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java	Fri Jul 01 14:41:07 2016 -0700
@@ -563,13 +563,18 @@
     private Status status;
     private List<String> unresolved;
     private DiagList diagnostics;
+    private final DiagList syntheticDiags;
 
-    Snippet(Key key, String userSource, Wrap guts, String unitName, SubKind subkind) {
+    Snippet(Key key, String userSource, Wrap guts, String unitName,
+            SubKind subkind, DiagList syntheticDiags) {
         this.key = key;
         this.source = userSource;
         this.guts = guts;
         this.unitName = unitName;
         this.subkind = subkind;
+        this.syntheticDiags = syntheticDiags==null
+                ? new DiagList()
+                : syntheticDiags;
         this.status = Status.NONEXISTENT;
         setSequenceNumber(0);
     }
@@ -644,6 +649,10 @@
         return diagnostics;
     }
 
+    DiagList syntheticDiags() {
+        return syntheticDiags;
+    }
+
     /**
      * @return the corralled guts
      */